本文整理汇总了Java中org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom类的典型用法代码示例。如果您正苦于以下问题:Java OWLObjectPropertyRangeAxiom类的具体用法?Java OWLObjectPropertyRangeAxiom怎么用?Java OWLObjectPropertyRangeAxiom使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OWLObjectPropertyRangeAxiom类属于org.semanticweb.owlapi.model包,在下文中一共展示了OWLObjectPropertyRangeAxiom类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
import org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom; //导入依赖的package包/类
public void visit(OWLObjectPropertyRangeAxiom axiom) {
try {
OWLObjectProperty op = Utils.ensureObjectProperty(axiom.getProperty());
OWLClass clz = Utils.ensureClass(axiom.getRange());
opRanges.put(op, clz);
// processSubClassConstraintCandidate(f.getOWLThing(),
// OWLManager.getOWLDataFactory().getOWLObjectAllValuesFrom(op, clz));
} catch (UnsupportedICException e) {
notSupported(axiom);
}
}
示例2: visit
import org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom; //导入依赖的package包/类
@Override
public T visit(OWLObjectPropertyRangeAxiom axiom) {
throw new IllegalArgumentException(
OWLObjectPropertyRangeAxiom.class.getSimpleName()
+ " cannot be converted to "
+ getTargetClass().getSimpleName());
}
示例3: getRange
import org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom; //导入依赖的package包/类
/**
* It returns the (first) value of the range tag
*
* @param prop
* @return range or null
*/
public String getRange(OWLObjectProperty prop){
for(OWLObjectPropertyRangeAxiom axiom : sourceOntology.getObjectPropertyRangeAxioms(prop)) {
OWLClassExpression ce = axiom.getRange();
return getIdentifier(ce);
}
return null;
}
示例4: visit
import org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom; //导入依赖的package包/类
@Override
public Set<ComplexIntegerAxiom> visit(OWLObjectPropertyRangeAxiom axiom) throws TranslationException {
Objects.requireNonNull(axiom);
OWLObjectProperty property = asOWLObjectProperty(axiom.getProperty());
OWLClassExpression classExpression = axiom.getRange();
IntegerObjectProperty propExpr = getDataTypeFactory().createObjectProperty(translateObjectProperty(property));
ComplexIntegerAxiom ret = getAxiomFactory().createPropertyRangeAxiom(propExpr,
translateClassExpression(classExpression), translateAnnotations(axiom.getAnnotations()));
return Collections.singleton(ret);
}
示例5: visit
import org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom; //导入依赖的package包/类
/**
* A utility method to process OWL <code>ObjectPropertyRange(OPE CE)</code> axiom and produce
* inferred mapping assertions. This axiom is equivalent to
* <code>SubClassOf(ObjectSomeValuesFrom(ObjectInverseOf(OPE) owl:Thing) CE)</code>.
*/
@Override
public void visit(OWLObjectPropertyRangeAxiom axiom)
{
asSubClassOfAxiom(axiom).accept(this);
resetIsInverse(); // reset the isInverse = false.
}
示例6: visit
import org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom; //导入依赖的package包/类
@Override
public void visit(OWLObjectPropertyRangeAxiom axiom)
{
addSubClassAxiom(asSubClassOfAxiom(axiom));
OWLObjectPropertyExpression op = axiom.getProperty();
OwlNodeSet<OWLPropertyExpression<?,?>> descendants = mPropertyStructureHandler.getDescendants(op, false);
for (OwlNode<OWLPropertyExpression<?,?>> node : descendants.getNodes()) {
op = (OWLObjectPropertyExpression) node.getEntity();
axiom = mOwlDataFactory.getOWLObjectPropertyRangeAxiom(op, axiom.getRange());
addSubClassAxiom(asSubClassOfAxiom(axiom));
}
}
示例7: asSubClassOfAxiom
import org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom; //导入依赖的package包/类
private OWLSubClassOfAxiom asSubClassOfAxiom(OWLObjectPropertyRangeAxiom axiom)
{
OWLObjectInverseOf inverseExpression = mOwlDataFactory.getOWLObjectInverseOf(axiom.getProperty());
OWLClassExpression classExpression = axiom.getRange();
OWLClassExpression sub = mOwlDataFactory.getOWLObjectSomeValuesFrom(inverseExpression, mOwlDataFactory.getOWLThing());
return mOwlDataFactory.getOWLSubClassOfAxiom(sub, classExpression);
}
示例8: visit
import org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom; //导入依赖的package包/类
@Override
public void visit(OWLObjectPropertyRangeAxiom axiom) {
OWLSubClassOfAxiom subClassOfAxiom = axiom.asOWLSubClassOfAxiom();
subClassOfAxiom.accept(this);
String tmp = subjectVar;
subjectVar = objectVar;
objectVar = tmp;
}
示例9: visit
import org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom; //导入依赖的package包/类
@Override
public void visit(OWLObjectPropertyRangeAxiom axiom) {
hashCode = primes[26];
hashCode = hashCode * MULT + axiom.getProperty().hashCode();
hashCode = hashCode * MULT + axiom.getRange().hashCode();
hashCode = hashCode * MULT + axiom.getAnnotations().hashCode();
}
示例10: equals
import org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom; //导入依赖的package包/类
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!super.equals(obj)) {
return false;
}
return obj instanceof OWLObjectPropertyRangeAxiom;
}
示例11: getAxiomWithoutAnnotations
import org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom; //导入依赖的package包/类
@Nonnull
@Override
public OWLObjectPropertyRangeAxiom getAxiomWithoutAnnotations() {
if (!isAnnotated()) {
return this;
}
return new OWLObjectPropertyRangeAxiomImpl(getProperty(), getRange(),
NO_ANNOTATIONS);
}
示例12: visit
import org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom; //导入依赖的package包/类
public Object visit(OWLSubPropertyChainOfAxiom axiom) {
Set<OWLObjectPropertyRangeAxiom> rangeAxioms = getCurrentOntology().getAxioms(AxiomType.OBJECT_PROPERTY_RANGE, true);
if (rangeAxioms.isEmpty()) {
return false;
}
// Do we have a range restriction imposed on our super property?
for (OWLObjectPropertyRangeAxiom rngAx : rangeAxioms) {
if (getPropertyManager().isSubPropertyOf(axiom.getSuperProperty(), rngAx.getProperty())) {
// Imposed range restriction!
OWLClassExpression imposedRange = rngAx.getRange();
// There must be an axiom that imposes a range on the last prop in the chain
List<OWLObjectPropertyExpression> chain = axiom.getPropertyChain();
if (!chain.isEmpty()) {
OWLObjectPropertyExpression lastProperty = chain.get(chain.size() - 1);
boolean rngPresent = false;
for (OWLOntology ont : getCurrentOntology().getImportsClosure()) {
for (OWLObjectPropertyRangeAxiom lastPropRngAx : ont.getObjectPropertyRangeAxioms(lastProperty)) {
if (lastPropRngAx.getRange().equals(imposedRange)) {
// We're o.k.
rngPresent = true;
break;
}
}
}
if (!rngPresent) {
profileViolations.add(new LastPropertyInChainNotInImposedRange(getCurrentOntology(), axiom, rngAx));
}
}
}
}
return null;
}
示例13: visit
import org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom; //导入依赖的package包/类
public void visit(OWLObjectPropertyRangeAxiom axiom) {
OWLObjectAllValuesFrom allPropertyRange=m_factory.getOWLObjectAllValuesFrom(axiom.getProperty().getSimplified(),positive(axiom.getRange()));
m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { allPropertyRange });
}
示例14: visit
import org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom; //导入依赖的package包/类
public Boolean visit(OWLObjectPropertyRangeAxiom axiom) {
return reasoner.isSubClassOf(factory.getOWLThing(),factory.getOWLObjectAllValuesFrom(axiom.getProperty(),axiom.getRange()));
}
示例15: visit
import org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom; //导入依赖的package包/类
@Override
public OWLObjectPropertyRangeAxiom visit(
ElkObjectPropertyRangeAxiom axiom) {
return owlFactory_.getOWLObjectPropertyRangeAxiom(
convert(axiom.getProperty()), convert(axiom.getRange()));
}