本文整理匯總了Java中org.semanticweb.owlapi.model.OWLOntology.getDataPropertiesInSignature方法的典型用法代碼示例。如果您正苦於以下問題:Java OWLOntology.getDataPropertiesInSignature方法的具體用法?Java OWLOntology.getDataPropertiesInSignature怎麽用?Java OWLOntology.getDataPropertiesInSignature使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.semanticweb.owlapi.model.OWLOntology
的用法示例。
在下文中一共展示了OWLOntology.getDataPropertiesInSignature方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getOntoDataProperty
import org.semanticweb.owlapi.model.OWLOntology; //導入方法依賴的package包/類
/**
* Get the {@link OWLDataProperty} object corresponding to a named data
* property (i.e. attribute in OO) of the ontology.
* @param onto
* @param name
* @return
*/
public static OWLDataProperty getOntoDataProperty(OWLOntology onto,
String name) {
for (OWLDataProperty p : onto.getDataPropertiesInSignature())
if (p.getIRI().getFragment().equals(name))
return p;
return null;
}
示例2: getEntities
import org.semanticweb.owlapi.model.OWLOntology; //導入方法依賴的package包/類
@Override
protected Set<OWLDataProperty> getEntities(OWLOntology ont) {
return ont.getDataPropertiesInSignature();
}
示例3: getAxioms
import org.semanticweb.owlapi.model.OWLOntology; //導入方法依賴的package包/類
/**
* Get axioms from ontology depending on requirements
* @param ontology
* @param considerImportsClosure
* @param considerEntityAnnotations
* @param ignoreAssertions
* @return
*/
private static Set<OWLAxiom> getAxioms(
OWLOntology ontology,
boolean considerImportsClosure,
boolean considerEntityAnnotations,
boolean ignoreAssertions){
Set<OWLAxiom> axioms = new HashSet<OWLAxiom>();
//axioms.addAll(ontology.getGeneralClassAxioms());
axioms.addAll(ontology.getTBoxAxioms(considerImportsClosure));
axioms.addAll(ontology.getRBoxAxioms(considerImportsClosure));
if (!ignoreAssertions){
axioms.addAll(ontology.getABoxAxioms(considerImportsClosure));
}
if (considerEntityAnnotations){
for (OWLClass cls : ontology.getClassesInSignature(considerImportsClosure)){
axioms.addAll(cls.getAnnotationAssertionAxioms(ontology));
//axioms.addAll(ontology.getDeclarationAxioms(cls));
}
for (OWLObjectProperty oprop : ontology.getObjectPropertiesInSignature(considerImportsClosure)){
axioms.addAll(oprop.getAnnotationAssertionAxioms(ontology));
//axioms.addAll(ontology.getDeclarationAxioms(oprop));
}
for (OWLDataProperty dprop : ontology.getDataPropertiesInSignature(considerImportsClosure)){
axioms.addAll(dprop.getAnnotationAssertionAxioms(ontology));
//axioms.addAll(ontology.getDeclarationAxioms(dprop));
}
for (OWLAnnotationProperty aprop : ontology.getAnnotationPropertiesInSignature()){
axioms.addAll(aprop.getAnnotationAssertionAxioms(ontology));
//axioms.addAll(ontology.getDeclarationAxioms(aprop));
}
if (!ignoreAssertions){
for (OWLNamedIndividual indiv : ontology.getIndividualsInSignature(considerImportsClosure)){
axioms.addAll(indiv.getAnnotationAssertionAxioms(ontology));
//axioms.addAll(ontology.getDeclarationAxioms(indiv));
}
//TODO In pizza.owl gives an error
//for (OWLAnonymousIndividual aindiv : ontology.getAnonymousIndividuals()){
// axioms.addAll(ontology.getAnnotationAssertionAxioms(aindiv));
//}
}
}
/*for (OWLAxiom ax : ontology.getAxioms()){
if (!axioms.contains(ax)){
System.out.println(ax);
}
}*/
return axioms;
}