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

项目:HermiT-android    文件:OWLAxioms.java   
public OWLAxioms() {
    m_classes=new HashSet<OWLClass>();
    m_objectProperties=new HashSet<OWLObjectProperty>();
    m_objectPropertiesOccurringInOWLAxioms=new HashSet<OWLObjectProperty>();
    m_complexObjectPropertyExpressions=new HashSet<OWLObjectPropertyExpression>();
    m_dataProperties=new HashSet<OWLDataProperty>();
    m_namedIndividuals=new HashSet<OWLNamedIndividual>();
    m_conceptInclusions=new ArrayList<OWLClassExpression[]>();
    m_dataRangeInclusions=new ArrayList<OWLDataRange[]>();
    m_simpleObjectPropertyInclusions=new ArrayList<OWLObjectPropertyExpression[]>();
    m_complexObjectPropertyInclusions=new ArrayList<ComplexObjectPropertyInclusion>();
    m_disjointObjectProperties=new ArrayList<OWLObjectPropertyExpression[]>();
    m_reflexiveObjectProperties=new HashSet<OWLObjectPropertyExpression>();
    m_irreflexiveObjectProperties=new HashSet<OWLObjectPropertyExpression>();
    m_asymmetricObjectProperties=new HashSet<OWLObjectPropertyExpression>();
    m_disjointDataProperties=new ArrayList<OWLDataPropertyExpression[]>();
    m_dataPropertyInclusions=new ArrayList<OWLDataPropertyExpression[]>();
    m_facts=new HashSet<OWLIndividualAxiom>();
    m_hasKeys=new HashSet<OWLHasKeyAxiom>();
    m_definedDatatypesIRIs=new HashSet<String>();
    m_rules=new HashSet<DisjunctiveRule>();
}
项目:elk-reasoner    文件:ElkReasoner.java   
@Override
public NodeSet<OWLDataProperty> getDisjointDataProperties(
        OWLDataPropertyExpression arg0)
        throws InconsistentOntologyException, FreshEntitiesException,
        ReasonerInterruptedException, TimeOutException {
    LOGGER_.trace("getDisjointDataProperties(OWLDataPropertyExpression)");

    checkInterrupted();
    // TODO Provide implementation
    throw unsupportedOwlApiMethod(
            "getDisjointDataProperties(OWLDataPropertyExpression)");
}
项目:Hermit_1.3.8_android    文件:OWLAxioms.java   
public OWLAxioms() {
    m_classes=new HashSet<OWLClass>();
    m_objectProperties=new HashSet<OWLObjectProperty>();
    m_objectPropertiesOccurringInOWLAxioms=new HashSet<OWLObjectProperty>();
    m_complexObjectPropertyExpressions=new HashSet<OWLObjectPropertyExpression>();
    m_dataProperties=new HashSet<OWLDataProperty>();
    m_namedIndividuals=new HashSet<OWLNamedIndividual>();
    m_conceptInclusions=new ArrayList<OWLClassExpression[]>();
    m_dataRangeInclusions=new ArrayList<OWLDataRange[]>();
    m_simpleObjectPropertyInclusions=new ArrayList<OWLObjectPropertyExpression[]>();
    m_complexObjectPropertyInclusions=new ArrayList<ComplexObjectPropertyInclusion>();
    m_disjointObjectProperties=new ArrayList<OWLObjectPropertyExpression[]>();
    m_reflexiveObjectProperties=new HashSet<OWLObjectPropertyExpression>();
    m_irreflexiveObjectProperties=new HashSet<OWLObjectPropertyExpression>();
    m_asymmetricObjectProperties=new HashSet<OWLObjectPropertyExpression>();
    m_disjointDataProperties=new ArrayList<OWLDataPropertyExpression[]>();
    m_dataPropertyInclusions=new ArrayList<OWLDataPropertyExpression[]>();
    m_facts=new HashSet<OWLIndividualAxiom>();
    m_hasKeys=new HashSet<OWLHasKeyAxiom>();
    m_definedDatatypesIRIs=new HashSet<String>();
    m_rules=new HashSet<DisjunctiveRule>();
}
项目:Wolpertinger    文件:OWLAxioms.java   
public OWLAxioms() {
    m_classes=new HashSet<OWLClass>();
    m_objectProperties=new HashSet<OWLObjectProperty>();
    m_objectPropertiesOccurringInOWLAxioms=new HashSet<OWLObjectProperty>();
    m_complexObjectPropertyExpressions=new HashSet<OWLObjectPropertyExpression>();
    m_dataProperties=new HashSet<OWLDataProperty>();
    m_namedIndividuals=new HashSet<OWLNamedIndividual>();

    m_aspConstraints=new HashSet<ASPConstraint>();
    m_aspRules=new HashSet<ASPRule>();

    m_conceptInclusions=new ArrayList<OWLClassExpression[]>();
    m_dataRangeInclusions=new ArrayList<OWLDataRange[]>();
    m_simpleObjectPropertyInclusions=new ArrayList<OWLObjectPropertyExpression[]>();
    m_complexObjectPropertyInclusions=new ArrayList<ComplexObjectPropertyInclusion>();
    m_disjointObjectProperties=new ArrayList<OWLObjectPropertyExpression[]>();
    m_reflexiveObjectProperties=new HashSet<OWLObjectPropertyExpression>();
    m_irreflexiveObjectProperties=new HashSet<OWLObjectPropertyExpression>();
    m_asymmetricObjectProperties=new HashSet<OWLObjectPropertyExpression>();
    m_disjointDataProperties=new ArrayList<OWLDataPropertyExpression[]>();
    m_dataPropertyInclusions=new ArrayList<OWLDataPropertyExpression[]>();
    m_facts=new HashSet<OWLIndividualAxiom>();
    m_hasKeys=new HashSet<OWLHasKeyAxiom>();
    m_definedDatatypesIRIs=new HashSet<String>();
    m_rules=new HashSet<DisjunctiveRule>();
}
项目:OWL2SPARQL    文件:OWLAxiomToSPARQLConverter.java   
@Override
public void visit(OWLDisjointDataPropertiesAxiom axiom) {
    List<OWLDataPropertyExpression> propertyExpressions = new LinkedList<>(axiom.getProperties());

    for(int i = 0; i < propertyExpressions.size(); i++){
        sparql += "{";
        OWLDataPropertyExpression pe = propertyExpressions.remove(i);
        sparql += subjectVar + "<" + pe.asOWLDataProperty().toStringID() + "> " + objectVar + " .";
        for (OWLDataPropertyExpression pe2 : propertyExpressions) {
            String pattern = subjectVar + "<" + pe2.asOWLDataProperty().toStringID() + "> " + objectVar + " .";
            sparql += notExists(pattern);
        }
        propertyExpressions.add(i, pe);
        sparql += "}";
        if(i < propertyExpressions.size()-1){
            sparql += " UNION ";
        }
    }
}
项目:ontology-core    文件:OWLImporter.java   
private void checkInconsistentProperty(OWLDataProperty dp, OWLDatatype type) {
    for (OWLDataPropertyRangeAxiom a : dprAxioms) {
        OWLDataPropertyExpression pe = a.getProperty();
        OWLDataRange r = a.getRange();
        // TODO: check DataOneOf
        // TODO: check OWLDataIntersectionOf
        OWLDatatype otype = r.asOWLDatatype();

        if (!pe.isAnonymous()) {
            if (!otype.equals(type)) {
                problems.add("The literal value restriction " + dp + " is inconsistent with the data property " +
                        "range axiom " + a);
            }
        } else {
            problems.add("Found anonymous data property expression in data property range axiom: " + pe);
        }
    }
}
项目:logmap-matcher    文件:StructuralReasoner2.java   
public NodeSet<OWLDataProperty> getDisjointDataProperties(OWLDataPropertyExpression pe) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
    ensurePrepared();
    DefaultNodeSet<OWLDataProperty> result = new OWLDataPropertyNodeSet();
    for (OWLOntology ontology : getRootOntology().getImportsClosure()) {
        for (OWLDisjointDataPropertiesAxiom axiom : ontology.getDisjointDataPropertiesAxioms(pe.asOWLDataProperty())) {
            for (OWLDataPropertyExpression dpe : axiom.getPropertiesMinus(pe)) {
                if (!dpe.isAnonymous()) {
                    result.addNode(dataPropertyHierarchyInfo.getEquivalents(dpe.asOWLDataProperty()));
                    result.addAllNodes(getSubDataProperties(dpe.asOWLDataProperty(), false).getNodes());
                }
            }
        }
    }
    return result;
}
项目:logmap-matcher    文件:StructuralReasoner2.java   
public Collection<OWLDataProperty> getParents(OWLDataProperty child) {
    Set<OWLDataProperty> properties = new HashSet<OWLDataProperty>();
    for (OWLDataPropertyExpression prop : child.getSuperProperties(getRootOntology().getImportsClosure())) {
        properties.add(prop.asOWLDataProperty());
    }
    return properties;
}
项目:logmap-matcher    文件:StructuralReasoner2.java   
public Collection<OWLDataProperty> getChildren(OWLDataProperty parent) {
    Set<OWLDataProperty> properties = new HashSet<OWLDataProperty>();
    for (OWLDataPropertyExpression prop : parent.getSubProperties(getRootOntology().getImportsClosure())) {
        properties.add(prop.asOWLDataProperty());
    }
    return properties;
}
项目:HermiT-android    文件:OWLNormalization.java   
public void visit(OWLSubDataPropertyOfAxiom axiom) {
    OWLDataPropertyExpression subDataProperty=axiom.getSubProperty();
    checkTopDataPropertyUse(subDataProperty,axiom);
    OWLDataPropertyExpression superDataProperty=axiom.getSuperProperty();
    if (!subDataProperty.isOWLBottomDataProperty() && !superDataProperty.isOWLTopDataProperty())
        addInclusion(subDataProperty,superDataProperty);
}
项目:HermiT-android    文件:OWLNormalization.java   
public void visit(OWLDisjointDataPropertiesAxiom axiom) {
    OWLDataPropertyExpression[] dataProperties=new OWLDataPropertyExpression[axiom.getProperties().size()];
    axiom.getProperties().toArray(dataProperties);
    for (OWLDataPropertyExpression dataProperty : dataProperties)
        checkTopDataPropertyUse(dataProperty,axiom);
    m_axioms.m_disjointDataProperties.add(dataProperties);
}
项目:HermiT-android    文件:OWLNormalization.java   
public void visit(OWLDataPropertyDomainAxiom axiom) {
    OWLDataPropertyExpression dataProperty=axiom.getProperty();
    checkTopDataPropertyUse(dataProperty,axiom);
    OWLDataRange dataNothing=m_factory.getOWLDataComplementOf(m_factory.getTopDatatype());
    OWLDataAllValuesFrom allPropertyDataNothing=m_factory.getOWLDataAllValuesFrom(dataProperty,dataNothing);
    m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { positive(axiom.getDomain()),allPropertyDataNothing });
}
项目:HermiT-android    文件:OWLNormalization.java   
public void visit(OWLHasKeyAxiom axiom) {
    for (OWLDataPropertyExpression dataPropertyExpression : axiom.getDataPropertyExpressions())
        checkTopDataPropertyUse(dataPropertyExpression,axiom);
    OWLClassExpression description=positive(axiom.getClassExpression());
    if (!isSimple(description)) {
        OWLClassExpression definition=getDefinitionFor(description,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { negative(definition),description });
        description=definition;
    }
    m_axioms.m_hasKeys.add(m_factory.getOWLHasKeyAxiom(description,axiom.getPropertyExpressions()));
    for (OWLObjectPropertyExpression objectPropertyExpression : axiom.getObjectPropertyExpressions())
        m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(objectPropertyExpression.getNamedProperty());
}
项目:HermiT-android    文件:OWLNormalization.java   
public OWLClassExpression visit(OWLDataSomeValuesFrom object) {
    OWLDataRange filler=object.getFiller();
    OWLDataPropertyExpression prop=object.getProperty();
    if (prop.isOWLTopDataProperty())
        throwInvalidTopDPUseError(object);
    if (isLiteral(filler))
        return m_factory.getOWLDataSomeValuesFrom(object.getProperty(),filler);
    else {
        OWLDatatype definition=getDefinitionFor(filler,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_newDataRangeInclusions.add(new OWLDataRange[] { negative(definition),filler });
        return m_factory.getOWLDataSomeValuesFrom(object.getProperty(),definition);
    }
}
项目:HermiT-android    文件:OWLNormalization.java   
public OWLClassExpression visit(OWLDataAllValuesFrom object) {
    OWLDataRange filler=object.getFiller();
    OWLDataPropertyExpression prop=object.getProperty();
    if (prop.isOWLTopDataProperty())
        throwInvalidTopDPUseError(object);
    if (isLiteral(filler))
        return m_factory.getOWLDataAllValuesFrom(prop,filler);
    else {
        OWLDatatype definition=getDefinitionFor(filler,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_newDataRangeInclusions.add(new OWLDataRange[] { negative(definition),filler });
        return m_factory.getOWLDataAllValuesFrom(prop,definition);
    }
}
项目:HermiT-android    文件:OWLNormalization.java   
public OWLClassExpression visit(OWLDataMinCardinality object) {
    OWLDataRange filler=object.getFiller();
    OWLDataPropertyExpression prop=object.getProperty();
    if (prop.isOWLTopDataProperty())
        throwInvalidTopDPUseError(object);
    if (isLiteral(filler))
        return m_factory.getOWLDataMinCardinality(object.getCardinality(),prop,filler);
    else {
        OWLDatatype definition=getDefinitionFor(filler,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_newDataRangeInclusions.add(new OWLDataRange[] { negative(definition),filler });
        return m_factory.getOWLDataMinCardinality(object.getCardinality(),prop,definition);
    }
}
项目:HermiT-android    文件:OWLNormalization.java   
public OWLClassExpression visit(OWLDataMaxCardinality object) {
    OWLDataRange filler=object.getFiller();
    OWLDataPropertyExpression prop=object.getProperty();
    if (prop.isOWLTopDataProperty())
        throwInvalidTopDPUseError(object);
    if (isLiteral(filler))
        return m_factory.getOWLDataMaxCardinality(object.getCardinality(),prop,filler);
    else {
        OWLDataRange complementDescription=m_expressionManager.getComplementNNF(filler);
        OWLDatatype definition=getDefinitionFor(complementDescription,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_newDataRangeInclusions.add(new OWLDataRange[] { negative(definition),filler });
        return m_factory.getOWLDataMaxCardinality(object.getCardinality(),prop,m_expressionManager.getComplementNNF(definition));
    }
}
项目:HermiT-android    文件:OWLClausification.java   
protected static Atom getRoleAtom(OWLDataPropertyExpression dataProperty,Term first,Term second) {
    if (dataProperty instanceof OWLDataProperty) {
        AtomicRole property=AtomicRole.create(((OWLDataProperty)dataProperty).getIRI().toString());
        return Atom.create(property,first,second);
    }
    else
        throw new IllegalStateException("Internal error: unsupported type of data property!");
}
项目:HermiT-android    文件:ReducedABoxOnlyClausification.java   
protected Atom getRoleAtom(OWLDataPropertyExpression dataProperty,Term first,Term second) {
    AtomicRole atomicRole;
    if (dataProperty instanceof OWLDataProperty)
        atomicRole=AtomicRole.create(((OWLDataProperty)dataProperty).getIRI().toString());
    else
        throw new IllegalStateException("Internal error: unsupported type of data property!");
    if (m_allAtomicDataRoles.contains(atomicRole))
        return Atom.create(atomicRole,first,second);
    else
        throw new IllegalArgumentException("Internal error: fresh properties in property assertions are not compatible with incremental ABox loading!");
}
项目:HermiT-android    文件:EntailmentChecker.java   
public Boolean visit(OWLEquivalentDataPropertiesAxiom axiom) {
    Set<OWLDataPropertyExpression> props=axiom.getProperties();
    Iterator<OWLDataPropertyExpression> it=props.iterator();
    if (it.hasNext()) {
        OWLDataProperty prop1=it.next().asOWLDataProperty();
        while (it.hasNext()) {
            OWLDataProperty dataProperty1=prop1.asOWLDataProperty();
            OWLDataProperty dataProperty2=it.next().asOWLDataProperty();
            if (!reasoner.isSubDataPropertyOf(dataProperty1,dataProperty2) || !reasoner.isSubDataPropertyOf(dataProperty2,dataProperty1))
                return Boolean.FALSE;
        }
    }
    return Boolean.TRUE;
}
项目:HermiT-android    文件:EntailmentChecker.java   
public Boolean visit(OWLDisjointDataPropertiesAxiom axiom) {
    int n=axiom.getProperties().size();
    OWLDataPropertyExpression[] props=axiom.getProperties().toArray(new OWLDataPropertyExpression[n]);
    for (int i=0;i<n-1;i++) {
        for (int j=i+1;j<n;j++) {
            OWLDataSomeValuesFrom some_i=factory.getOWLDataSomeValuesFrom(props[i],factory.getOWLDatatype(IRI.create(InternalDatatype.RDFS_LITERAL.getIRI())));
            OWLDataSomeValuesFrom some_j=factory.getOWLDataSomeValuesFrom(props[j],factory.getOWLDatatype(IRI.create(InternalDatatype.RDFS_LITERAL.getIRI())));
            OWLDataMaxCardinality max1=factory.getOWLDataMaxCardinality(1,factory.getOWLDataProperty(IRI.create(AtomicRole.TOP_DATA_ROLE.getIRI())));
            OWLClassExpression desc=factory.getOWLObjectIntersectionOf(some_i,some_j,max1);
            if (reasoner.isSatisfiable(desc))
                return Boolean.FALSE;
        }
    }
    return Boolean.TRUE;
}
项目:elk-reasoner    文件:AbstractElkObjectConverter.java   
Set<OWLDataPropertyExpression> toDataPropertyExpressionSet(
        List<? extends ElkDataPropertyExpression> input) {
    Set<OWLDataPropertyExpression> result = new HashSet<OWLDataPropertyExpression>(
            input.size());
    for (ElkDataPropertyExpression next : input) {
        result.add(convert(next));
    }
    return result;
}
项目:elk-reasoner    文件:ElkEquivalentDataPropertiesAxiomWrap.java   
@Override
public List<? extends ElkDataPropertyExpression> getDataPropertyExpressions() {
    List<ElkDataPropertyExpression> result = new ArrayList<ElkDataPropertyExpression>();
    for (OWLDataPropertyExpression dpe : this.owlObject.getProperties()) {
        result.add(converter.convert(dpe));
    }
    return result;
}
项目:elk-reasoner    文件:ElkDisjointDataPropertiesAxiomWrap.java   
@Override
public List<? extends ElkDataPropertyExpression> getDataPropertyExpressions() {
    List<ElkDataPropertyExpression> result = new ArrayList<ElkDataPropertyExpression>();
    for (OWLDataPropertyExpression dpe : this.owlObject.getProperties()) {
        result.add(converter.convert(dpe));
    }
    return result;
}
项目:elk-reasoner    文件:ElkHasKeyAxiomWrap.java   
@Override
public List<? extends ElkDataPropertyExpression> getDataPropertyExpressions() {
    List<ElkDataPropertyExpression> dpes = new ArrayList<ElkDataPropertyExpression>(
            this.owlObject.getDataPropertyExpressions().size());
    for (OWLDataPropertyExpression dpe : this.owlObject
            .getDataPropertyExpressions()) {
        dpes.add(converter.convert(dpe));
    }

    return dpes;
}
项目:elk-reasoner    文件:ElkConverter.java   
@Override
public OWLDataPropertyExpression convert(ElkDataPropertyExpression input) {
    if (input instanceof ElkDataPropertyExpressionWrap<?>) {
        return ((ElkDataPropertyExpressionWrap<?>) input).getOwlObject();
    }
    // else
    return (OWLDataPropertyExpression) input.accept(this);
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public void visit(OWLSubDataPropertyOfAxiom axiom) {
    OWLDataPropertyExpression subDataProperty=axiom.getSubProperty();
    checkTopDataPropertyUse(subDataProperty,axiom);
    OWLDataPropertyExpression superDataProperty=axiom.getSuperProperty();
    if (!subDataProperty.isOWLBottomDataProperty() && !superDataProperty.isOWLTopDataProperty())
        addInclusion(subDataProperty,superDataProperty);
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public void visit(OWLDisjointDataPropertiesAxiom axiom) {
    OWLDataPropertyExpression[] dataProperties=new OWLDataPropertyExpression[axiom.getProperties().size()];
    axiom.getProperties().toArray(dataProperties);
    for (OWLDataPropertyExpression dataProperty : dataProperties)
        checkTopDataPropertyUse(dataProperty,axiom);
    m_axioms.m_disjointDataProperties.add(dataProperties);
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public void visit(OWLDataPropertyDomainAxiom axiom) {
    OWLDataPropertyExpression dataProperty=axiom.getProperty();
    checkTopDataPropertyUse(dataProperty,axiom);
    OWLDataRange dataNothing=m_factory.getOWLDataComplementOf(m_factory.getTopDatatype());
    OWLDataAllValuesFrom allPropertyDataNothing=m_factory.getOWLDataAllValuesFrom(dataProperty,dataNothing);
    m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { positive(axiom.getDomain()),allPropertyDataNothing });
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public void visit(OWLHasKeyAxiom axiom) {
    for (OWLDataPropertyExpression dataPropertyExpression : axiom.getDataPropertyExpressions())
        checkTopDataPropertyUse(dataPropertyExpression,axiom);
    OWLClassExpression description=positive(axiom.getClassExpression());
    if (!isSimple(description)) {
        OWLClassExpression definition=getDefinitionFor(description,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { negative(definition),description });
        description=definition;
    }
    m_axioms.m_hasKeys.add(m_factory.getOWLHasKeyAxiom(description,axiom.getPropertyExpressions()));
    for (OWLObjectPropertyExpression objectPropertyExpression : axiom.getObjectPropertyExpressions())
        m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(objectPropertyExpression.getNamedProperty());
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public OWLClassExpression visit(OWLDataSomeValuesFrom object) {
    OWLDataRange filler=object.getFiller();
    OWLDataPropertyExpression prop=object.getProperty();
    if (prop.isOWLTopDataProperty())
        throwInvalidTopDPUseError(object);
    if (isLiteral(filler))
        return m_factory.getOWLDataSomeValuesFrom(object.getProperty(),filler);
    else {
        OWLDatatype definition=getDefinitionFor(filler,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_newDataRangeInclusions.add(new OWLDataRange[] { negative(definition),filler });
        return m_factory.getOWLDataSomeValuesFrom(object.getProperty(),definition);
    }
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public OWLClassExpression visit(OWLDataAllValuesFrom object) {
    OWLDataRange filler=object.getFiller();
    OWLDataPropertyExpression prop=object.getProperty();
    if (prop.isOWLTopDataProperty())
        throwInvalidTopDPUseError(object);
    if (isLiteral(filler))
        return m_factory.getOWLDataAllValuesFrom(prop,filler);
    else {
        OWLDatatype definition=getDefinitionFor(filler,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_newDataRangeInclusions.add(new OWLDataRange[] { negative(definition),filler });
        return m_factory.getOWLDataAllValuesFrom(prop,definition);
    }
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public OWLClassExpression visit(OWLDataMinCardinality object) {
    OWLDataRange filler=object.getFiller();
    OWLDataPropertyExpression prop=object.getProperty();
    if (prop.isOWLTopDataProperty())
        throwInvalidTopDPUseError(object);
    if (isLiteral(filler))
        return m_factory.getOWLDataMinCardinality(object.getCardinality(),prop,filler);
    else {
        OWLDatatype definition=getDefinitionFor(filler,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_newDataRangeInclusions.add(new OWLDataRange[] { negative(definition),filler });
        return m_factory.getOWLDataMinCardinality(object.getCardinality(),prop,definition);
    }
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public OWLClassExpression visit(OWLDataMaxCardinality object) {
    OWLDataRange filler=object.getFiller();
    OWLDataPropertyExpression prop=object.getProperty();
    if (prop.isOWLTopDataProperty())
        throwInvalidTopDPUseError(object);
    if (isLiteral(filler))
        return m_factory.getOWLDataMaxCardinality(object.getCardinality(),prop,filler);
    else {
        OWLDataRange complementDescription=m_expressionManager.getComplementNNF(filler);
        OWLDatatype definition=getDefinitionFor(complementDescription,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_newDataRangeInclusions.add(new OWLDataRange[] { negative(definition),filler });
        return m_factory.getOWLDataMaxCardinality(object.getCardinality(),prop,m_expressionManager.getComplementNNF(definition));
    }
}
项目:Hermit_1.3.8_android    文件:OWLClausification.java   
protected static Atom getRoleAtom(OWLDataPropertyExpression dataProperty,Term first,Term second) {
    if (dataProperty instanceof OWLDataProperty) {
        AtomicRole property=AtomicRole.create(((OWLDataProperty)dataProperty).getIRI().toString());
        return Atom.create(property,first,second);
    }
    else
        throw new IllegalStateException("Internal error: unsupported type of data property!");
}
项目:Hermit_1.3.8_android    文件:ReducedABoxOnlyClausification.java   
protected Atom getRoleAtom(OWLDataPropertyExpression dataProperty,Term first,Term second) {
    AtomicRole atomicRole;
    if (dataProperty instanceof OWLDataProperty)
        atomicRole=AtomicRole.create(((OWLDataProperty)dataProperty).getIRI().toString());
    else
        throw new IllegalStateException("Internal error: unsupported type of data property!");
    if (m_allAtomicDataRoles.contains(atomicRole))
        return Atom.create(atomicRole,first,second);
    else
        throw new IllegalArgumentException("Internal error: fresh properties in property assertions are not compatible with incremental ABox loading!");
}
项目:Hermit_1.3.8_android    文件:EntailmentChecker.java   
public Boolean visit(OWLEquivalentDataPropertiesAxiom axiom) {
    Set<OWLDataPropertyExpression> props=axiom.getProperties();
    Iterator<OWLDataPropertyExpression> it=props.iterator();
    if (it.hasNext()) {
        OWLDataProperty prop1=it.next().asOWLDataProperty();
        while (it.hasNext()) {
            OWLDataProperty dataProperty1=prop1.asOWLDataProperty();
            OWLDataProperty dataProperty2=it.next().asOWLDataProperty();
            if (!reasoner.isSubDataPropertyOf(dataProperty1,dataProperty2) || !reasoner.isSubDataPropertyOf(dataProperty2,dataProperty1))
                return Boolean.FALSE;
        }
    }
    return Boolean.TRUE;
}
项目:Hermit_1.3.8_android    文件:EntailmentChecker.java   
public Boolean visit(OWLDisjointDataPropertiesAxiom axiom) {
    int n=axiom.getProperties().size();
    OWLDataPropertyExpression[] props=axiom.getProperties().toArray(new OWLDataPropertyExpression[n]);
    for (int i=0;i<n-1;i++) {
        for (int j=i+1;j<n;j++) {
            OWLDataSomeValuesFrom some_i=factory.getOWLDataSomeValuesFrom(props[i],factory.getOWLDatatype(IRI.create(InternalDatatype.RDFS_LITERAL.getIRI())));
            OWLDataSomeValuesFrom some_j=factory.getOWLDataSomeValuesFrom(props[j],factory.getOWLDatatype(IRI.create(InternalDatatype.RDFS_LITERAL.getIRI())));
            OWLDataMaxCardinality max1=factory.getOWLDataMaxCardinality(1,factory.getOWLDataProperty(IRI.create(AtomicRole.TOP_DATA_ROLE.getIRI())));
            OWLClassExpression desc=factory.getOWLObjectIntersectionOf(some_i,some_j,max1);
            if (reasoner.isSatisfiable(desc))
                return Boolean.FALSE;
        }
    }
    return Boolean.TRUE;
}
项目:owltools    文件:GraphReasoner.java   
public NodeSet<OWLDataProperty> getDisjointDataProperties(
        OWLDataPropertyExpression pe) throws InconsistentOntologyException,
        FreshEntitiesException, ReasonerInterruptedException,
        TimeOutException {
    // TODO Auto-generated method stub
    return null;
}
项目:Wolpertinger    文件:OWLNormalization.java   
public void visit(OWLSubDataPropertyOfAxiom axiom) {
    OWLDataPropertyExpression subDataProperty=axiom.getSubProperty();
    checkTopDataPropertyUse(subDataProperty,axiom);
    OWLDataPropertyExpression superDataProperty=axiom.getSuperProperty();
    if (!subDataProperty.isOWLBottomDataProperty() && !superDataProperty.isOWLTopDataProperty())
        addInclusion(subDataProperty,superDataProperty);
}