当前位置: 首页>>代码示例>>Java>>正文


Java OWLEquivalentObjectPropertiesAxiom.getProperties方法代码示例

本文整理汇总了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);
}
 
开发者ID:julianmendez,项目名称:jcel,代码行数:18,代码来源:AxiomTranslator.java

示例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;
}
 
开发者ID:SciGraph,项目名称:SciGraph,代码行数:24,代码来源:GraphOwlVisitor.java

示例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;
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:14,代码来源:EntailmentChecker.java

示例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);
   }
}
 
开发者ID:obidea,项目名称:semantika,代码行数:34,代码来源:TMappingProcessor.java

示例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 + " .";
		}
	}
}
 
开发者ID:SmartDataAnalytics,项目名称:OWL2SPARQL,代码行数:11,代码来源:OWLAxiomToSPARQLConverter.java

示例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);
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:8,代码来源:AbstractEntityRegistrationManager.java


注:本文中的org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom.getProperties方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。