Java 类org.semanticweb.owlapi.model.OWLObjectAllValuesFrom 实例源码

项目:OntoBench    文件:OwlObjectAllValuesFromFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectAllValuesFromProperty");
  OWLClass range = featurePool.getExclusiveClass(":ObjectAllValuesFromRange");

  OWLObjectAllValuesFrom restriction = factory.getOWLObjectAllValuesFrom(property, range);

  OWLClass allValuesFrom = featurePool.getExclusiveClass(":ObjectAllValuesFrom");
  addAxiomToOntology(factory.getOWLSubClassOfAxiom(allValuesFrom, restriction));
}
项目:jopa    文件:IntegrityConstraintClassParser.java   
public void visit(OWLObjectAllValuesFrom arg0) {
    try {
        OWLObjectProperty op = Utils.ensureObjectProperty(arg0.getProperty());
        OWLClass clz = Utils.ensureClass(arg0.getFiller());

        integrityConstraints.add(integrityConstraintFactory
            .ObjectPropertyRangeConstraint(subjClass, op, clz));
    } catch (UnsupportedICException e) {
        notSupported(arg0);
    }
}
项目:HermiT-android    文件:OWLNormalization.java   
public OWLClassExpression visit(OWLObjectAllValuesFrom object) {
    m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(object.getProperty().getNamedProperty());
    OWLClassExpression filler=object.getFiller();
    if (isSimple(filler) || isNominal(filler) || isNegatedOneNominal(filler))
        // The nominal cases are optimizations.
        return object;
    else {
        OWLClassExpression definition=getDefinitionFor(filler,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_newInclusions.add(new OWLClassExpression[] { negative(definition),filler });
        return m_factory.getOWLObjectAllValuesFrom(object.getProperty(),definition);
    }
}
项目:HermiT-android    文件:ExpressionManager.java   
public OWLClassExpression visit(OWLObjectAllValuesFrom d) {
    OWLClassExpression filler=getSimplified(d.getFiller());
    if (filler.isOWLThing())
        return m_factory.getOWLThing();
    else
        return m_factory.getOWLObjectAllValuesFrom(d.getProperty().getSimplified(),filler);
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public OWLClassExpression visit(OWLObjectAllValuesFrom object) {
    m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(object.getProperty().getNamedProperty());
    OWLClassExpression filler=object.getFiller();
    if (isSimple(filler) || isNominal(filler) || isNegatedOneNominal(filler))
        // The nominal cases are optimizations.
        return object;
    else {
        OWLClassExpression definition=getDefinitionFor(filler,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_newInclusions.add(new OWLClassExpression[] { negative(definition),filler });
        return m_factory.getOWLObjectAllValuesFrom(object.getProperty(),definition);
    }
}
项目:Hermit_1.3.8_android    文件:ExpressionManager.java   
public OWLClassExpression visit(OWLObjectAllValuesFrom d) {
    OWLClassExpression filler=getSimplified(d.getFiller());
    if (filler.isOWLThing())
        return m_factory.getOWLThing();
    else
        return m_factory.getOWLObjectAllValuesFrom(d.getProperty().getSimplified(),filler);
}
项目:owltools    文件:TBoxUnFoldingTool.java   
@Override
public OWLObjectAllValuesFrom visit(OWLObjectAllValuesFrom ce) {
    if (LOG.isDebugEnabled()) {
        LOG.debug("Unfolding all_values_from: "+ce);
    }

    OWLClassExpression filler = ce.getFiller();
    if (filler != null) {
        OWLClassExpression unfold = filler.accept(this);
        if (unfold != null) {
            return factory.getOWLObjectAllValuesFrom(ce.getProperty(), unfold);
        }
    }
    return null;
}
项目:Wolpertinger    文件:ExpressionManager.java   
public OWLClassExpression visit(OWLObjectAllValuesFrom d) {
    OWLClassExpression filler=getSimplified(d.getFiller());
    if (filler.isOWLThing())
        return m_factory.getOWLThing();
    else
        return m_factory.getOWLObjectAllValuesFrom(d.getProperty().getSimplified(),filler);
}
项目:SciGraph    文件:GraphOwlVisitor.java   
@Override
public Void visit(OWLObjectAllValuesFrom desc) {
  long restriction =
      getOrCreateNode(getIri(desc), OwlLabels.OWL_ALL_VALUES_FROM, OwlLabels.OWL_ANONYMOUS);
  if (!desc.getProperty().isAnonymous()) {
    long property = getOrCreateNode(getIri(desc.getProperty()));
    getOrCreateRelationship(restriction, property, OwlRelationships.PROPERTY);
    long cls = getOrCreateNode(getIri(desc.getFiller()));
    getOrCreateRelationship(restriction, cls, OwlRelationships.FILLER);
  }
  return null;
}
项目:OWL2SPARQL    文件:OWLClassExpressionMinimizer.java   
@Override
public OWLClassExpression visit(OWLObjectAllValuesFrom ce) {
    OWLClassExpression filler = ce.getFiller();
    OWLClassExpression shortenedFiller = filler.accept(this);
    if(shortenedFiller.isOWLThing()){// \forall r.\top \equiv \top
        return df.getOWLThing();
    } else if(beautify && shortenedFiller.isOWLNothing()) {// \forall r.\bot to \neg \exists r.\top
        return df.getOWLObjectComplementOf(df.getOWLObjectSomeValuesFrom(ce.getProperty(), df.getOWLThing()));
    } else if(!filler.equals(shortenedFiller)){
        return df.getOWLObjectAllValuesFrom(ce.getProperty(), shortenedFiller);
    }
    return ce;
}
项目:owlapi-gwt    文件:NNF.java   
@Override
public OWLClassExpression visit(OWLObjectAllValuesFrom ce) {
    OWLClassExpression filler = ce.getFiller().accept(this);
    if (negated) {
        return dataFactory.getOWLObjectSomeValuesFrom(ce.getProperty(),
                filler);
    } else {
        return dataFactory.getOWLObjectAllValuesFrom(ce.getProperty(),
                filler);
    }
}
项目:owlapi-gwt    文件:OWLClassExpressionCollector.java   
@Override
public Set<OWLClassExpression> visit(OWLObjectAllValuesFrom ce) {
    Set<OWLClassExpression> result = new HashSet<>();
    result.add(ce);
    result.addAll(ce.getFiller().accept(this));
    return result;
}
项目:owlapi-gwt    文件:OWLObjectAllValuesFromImpl.java   
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!super.equals(obj)) {
        return false;
    }
    return obj instanceof OWLObjectAllValuesFrom;
}
项目:HermiT-android    文件:BuiltInPropertyManager.java   
public void visit(OWLObjectAllValuesFrom object) {
    visitProperty(object.getProperty());
    object.getFiller().accept(this);
}
项目:HermiT-android    文件:OWLNormalization.java   
public void visit(OWLObjectPropertyDomainAxiom axiom) {
    OWLObjectAllValuesFrom allPropertyNohting=m_factory.getOWLObjectAllValuesFrom(axiom.getProperty().getSimplified(),m_factory.getOWLNothing());
    m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { positive(axiom.getDomain()),allPropertyNohting });
    m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(axiom.getProperty().getNamedProperty());
}
项目:HermiT-android    文件:OWLNormalization.java   
public void visit(OWLObjectPropertyRangeAxiom axiom) {
    OWLObjectAllValuesFrom allPropertyRange=m_factory.getOWLObjectAllValuesFrom(axiom.getProperty().getSimplified(),positive(axiom.getRange()));
    m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { allPropertyRange });
}
项目:HermiT-android    文件:OWLNormalization.java   
public Boolean visit(OWLObjectAllValuesFrom object) {
    return object.getFiller().accept(this);
}
项目:HermiT-android    文件:OWLAxiomsExpressivity.java   
public void visit(OWLObjectAllValuesFrom object) {
    visitProperty(object.getProperty());
    object.getFiller().accept(this);
}
项目:HermiT-android    文件:ExpressionManager.java   
public OWLClassExpression visit(OWLObjectAllValuesFrom d) {
    OWLClassExpression filler=getNNF(d.getFiller());
    return m_factory.getOWLObjectAllValuesFrom(d.getProperty().getSimplified(),filler);
}
项目:HermiT-android    文件:ExpressionManager.java   
public OWLClassExpression visit(OWLObjectAllValuesFrom d) {
    OWLClassExpression filler=getComplementNNF(d.getFiller());
    return m_factory.getOWLObjectSomeValuesFrom(d.getProperty().getSimplified(),filler);
}
项目:elk-reasoner    文件:AbstractElkObjectConverter.java   
@Override
public OWLObjectAllValuesFrom visit(ElkObjectAllValuesFrom expression) {
    return owlFactory_.getOWLObjectAllValuesFrom(
            convert(expression.getProperty()),
            convert(expression.getFiller()));
}
项目:elk-reasoner    文件:OwlClassExpressionConverterVisitor.java   
@Override
public ElkObjectAllValuesFrom visit(
        OWLObjectAllValuesFrom owlObjectAllValuesFrom) {
    return CONVERTER.convert(owlObjectAllValuesFrom);
}
项目:elk-reasoner    文件:OwlConverter.java   
@SuppressWarnings("static-method")
public ElkObjectAllValuesFrom convert(
        OWLObjectAllValuesFrom owlObjectAllValuesFrom) {
    return new ElkObjectAllValuesFromWrap<OWLObjectAllValuesFrom>(
            owlObjectAllValuesFrom);
}
项目:Hermit_1.3.8_android    文件:BuiltInPropertyManager.java   
public void visit(OWLObjectAllValuesFrom object) {
    visitProperty(object.getProperty());
    object.getFiller().accept(this);
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public void visit(OWLObjectPropertyDomainAxiom axiom) {
    OWLObjectAllValuesFrom allPropertyNohting=m_factory.getOWLObjectAllValuesFrom(axiom.getProperty().getSimplified(),m_factory.getOWLNothing());
    m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { positive(axiom.getDomain()),allPropertyNohting });
    m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(axiom.getProperty().getNamedProperty());
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public void visit(OWLObjectPropertyRangeAxiom axiom) {
    OWLObjectAllValuesFrom allPropertyRange=m_factory.getOWLObjectAllValuesFrom(axiom.getProperty().getSimplified(),positive(axiom.getRange()));
    m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { allPropertyRange });
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public Boolean visit(OWLObjectAllValuesFrom object) {
    return object.getFiller().accept(this);
}
项目:Hermit_1.3.8_android    文件:OWLAxiomsExpressivity.java   
public void visit(OWLObjectAllValuesFrom object) {
    visitProperty(object.getProperty());
    object.getFiller().accept(this);
}
项目:Hermit_1.3.8_android    文件:ExpressionManager.java   
public OWLClassExpression visit(OWLObjectAllValuesFrom d) {
    OWLClassExpression filler=getNNF(d.getFiller());
    return m_factory.getOWLObjectAllValuesFrom(d.getProperty().getSimplified(),filler);
}
项目:Hermit_1.3.8_android    文件:ExpressionManager.java   
public OWLClassExpression visit(OWLObjectAllValuesFrom d) {
    OWLClassExpression filler=getComplementNNF(d.getFiller());
    return m_factory.getOWLObjectSomeValuesFrom(d.getProperty().getSimplified(),filler);
}
项目:owltools    文件:DescriptionTreeSimilarity.java   
/**
 * makes a reduced union expression.
 * 
 * Uses the following two reduction rules:
 * 
 * (r1 some X) U (r2 some Y) ==> lcs(r1,r2) some MakeUnionOf(X,Y)
 * (r1 some X) U X ==> reflexive-version-of-r1 some X
 * 
 * TODO: test for (r some r some X) u (r some X) cases. needs to be done over final expression.
 *  
 * if a reduced form cannot be made, returns null
 * 
 * @param xa
 * @param xb
 * @return class expression
 */
private OWLClassExpression makeUnionUsingReflexiveProperty(OWLClassExpression xa, OWLClassExpression xb) {
    LOG.info("testing if there is a more compact union expression for "+xa+" ++ "+xb);
    OWLDataFactory df = graph.getDataFactory();
    if (xa instanceof OWLQuantifiedRestriction) {
        // TODO - check before casting
        OWLObjectProperty prop = (OWLObjectProperty) ((OWLQuantifiedRestriction) xa).getProperty();
        OWLClassExpression xaRest = (OWLClassExpression) ((OWLQuantifiedRestriction)xa).getFiller();
        if (xb instanceof OWLQuantifiedRestriction) {
            OWLObjectPropertyExpression p2 =
                propertySubsumer(prop, 
                    ((OWLQuantifiedObjectRestriction) xb).getProperty());

            if (p2 != null) {
                OWLClassExpression xbRest = (OWLClassExpression) ((OWLQuantifiedRestriction)xb).getFiller();
                OWLClassExpression x = makeUnionWithReduction(xaRest,xbRest);
                // todo - mixing some and all
                if (xa instanceof OWLObjectSomeValuesFrom)
                    return df.getOWLObjectSomeValuesFrom(p2,x);
                else if (xa instanceof OWLObjectAllValuesFrom)
                    return df.getOWLObjectAllValuesFrom(p2, x);
            }
        }
        LOG.info("  test: "+xaRest+" == "+xb);


        if (xaRest.equals(xb)) {
            LOG.info("     TRUE: "+xaRest+" == "+xb);

            OWLObjectProperty rprop = null;
            if (graph.getIsReflexive(prop)) {
                rprop = prop;
            }
            if (forceReflexivePropertyCreation) {
                OWLOntologyManager manager = graph.getManager();
                OWLOntology ont = graph.getSourceOntology();
                rprop = 
                    df.getOWLObjectProperty(IRI.create(prop.getIRI().toString()+"_reflexive"));
                manager.applyChange(new AddAxiom(ont, df.getOWLSubObjectPropertyOfAxiom(prop, rprop)));
                manager.applyChange(new AddAxiom(ont, df.getOWLTransitiveObjectPropertyAxiom(rprop)));
                LOG.info("  reflexive prop:"+rprop);

            }
            if (rprop != null) {
                if (xa instanceof OWLObjectSomeValuesFrom)
                    return df.getOWLObjectSomeValuesFrom(rprop,xb);
                else if (xa instanceof OWLObjectAllValuesFrom)
                    return df.getOWLObjectAllValuesFrom(rprop, xb);
            }

        }
    }
    return null;
}
项目:owltools    文件:CardinalityContraintsTools.java   
@Override
public HandlerResult visit(OWLObjectAllValuesFrom ce) {
    return ce.getFiller().accept(this);
}
项目:Wolpertinger    文件:OWLNormalization.java   
public void visit(OWLObjectPropertyDomainAxiom axiom) {
    OWLObjectAllValuesFrom allPropertyNohting=m_factory.getOWLObjectAllValuesFrom(axiom.getProperty().getSimplified(),m_factory.getOWLNothing());
    m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { positive(axiom.getDomain()),allPropertyNohting });
    m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(axiom.getProperty().getNamedProperty());
}
项目:Wolpertinger    文件:OWLNormalization.java   
public void visit(OWLObjectPropertyRangeAxiom axiom) {
    OWLObjectAllValuesFrom allPropertyRange=m_factory.getOWLObjectAllValuesFrom(axiom.getProperty().getSimplified(),positive(axiom.getRange()));
    m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { allPropertyRange });
}
项目:Wolpertinger    文件:OWLNormalization.java   
public Boolean visit(OWLObjectAllValuesFrom object) {
    return object.getFiller().accept(this);
}
项目:Wolpertinger    文件:ExpressionManager.java   
public OWLClassExpression visit(OWLObjectAllValuesFrom d) {
    OWLClassExpression filler=getNNF(d.getFiller());
    return m_factory.getOWLObjectAllValuesFrom(d.getProperty().getSimplified(),filler);
}
项目:Wolpertinger    文件:ExpressionManager.java   
public OWLClassExpression visit(OWLObjectAllValuesFrom d) {
    OWLClassExpression filler=getComplementNNF(d.getFiller());
    return m_factory.getOWLObjectSomeValuesFrom(d.getProperty().getSimplified(),filler);
}
项目:Wolpertinger    文件:NiceAxiomPrinter.java   
public void visit(OWLObjectAllValuesFrom arg0) {
    writer.print("ForAll ");
    writer.print(arg0.getProperty().getNamedProperty().getIRI().getFragment());
    writer.print(".");
    arg0.getFiller().accept(this);
}
项目:owl2diagram    文件:ObjectPropertyRestriction.java   
public ObjectPropertyRestriction(ClassBox source, OWLObjectAllValuesFrom ex, OWLHelper helper) throws RendererException {
    super(source, helper.getVertex(getTarget(ex))); 
    this.p = ex.getProperty().asOWLObjectProperty();
    this.role = helper.shorten(this.p.getIRI());
    this.multiplicity = Multiplicity.create(0, (helper.isFunctional(this.p.getIRI()) ? 1 : null));
}
项目:born    文件:ElClassExpressionFilter.java   
@Override
public Boolean visit(OWLObjectAllValuesFrom classExpression) {
    return false;
}