本文整理汇总了Java中org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom.getProperties方法的典型用法代码示例。如果您正苦于以下问题:Java OWLEquivalentObjectPropertiesAxiom.getProperties方法的具体用法?Java OWLEquivalentObjectPropertiesAxiom.getProperties怎么用?Java OWLEquivalentObjectPropertiesAxiom.getProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom
的用法示例。
在下文中一共展示了OWLEquivalentObjectPropertiesAxiom.getProperties方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
import org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom; //导入方法依赖的package包/类
@Override
public Set<ComplexIntegerAxiom> visit(OWLEquivalentObjectPropertiesAxiom axiom) throws TranslationException {
Objects.requireNonNull(axiom);
Set<OWLObjectPropertyExpression> propertySet = axiom.getProperties();
Set<IntegerObjectPropertyExpression> propertyExprSet = new HashSet<>();
propertySet.forEach(propertyExpr -> {
if (propertyExpr instanceof OWLObjectProperty) {
OWLObjectProperty property = asOWLObjectProperty(propertyExpr);
propertyExprSet.add(getDataTypeFactory().createObjectProperty(translateObjectProperty(property)));
} else {
throw new IllegalStateException();
}
});
ComplexIntegerAxiom ret = getAxiomFactory().createEquivalentObjectPropertiesAxiom(propertyExprSet,
translateAnnotations(axiom.getAnnotations()));
return Collections.singleton(ret);
}
示例2: visit
import org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom; //导入方法依赖的package包/类
@Override
public Void visit(OWLEquivalentObjectPropertiesAxiom axiom) {
Set<OWLObjectPropertyExpression> properties = axiom.getProperties();
boolean anonymousPropertyExists = false;
for (OWLObjectPropertyExpression property : properties) {
anonymousPropertyExists = anonymousPropertyExists || property.isAnonymous();
}
// #217 - in case of EquivalentObjectProperties(:p ObjectInverseOf(:q))
if (!anonymousPropertyExists) {
Collection<Long> nodes = Collections2.transform(axiom.getObjectPropertiesInSignature(),
new Function<OWLObjectProperty, Long>() {
@Override
public Long apply(OWLObjectProperty objectProperty) {
return getOrCreateNode(getIri(objectProperty));
}
});
getOrCreateRelationshipPairwise(nodes, OwlRelationships.OWL_EQUIVALENT_OBJECT_PROPERTY);
}
return null;
}
示例3: visit
import org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom; //导入方法依赖的package包/类
public Boolean visit(OWLEquivalentObjectPropertiesAxiom axiom) {
Set<OWLObjectPropertyExpression> props=axiom.getProperties();
Iterator<OWLObjectPropertyExpression> it=props.iterator();
if (it.hasNext()) {
OWLObjectPropertyExpression objectPropertyExpression1=it.next();
while (it.hasNext()) {
OWLObjectPropertyExpression objectPropertyExpression2=it.next();
if (!reasoner.isSubObjectPropertyExpressionOf(objectPropertyExpression1,objectPropertyExpression2) || !reasoner.isSubObjectPropertyExpressionOf(objectPropertyExpression2,objectPropertyExpression1))
return Boolean.FALSE;
}
}
return Boolean.TRUE;
}
示例4: visit
import org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom; //导入方法依赖的package包/类
/**
* A utility method to process OWL <code>EquivalentDataProperties(DPE1 DPE2)</code> axiom and produce
* inferred mapping assertions.
*/
@Override
public void visit(OWLEquivalentObjectPropertiesAxiom axiom)
{
List<OWLObjectPropertyExpression> properties = new ArrayList<OWLObjectPropertyExpression>(axiom.getProperties());
OWLObjectPropertyExpression ope1 = properties.get(0);
OWLObjectPropertyExpression ope2 = properties.get(1);
/*
* Get all (copy) known mappings for the first equivalent object property expression
* and produce the extra mappings.
*/
ope1.accept(this);
Set<IMapping> mappings1 = getMappingsForPropertyExpression();
if (!mappings1.isEmpty()) {
ope2.accept(this);
produceEquivalentPropertyMappings(mappings1);
}
/*
* Get all (copy) known mappings for the second equivalent object property expression
* and produce the extra mappings.
*/
ope2.accept(this);
Set<IMapping> mappings2 = getMappingsForPropertyExpression();
if (!mappings2.isEmpty()) {
ope1.accept(this);
produceEquivalentPropertyMappings(mappings2);
}
}
示例5: visit
import org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom; //导入方法依赖的package包/类
@Override
public void visit(OWLEquivalentObjectPropertiesAxiom axiom) {
for (OWLObjectPropertyExpression propertyExpression : axiom.getProperties()) {
if(propertyExpression.isAnonymous()){
sparql += objectVar + "<" + propertyExpression.getInverseProperty().asOWLObjectProperty().toStringID() + "> " + subjectVar + " .";
} else {
sparql += subjectVar + "<" + propertyExpression.asOWLObjectProperty().toStringID() + "> " + objectVar + " .";
}
}
}
示例6: visit
import org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom; //导入方法依赖的package包/类
@Override
public void visit(@Nonnull OWLEquivalentObjectPropertiesAxiom axiom) {
for (OWLObjectPropertyExpression prop : axiom.getProperties()) {
prop.accept(this);
}
processAxiomAnnotations(axiom);
}