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


Java OWLSubAnnotationPropertyOfAxiom类代码示例

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


OWLSubAnnotationPropertyOfAxiom类属于org.semanticweb.owlapi.model包,在下文中一共展示了OWLSubAnnotationPropertyOfAxiom类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addSubAnnotationProperties

import org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom; //导入依赖的package包/类
void addSubAnnotationProperties(Set<OWLAxiom> axioms) {
	// add ALL subannotprop axioms
	// - this is quite geared towards obo ontologies, where
	//   we want to preserve obo headers.
	// TODO: make this configurable
	LOG.info("adding SubAnnotationProperties");
	Set<OWLAxiom> sapAxioms = new HashSet<OWLAxiom>();
	for (OWLOntology refOnt : this.getReferencedOntologies()) {
		for (OWLSubAnnotationPropertyOfAxiom a : refOnt.getAxioms(AxiomType.SUB_ANNOTATION_PROPERTY_OF)) {
			sapAxioms.add(a);
			Set<OWLAnnotationAssertionAxiom> s = refOnt.getAnnotationAssertionAxioms(a.getSubProperty().getIRI());
			if (s != null && !s.isEmpty()) {
				for (OWLAnnotationAssertionAxiom owlAnnotationAssertionAxiom : s) {
					sapAxioms.add(owlAnnotationAssertionAxiom);
				}
			}
		}
	}
	axioms.addAll(sapAxioms);
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:21,代码来源:Mooncat.java

示例2: getSubAnnotationPropertiesOf

import org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom; //导入依赖的package包/类
/**
 * Returns the direct child properties of <code>prop</code> in all ontologies.
 * @param prop      The <code>OWLAnnotationProperty</code> for which 
 *                  we want the direct sub-properties.
 * @return          A <code>Set</code> of <code>OWLAnnotationProperty</code>s 
 *                  that are the direct sub-properties of <code>prop</code>.
 * 
 * @see #getSubPropertyClosureOf(OWLObjectPropertyExpression)
 * @see #getSubPropertyReflexiveClosureOf(OWLObjectPropertyExpression)
 */
public Set<OWLAnnotationProperty> getSubAnnotationPropertiesOf(
        OWLAnnotationProperty prop) {
    Set<OWLAnnotationProperty> subProps = new HashSet<OWLAnnotationProperty>();
    for (OWLOntology ont : this.getAllOntologies()) {
        //we need to iterate each annotation property, to get 
        //its getSubAnnotationPropertyOfAxioms and see if prop is its parent 
        //(there is no method "getSuperAnnotationPropertyOfAxioms").
        for (OWLAnnotationProperty subProp : ont.getAnnotationPropertiesInSignature()) {
            for (OWLSubAnnotationPropertyOfAxiom ax: 
                    ont.getSubAnnotationPropertyOfAxioms(subProp)) {
                if (ax.getSuperProperty().equals(prop)) {
                    subProps.add(subProp);
                }
            }
        }
    }
    return subProps;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:29,代码来源:OWLGraphWrapperEdgesExtended.java

示例3: equals

import org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom; //导入依赖的package包/类
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!super.equals(obj)) {
        return false;
    }
    // superclass is responsible for null, identity, owlaxiom type and
    // annotations
    if (!(obj instanceof OWLSubAnnotationPropertyOfAxiom)) {
        return false;
    }
    OWLSubAnnotationPropertyOfAxiom other = (OWLSubAnnotationPropertyOfAxiom) obj;
    return subProperty.equals(other.getSubProperty())
            && superProperty.equals(other.getSuperProperty());
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:18,代码来源:OWLSubAnnotationPropertyOfAxiomImpl.java

示例4: visit

import org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom; //导入依赖的package包/类
@Override
public OWLSubAnnotationPropertyOfAxiom visit(
		ElkSubAnnotationPropertyOfAxiom axiom) {
	return owlFactory_.getOWLSubAnnotationPropertyOfAxiom(
			convert(axiom.getSubAnnotationProperty()),
			convert(axiom.getSuperAnnotationProperty()));
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:8,代码来源:AbstractElkObjectConverter.java

示例5: visit

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

示例6: getSubProperties

import org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom; //导入依赖的package包/类
public static Set<OWLAnnotationProperty> getSubProperties(OWLAnnotationProperty superProp, Set<OWLOntology> ontologies) {
	Set<OWLAnnotationProperty> result = new HashSet<OWLAnnotationProperty>();
	for (OWLOntology ont : ontologies) {
		for (OWLSubAnnotationPropertyOfAxiom ax : ont.getAxioms(AxiomType.SUB_ANNOTATION_PROPERTY_OF)) {
			if (ax.getSuperProperty().equals(superProp)) {
				result.add(ax.getSubProperty());
			}
		}
	}
	return result;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:12,代码来源:OwlHelper.java

示例7: getSuperProperties

import org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom; //导入依赖的package包/类
public static Set<OWLAnnotationProperty> getSuperProperties(OWLAnnotationProperty subProp, Set<OWLOntology> ontologies) {
	Set<OWLAnnotationProperty> result = new HashSet<OWLAnnotationProperty>();
	for (OWLOntology ont : ontologies) {
		for (OWLSubAnnotationPropertyOfAxiom ax : ont.getAxioms(AxiomType.SUB_ANNOTATION_PROPERTY_OF)) {
			if (ax.getSubProperty().equals(subProp)) {
				result.add(ax.getSuperProperty());
			}
		}
	}
	return result;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:12,代码来源:OwlHelper.java

示例8:

import org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom; //导入依赖的package包/类
/**
 * Convenience method for asserting a subAnnotationProperty relation 
 * between a parent and child property in an ontology.
 *
 * @param ontology the current ontology
 * @param child the child property
 * @param parent the parent property
 * @return the axiom
 */
protected static OWLSubAnnotationPropertyOfAxiom
		assertSubAnnotationProperty(
		OWLOntology ontology, OWLAnnotationProperty child,
		OWLAnnotationProperty parent) {
	OWLOntologyManager manager = ontology.getOWLOntologyManager();
	OWLDataFactory dataFactory = manager.getOWLDataFactory();
	OWLSubAnnotationPropertyOfAxiom axiom = 
		dataFactory.getOWLSubAnnotationPropertyOfAxiom(
			child, parent);
	manager.addAxiom(ontology, axiom);
	return axiom;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:22,代码来源:OWLConverter.java

示例9: visit

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

示例10: getAxiomWithoutAnnotations

import org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom; //导入依赖的package包/类
@Override
public OWLSubAnnotationPropertyOfAxiom getAxiomWithoutAnnotations() {
    if (!isAnnotated()) {
        return this;
    }
    return new OWLSubAnnotationPropertyOfAxiomImpl(getSubProperty(),
            getSuperProperty(), NO_ANNOTATIONS);
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:9,代码来源:OWLSubAnnotationPropertyOfAxiomImpl.java

示例11: compareObjectOfSameType

import org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom; //导入依赖的package包/类
@Override
protected int compareObjectOfSameType(OWLObject object) {
    OWLSubAnnotationPropertyOfAxiom other = (OWLSubAnnotationPropertyOfAxiom) object;
    int diff = subProperty.compareTo(other.getSubProperty());
    if (diff != 0) {
        return diff;
    }
    return superProperty.compareTo(other.getSuperProperty());
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:10,代码来源:OWLSubAnnotationPropertyOfAxiomImpl.java

示例12: visit

import org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom; //导入依赖的package包/类
public void visit(OWLSubAnnotationPropertyOfAxiom axiom) {
    notSupported(axiom);
}
 
开发者ID:kbss-cvut,项目名称:jopa,代码行数:4,代码来源:IntegrityConstraintParser.java

示例13: visit

import org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom; //导入依赖的package包/类
public void visit(OWLSubAnnotationPropertyOfAxiom axiom) {
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:3,代码来源:OWLNormalization.java

示例14: visit

import org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom; //导入依赖的package包/类
public Boolean visit(OWLSubAnnotationPropertyOfAxiom axiom) {
    return Boolean.TRUE;
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:4,代码来源:EntailmentChecker.java

示例15: visit

import org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom; //导入依赖的package包/类
@Override
public ElkAnnotationAxiom visit(OWLSubAnnotationPropertyOfAxiom owlSubAnnotationPropertyOfAxiom) {
	return new ElkSubAnnotationPropertyOfAxiomWrap<OWLSubAnnotationPropertyOfAxiom>(owlSubAnnotationPropertyOfAxiom);
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:5,代码来源:OwlAnnotationAxiomConverterVisitor.java


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