本文整理汇总了Java中org.semanticweb.owlapi.model.AxiomType.CLASS_ASSERTION属性的典型用法代码示例。如果您正苦于以下问题:Java AxiomType.CLASS_ASSERTION属性的具体用法?Java AxiomType.CLASS_ASSERTION怎么用?Java AxiomType.CLASS_ASSERTION使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.semanticweb.owlapi.model.AxiomType
的用法示例。
在下文中一共展示了AxiomType.CLASS_ASSERTION属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testServerGetCoAnnotationSuggestions
@Test
public void testServerGetCoAnnotationSuggestions() throws Exception {
g = loadOntology("../OWLTools-Sim/src/test/resources/sim/mp-subset-1.obo");
String file="../OWLTools-Sim/src/test/resources/sim/mgi-gene2mp-subset-1.tbl";
// g = loadOntology("/Users/Nicole/work/MONARCH/phenotype-ontologies/src/ontology/hp.obo");
// String file="/Users/Nicole/work/MONARCH/phenotype-ontologies/data/Homo_sapiens/Hs-disease-to-phenotype-O.txt";
TableToAxiomConverter ttac = new TableToAxiomConverter(g);
ttac.config.axiomType = AxiomType.CLASS_ASSERTION;
ttac.config.isSwitchSubjectObject = true;
ttac.parse(file);
OwlSimFactory owlSimFactory = new FastOwlSimFactory();
OwlSim sos = owlSimFactory.createOwlSim(g.getSourceOntology());
sos.createElementAttributeMapFromOntology();
// sos.populateFullCoannotationMatrix();
LOG.info("Finished populating the big matrix");
HttpUriRequest httppost = createGoodCoAnnotationRequest(1);
runServerCommunication(httppost,sos);
}
示例2: testAutoSimOnGO
@Test
public void testAutoSimOnGO() throws Exception, MathException {
ParserWrapper pw = new ParserWrapper();
sourceOntol = pw.parseOBO(getResourceIRIString("go-subset-t1.obo"));
g = new OWLGraphWrapper(sourceOntol);
IRI vpIRI = g.getOWLObjectPropertyByIdentifier("GOTESTREL:0000001").getIRI();
TableToAxiomConverter ttac = new TableToAxiomConverter(g);
ttac.config.axiomType = AxiomType.CLASS_ASSERTION;
ttac.config.property = vpIRI;
ttac.config.isSwitchSubjectObject = true;
ttac.parse("src/test/resources/simplegaf-t1.txt");
OWLPrettyPrinter pp = new OWLPrettyPrinter(g);
AutomaticSimPreProcessor pproc = new AutomaticSimPreProcessor();
try {
pproc.setInputOntology(sourceOntol);
pproc.setOutputOntology(sourceOntol);
pproc.preprocess();
} finally {
pproc.dispose();
}
}
示例3: getAxiomType
@Override
public AxiomType<?> getAxiomType() {
return AxiomType.CLASS_ASSERTION;
}
示例4: parseAssociations
/**
* Parses a 2-column file into owl class assertions.
* - Col1 : instance ID (e.g. gene)
* - Col2 : type ID (e.g. phenotype)
*
* @param file
* @param g
* @throws IOException
*/
protected void parseAssociations(File file, OWLGraphWrapper g) throws IOException {
TableToAxiomConverter ttac = new TableToAxiomConverter(g);
ttac.config.axiomType = AxiomType.CLASS_ASSERTION;
ttac.config.isSwitchSubjectObject = true;
ttac.parse(file);
}