本文整理汇总了Java中org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom.getSuperProperty方法的典型用法代码示例。如果您正苦于以下问题:Java OWLSubObjectPropertyOfAxiom.getSuperProperty方法的具体用法?Java OWLSubObjectPropertyOfAxiom.getSuperProperty怎么用?Java OWLSubObjectPropertyOfAxiom.getSuperProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom
的用法示例。
在下文中一共展示了OWLSubObjectPropertyOfAxiom.getSuperProperty方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom; //导入方法依赖的package包/类
@Override
public void visit(OWLSubObjectPropertyOfAxiom axiom) {
OWLObjectPropertyExpression subPropertyExpression = axiom.getSubProperty();
if(subPropertyExpression.isAnonymous()){
sparql += objectVar + "<" + subPropertyExpression.getInverseProperty().asOWLObjectProperty().toStringID() + "> " + subjectVar + " .";
} else {
sparql += subjectVar + "<" + subPropertyExpression.asOWLObjectProperty().toStringID() + "> " + objectVar + " .";
}
OWLObjectPropertyExpression superPropertyExpression = axiom.getSuperProperty();
if(superPropertyExpression.isAnonymous()){
sparql += objectVar + "<" + superPropertyExpression.getInverseProperty().asOWLObjectProperty().toStringID() + "> " + subjectVar + " .";
} else {
sparql += subjectVar + "<" + superPropertyExpression.asOWLObjectProperty().toStringID() + "> " + objectVar + " .";
}
}
示例2: visit
import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom; //导入方法依赖的package包/类
@Override
public Set<ComplexIntegerAxiom> visit(OWLSubObjectPropertyOfAxiom axiom) throws TranslationException {
Objects.requireNonNull(axiom);
OWLObjectPropertyExpression leftPropExpr = axiom.getSubProperty();
OWLObjectPropertyExpression rightPropExpr = axiom.getSuperProperty();
ComplexIntegerAxiom ret = getAxiomFactory().createSubObjectPropertyOfAxiom(
translateObjectPropertyExpression(leftPropExpr), translateObjectPropertyExpression(rightPropExpr),
translateAnnotations(axiom.getAnnotations()));
return Collections.singleton(ret);
}
示例3: transformOWLSubObjectPropertyOfAxiom
import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom; //导入方法依赖的package包/类
private Axiom transformOWLSubObjectPropertyOfAxiom(OWLSubObjectPropertyOfAxiom a) {
OWLObjectPropertyExpression sub = a.getSubProperty();
OWLObjectPropertyExpression sup = a.getSuperProperty();
Role lhs = new NamedRole(sub.asOWLObjectProperty().toStringID());
Role rhs = new NamedRole(sup.asOWLObjectProperty().toStringID());
return new RoleInclusion(new Role[]{lhs}, rhs);
}
示例4: transformOWLEquivalentObjectPropertiesAxiom
import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom; //导入方法依赖的package包/类
private List<Axiom> transformOWLEquivalentObjectPropertiesAxiom(
OWLEquivalentObjectPropertiesAxiom a) {
List<Axiom> axioms = new ArrayList<Axiom>();
for (OWLSubObjectPropertyOfAxiom ax : a.asSubObjectPropertyOfAxioms()) {
OWLObjectPropertyExpression sub = ax.getSubProperty();
OWLObjectPropertyExpression sup = ax.getSuperProperty();
axioms.add(
new RoleInclusion(new NamedRole(sub.asOWLObjectProperty().toStringID()),
new NamedRole(sup.asOWLObjectProperty().toStringID()))
);
}
return axioms;
}