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


Java OWLSubObjectPropertyOfAxiom类代码示例

本文整理汇总了Java中org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom的典型用法代码示例。如果您正苦于以下问题:Java OWLSubObjectPropertyOfAxiom类的具体用法?Java OWLSubObjectPropertyOfAxiom怎么用?Java OWLSubObjectPropertyOfAxiom使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


OWLSubObjectPropertyOfAxiom类属于org.semanticweb.owlapi.model包,在下文中一共展示了OWLSubObjectPropertyOfAxiom类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 + " .";
	}
}
 
开发者ID:SmartDataAnalytics,项目名称:OWL2SPARQL,代码行数:17,代码来源:OWLAxiomToSPARQLConverter.java

示例2: addAxiom

import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom; //导入依赖的package包/类
private void addAxiom(List<Rule> list, OWLSubObjectPropertyOfAxiom a) {
	if (!(a.getSubProperty().isAnonymous() ||
	      a.getSuperProperty().isAnonymous())) {
		String op1 = getString(a.getSubProperty());
		String op2 = getString(a.getSuperProperty());
		list.add(new SubPropertyOf(op1, op2));
	}
}
 
开发者ID:lszeremeta,项目名称:neo4j-sparql-extension-yars,代码行数:9,代码来源:SubPropertyOfExtractor.java

示例3: getAssertedSubProperties

import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom; //导入依赖的package包/类
/**
 * Find all asserted direct sub properties of the parent property.
 * 
 * @param parent
 * @param g
 * @return set
 */
public static Set<OWLObjectProperty> getAssertedSubProperties(OWLObjectProperty parent, OWLGraphWrapper g) {
	Set<OWLObjectProperty> properties = new HashSet<OWLObjectProperty>();
	for(OWLOntology ont : g.getAllOntologies()) {
		Set<OWLSubObjectPropertyOfAxiom> axioms = ont.getObjectSubPropertyAxiomsForSuperProperty(parent);
		for (OWLSubObjectPropertyOfAxiom axiom : axioms) {
			OWLObjectPropertyExpression subProperty = axiom.getSubProperty();
			if (subProperty instanceof OWLObjectProperty) {
				properties.add(subProperty.asOWLObjectProperty());
			}
		}
	}
	return properties;
}
 
开发者ID:geneontology,项目名称:minerva,代码行数:21,代码来源:StartUpTool.java

示例4: isUnsupportedExtensionAxiom

import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom; //导入依赖的package包/类
protected static boolean isUnsupportedExtensionAxiom(OWLAxiom axiom) {
	return axiom instanceof OWLSubObjectPropertyOfAxiom
			|| axiom instanceof OWLTransitiveObjectPropertyAxiom
			|| axiom instanceof OWLSubPropertyChainOfAxiom
			|| axiom instanceof OWLFunctionalObjectPropertyAxiom
			|| axiom instanceof OWLInverseFunctionalObjectPropertyAxiom
			|| axiom instanceof SWRLRule;
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:9,代码来源:Reasoner.java

示例5: visit

import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom; //导入依赖的package包/类
@Override
public T visit(OWLSubObjectPropertyOfAxiom axiom) {
	throw new IllegalArgumentException(
			OWLSubObjectPropertyOfAxiom.class.getSimpleName()
					+ " cannot be converted to "
					+ getTargetClass().getSimpleName());
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:8,代码来源:AbstractOwlAxiomConverterVisitor.java

示例6: getSuperProperties

import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom; //导入依赖的package包/类
public static Set<OWLObjectPropertyExpression> getSuperProperties(OWLObjectPropertyExpression prop, OWLOntology ont) {
	Set<OWLObjectPropertyExpression> result = new HashSet<>();
	Set<OWLSubObjectPropertyOfAxiom> axioms = ont.getObjectSubPropertyAxiomsForSubProperty(prop);
	for (OWLSubPropertyAxiom<OWLObjectPropertyExpression> axiom : axioms) {
		result.add(axiom.getSuperProperty());
	}
	return result;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:9,代码来源:OwlHelper.java

示例7: getSubProperties

import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom; //导入依赖的package包/类
public static Set<OWLObjectPropertyExpression> getSubProperties(OWLObjectPropertyExpression prop, OWLOntology ont) {
	Set<OWLObjectPropertyExpression> results = new HashSet<>();
	Set<OWLSubObjectPropertyOfAxiom> axioms = ont.getObjectSubPropertyAxiomsForSuperProperty(prop);
	for (OWLSubObjectPropertyOfAxiom axiom : axioms) {
		results.add(axiom.getSubProperty());
	}
	return results;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:9,代码来源:OwlHelper.java

示例8: getSuperPropertiesOf

import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom; //导入依赖的package包/类
/**
 * returns parent properties of p in all ontologies
 * @param p
 * @return set of properties
 */
public Set<OWLObjectPropertyExpression> getSuperPropertiesOf(OWLObjectPropertyExpression p) {
	Set<OWLObjectPropertyExpression> ps = new HashSet<OWLObjectPropertyExpression>();
	for (OWLOntology ont : getAllOntologies()) {
		for (OWLSubObjectPropertyOfAxiom a : ont.getObjectSubPropertyAxiomsForSubProperty(p)) {
			ps.add(a.getSuperProperty());
		}
	}
	return ps;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:15,代码来源:OWLGraphWrapperEdges.java

示例9: getSubPropertiesOf

import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom; //导入依赖的package包/类
/**
 * Returns the direct child properties of <code>prop</code> in all ontologies.
 * @param prop 		The <code>OWLObjectPropertyExpression</code> for which 
 * 					we want the direct sub-properties.
 * @return 			A <code>Set</code> of <code>OWLObjectPropertyExpression</code>s 
 * 					that are the direct sub-properties of <code>prop</code>.
    * 
    * @see #getSubPropertyClosureOf(OWLObjectPropertyExpression)
    * @see #getSubPropertyReflexiveClosureOf(OWLObjectPropertyExpression)
 */
public Set<OWLObjectPropertyExpression> getSubPropertiesOf(
		OWLObjectPropertyExpression prop) {
	Set<OWLObjectPropertyExpression> subProps = new HashSet<OWLObjectPropertyExpression>();
	for (OWLOntology ont : this.getAllOntologies()) {
		for (OWLSubObjectPropertyOfAxiom axiom : 
			    ont.getObjectSubPropertyAxiomsForSuperProperty(prop)) {
			subProps.add(axiom.getSubProperty());
		}
	}
	return subProps;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:22,代码来源:OWLGraphWrapperEdgesExtended.java

示例10: 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);
}
 
开发者ID:julianmendez,项目名称:jcel,代码行数:11,代码来源:AxiomTranslator.java

示例11: visit

import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom; //导入依赖的package包/类
@Override
public Void visit(OWLSubObjectPropertyOfAxiom axiom) {
  long subProperty = getOrCreateNode(getIri(axiom.getSubProperty()));
  long superProperty = getOrCreateNode(getIri(axiom.getSuperProperty()));
  getOrCreateRelationship(subProperty, superProperty, OwlRelationships.RDFS_SUB_PROPERTY_OF);
  return null;
}
 
开发者ID:SciGraph,项目名称:SciGraph,代码行数:8,代码来源:GraphOwlVisitor.java

示例12: visit

import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom; //导入依赖的package包/类
/**
 * A utility method to process OWL <code>SubObjectPropertyOf(OPE1 OPE2)</code> axiom and produce
 * inferred mapping assertions.
 */
@Override
public void visit(OWLSubObjectPropertyOfAxiom axiom)
{
   /*
    * Trace all the ancestors of the object property expression in the given OWL SubObjectPropertyOf axiom.
    */
   Set<OWLSubPropertyAxiom<?>> ancestors = mOntology.traceAncestors(axiom.getSubProperty(), true);
   for (OWLSubPropertyAxiom<?> ax : ancestors) {
      /*
       * Get all (copy) known mappings for the visited sub object property expression.
       */
      OWLObjectPropertyExpression subProperty = (OWLObjectPropertyExpression) ax.getSubProperty();
      subProperty.accept(this); // this call will produce (sub property) mSignature
      Set<IMapping> subPropertyMappings = getMappingsForPropertyExpression();
      if (subPropertyMappings.isEmpty()) {
         continue;
      }
      /*
       * Produce the "extra" mappings for the visited super object property expression as many as
       * the known mappings in the sub object property expression.
       */
      OWLObjectPropertyExpression superProperty = (OWLObjectPropertyExpression) ax.getSuperProperty();
      superProperty.accept(this); // this call will produce (super property) mSignature and mIsInverse
      URI superPropertySignature = mSignature;
      for (IMapping subPropertyMapping : subPropertyMappings) {
         IPropertyMapping pm = createPropertyMapping(superPropertySignature, subPropertyMapping, mIsInverse);
         addInferredMapping(pm);
      }
   }
}
 
开发者ID:obidea,项目名称:semantika,代码行数:35,代码来源:TMappingProcessor.java

示例13: visit

import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom; //导入依赖的package包/类
@Override
public void visit(OWLSubObjectPropertyOfAxiom axiom) {
    hashCode = primes[27];
    hashCode = hashCode * MULT + axiom.getSubProperty().hashCode();
    hashCode = hashCode * MULT + axiom.getSuperProperty().hashCode();
    hashCode = hashCode * MULT + axiom.getAnnotations().hashCode();
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:8,代码来源:HashCode.java

示例14: asSubObjectPropertyOfAxioms

import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom; //导入依赖的package包/类
@Override
public Set<OWLSubObjectPropertyOfAxiom> asSubObjectPropertyOfAxioms() {
    Set<OWLSubObjectPropertyOfAxiom> axs = new HashSet<>();
    axs.add(new OWLSubObjectPropertyOfAxiomImpl(getFirstProperty(),
            getSecondProperty().getInverseProperty().getSimplified(),
            NO_ANNOTATIONS));
    axs.add(new OWLSubObjectPropertyOfAxiomImpl(getSecondProperty(),
            getFirstProperty().getInverseProperty().getSimplified(),
            NO_ANNOTATIONS));
    return axs;
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:12,代码来源:OWLInverseObjectPropertiesAxiomImpl.java

示例15: asSubPropertyAxioms

import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom; //导入依赖的package包/类
@Nonnull
@Override
public Set<OWLSubObjectPropertyOfAxiom> asSubPropertyAxioms() {
    Set<OWLSubObjectPropertyOfAxiom> result = new HashSet<>(5);
    result.add(new OWLSubObjectPropertyOfAxiomImpl(getProperty(),
            getProperty().getInverseProperty().getSimplified(),
            NO_ANNOTATIONS));
    result.add(new OWLSubObjectPropertyOfAxiomImpl(getProperty()
            .getInverseProperty().getSimplified(), getProperty(),
            NO_ANNOTATIONS));
    return result;
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:13,代码来源:OWLSymmetricObjectPropertyAxiomImpl.java


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