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

项目:minerva    文件:CoreMolecularModelManager.java   
public void removeDataProperty(ModelContainer model,
        OWLNamedIndividual i, OWLDataProperty prop, OWLLiteral literal,
        METADATA metadata) {
    OWLAxiom toRemove = null;
    Set<OWLDataPropertyAssertionAxiom> existing = model.getAboxOntology().getDataPropertyAssertionAxioms(i);
    for (OWLDataPropertyAssertionAxiom ax : existing) {
        if (prop.equals(ax.getProperty()) && literal.equals(ax.getObject())) {
            toRemove = ax;
            break;
        }
    }

    if (toRemove != null) {
        removeAxiom(model, toRemove, metadata);
    }
}
项目: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>();
}
项目:Hermit_1.3.8_android    文件:Reasoner.java   
public boolean hasDataPropertyRelationship(OWLNamedIndividual subject,
        OWLDataProperty property, OWLLiteral object) {
    checkPreConditions(subject, property);
    if (!m_isConsistent)
        return true;
    OWLDataFactory factory = getDataFactory();
    OWLAxiom notAssertion = factory
            .getOWLNegativeDataPropertyAssertionAxiom(property, subject,
                    object);
    Tableau tableau = getTableau(notAssertion);
    boolean result = tableau.isSatisfiable(true, true, null, null, null,
            null, null, new ReasoningTaskDescription(true,
                    "is {0} connected to {1} via {2}", H(subject), object,
                    H(property)));
    tableau.clearAdditionalDLOntology();
    return !result;
}
项目:skoseditor    文件:SKOSDataPropertyAssertionsFrame.java   
public SKOSDataPropertyAssertionsFrame(OWLEditorKit owlEditorKit) {
        super(owlEditorKit.getModelManager().getOWLOntologyManager());
        Set<OWLDataProperty> filterProps = new HashSet<OWLDataProperty>(7);

//        addSection(new SKOSDataPropertyAssertionAxiomFrameSection(owlEditorKit, this, owlEditorKit.getModelManager().getOWLDataFactory().getOWLDataProperty(SKOSVocabulary.PREFLABEL.getIRI()), "SKOS preferred label"));
//        filterProps.add(owlEditorKit.getModelManager().getOWLDataFactory().getOWLDataProperty(SKOSVocabulary.PREFLABEL.getIRI()));
        addSection(new SKOSDataPropertyAssertionAxiomFrameSection(owlEditorKit, this, owlEditorKit.getModelManager().getOWLDataFactory().getOWLDataProperty(SKOSVocabulary.NOTATION  .getIRI()), "SKOS notation"));
        filterProps.add(owlEditorKit.getModelManager().getOWLDataFactory().getOWLDataProperty(SKOSVocabulary.NOTATION.getIRI()));
//        addSection(new SKOSDataPropertyAssertionAxiomFrameSection(owlEditorKit, this, owlEditorKit.getModelManager().getOWLDataFactory().getOWLDataProperty(SKOSVocabulary.ALTLABEL.getIRI()), "SKOS alternate label"));
//        filterProps.add(owlEditorKit.getModelManager().getOWLDataFactory().getOWLDataProperty(SKOSVocabulary.ALTLABEL.getIRI()));
//        addSection(new SKOSDataPropertyAssertionAxiomFrameSection(owlEditorKit, this, owlEditorKit.getModelManager().getOWLDataFactory().getOWLDataProperty(SKOSVocabulary.HIDDENLABEL.getIRI()), "SKOS hidden label"));
//        filterProps.add(owlEditorKit.getModelManager().getOWLDataFactory().getOWLDataProperty(SKOSVocabulary.HIDDENLABEL.getIRI()));
        addSection(new SKOSOtherDataPropertyAssertionAxiomFrameSection(owlEditorKit, this, filterProps));

//        addSection(new OWLDataPropertyAssertionAxiomFrameSection(owlEditorKit, this));
//        addSection(new OWLNegativeObjectPropertyAssertionFrameSection(owlEditorKit, this));
//        addSection(new OWLNegativeDataPropertyAssertionFrameSection(owlEditorKit, this));
    }
项目:HermiT-android    文件:Reasoner.java   
protected boolean isFunctional(OWLDataProperty property) {
    checkPreConditions(property);
    if (!m_isConsistent)
        return true;
    AtomicRole atomicRole = H(property);
    Individual freshIndividual = Individual
            .createAnonymous("fresh-individual");
    Constant freshConstantA = Constant.createAnonymous("fresh-constant-A");
    Constant freshConstantB = Constant.createAnonymous("fresh-constant-B");
    Set<Atom> assertions = new HashSet<Atom>();
    assertions.add(atomicRole.getRoleAssertion(freshIndividual,
            freshConstantA));
    assertions.add(atomicRole.getRoleAssertion(freshIndividual,
            freshConstantB));
    assertions.add(Atom.create(Inequality.INSTANCE, freshConstantA,
            freshConstantB));
    return !getTableau().isSatisfiable(
            false,
            assertions,
            null,
            null,
            null,
            null,
            new ReasoningTaskDescription(true, "functionality of {0}",
                    atomicRole));
}
项目:HermiT-android    文件:Reasoner.java   
public boolean hasDataPropertyRelationship(OWLNamedIndividual subject,
        OWLDataProperty property, OWLLiteral object) {
    checkPreConditions(subject, property);
    if (!m_isConsistent)
        return true;
    OWLDataFactory factory = getDataFactory();
    OWLAxiom notAssertion = factory
            .getOWLNegativeDataPropertyAssertionAxiom(property, subject,
                    object);
    Tableau tableau = getTableau(notAssertion);
    boolean result = tableau.isSatisfiable(true, true, null, null, null,
            null, null, new ReasoningTaskDescription(true,
                    "is {0} connected to {1} via {2}", H(subject), object,
                    H(property)));
    tableau.clearAdditionalDLOntology();
    return !result;
}
项目:HermiT-android    文件:OWLNormalization.java   
public void visit(SWRLDataRangeAtom atom) {
    if (atom.getArgument() instanceof SWRLVariable)
        throwVarError(atom);
    // dr(literal) :-
    // convert to: ClassAssertion(DataSomeValuesFrom(freshDP DataOneOf(literal)) freshIndividual)
    // and top -> \forall freshDP.dr
    OWLLiteral lit=((SWRLLiteralArgument)atom.getArgument()).getLiteral();
    OWLDataRange dr=atom.getPredicate();
    OWLNamedIndividual freshIndividual=getFreshIndividual();
    OWLDataProperty freshDP=getFreshDataProperty();
    OWLDataSomeValuesFrom some=m_factory.getOWLDataSomeValuesFrom(freshDP,m_factory.getOWLDataOneOf(lit));
    OWLClassExpression definition=getDefinitionFor(some,m_alreadyExists);
    if (!m_alreadyExists[0])
        m_newInclusions.add(new OWLClassExpression[] { negative(definition),some });
    addFact(m_factory.getOWLClassAssertionAxiom(definition,freshIndividual));
    m_newInclusions.add(new OWLClassExpression[] { m_factory.getOWLDataAllValuesFrom(freshDP,dr) });
}
项目: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>();
}
项目:OntoBench    文件:AbstractDatatypeMapFeature.java   
@Override
public void addToOntology() {
  OWLClass domain = featurePool.getExclusiveClass(":DatatypeMapsDomain");
  OWLDatatype range = factory.getOWLDatatype(datatype);

  String namespace = datatype.getPrefixedName().split(":")[0];
  String name = datatype.getShortForm();
  String propertyIri = ":" + namespace + WordUtils.capitalize(name) + "Property";
  OWLDataProperty property = factory.getOWLDataProperty(propertyIri, pm);

  addProperty(domain, property, range);
}
项目:OntoBench    文件:OwlNegativeDataPropertyAssertionFeature.java   
@Override
public void addToOntology() {
  OWLNamedIndividual source = factory.getOWLNamedIndividual(":NegativeDataPropertyAssertion_SourceIndividual", pm);
  OWLLiteral target = factory.getOWLLiteral("NegativeDataPropertyAssertion_TargetValue");
  OWLDataProperty property = factory.getOWLDataProperty(":negativeDataPropertyAssertionProperty", pm);

  addAxiomToOntology(factory.getOWLNegativeDataPropertyAssertionAxiom(property, source, target));
}
项目:OntoBench    文件:OwlDataQualifiedCardinalityFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataExactQualifiedCardinality", pm);
  OWLDatatype datatype = OWL2Datatype.XSD_STRING.getDatatype(factory);
  addToGenericDomainAndNewRange(property, datatype);

  OWLDatatype affectedDatatype = OWL2Datatype.XSD_DATE_TIME.getDatatype(factory);
  OWLDataExactCardinality cardinality = factory.getOWLDataExactCardinality(12, property, affectedDatatype);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(featurePool.getExclusiveClass(":DataExactQualifiedCardinalityRange"), cardinality));
}
项目:OntoBench    文件:OwlDataMaxQualifiedCardinalityOwl2RlFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataMaxQualifiedCardinality_RL", pm);
  OWLDatatype datatype = OWL2Datatype.RDFS_LITERAL.getDatatype(factory);
  addToGenericDomainAndNewRange(property, datatype);

  OWLDatatype affectedDatatype = OWL2Datatype.XSD_BYTE.getDatatype(factory);
  OWLDataMaxCardinality cardinality = factory.getOWLDataMaxCardinality(1, property, affectedDatatype);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(featurePool.getExclusiveClass(":DataMaxQualifiedCardinalityRange_RL"), cardinality));
}
项目:OntoBench    文件:OwlDataMinCardinalityFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataMinCardinality", pm);
  OWLDatatype datatype = OWL2Datatype.XSD_BOOLEAN.getDatatype(factory);
  addToGenericDomainAndNewRange(property, datatype);

  OWLClass range = featurePool.getExclusiveClass(":DataMinCardinalityRange");
  OWLDataMinCardinality cardinality = factory.getOWLDataMinCardinality(3, property);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, cardinality));
}
项目:OntoBench    文件:OwlDataMinQualifiedCardinalityFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataMinQualifiedCardinality", pm);
  OWLDatatype datatype = OWL2Datatype.XSD_FLOAT.getDatatype(factory);
  addToGenericDomainAndNewRange(property, datatype);

  OWLDatatype affectedDatatype = OWL2Datatype.XSD_DATE_TIME.getDatatype(factory);
  OWLDataMinCardinality cardinality = factory.getOWLDataMinCardinality(9, property, affectedDatatype);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(featurePool.getExclusiveClass(":DataMinQualifiedCardinalityRange"), cardinality));
}
项目:OntoBench    文件:OwlDataMaxCardinalityOwl2RlFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataMaxCardinality_RL", pm);
  OWLDatatype datatype = OWL2Datatype.XSD_FLOAT.getDatatype(factory);
  addToGenericDomainAndNewRange(property, datatype);

  OWLClass range = featurePool.getExclusiveClass(":DataMaxCardinalityRange_RL");
  OWLDataMaxCardinality cardinality = factory.getOWLDataMaxCardinality(1, property);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, cardinality));
}
项目:OntoBench    文件:OwlDataMaxQualifiedCardinalityFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataMaxQualifiedCardinality", pm);
  OWLDatatype datatype = OWL2Datatype.RDFS_LITERAL.getDatatype(factory);
  addToGenericDomainAndNewRange(property, datatype);

  OWLDatatype affectedDatatype = OWL2Datatype.XSD_BYTE.getDatatype(factory);
  OWLDataMaxCardinality cardinality = factory.getOWLDataMaxCardinality(18, property, affectedDatatype);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(featurePool.getExclusiveClass(":DataMaxQualifiedCardinalityRange"), cardinality));
}
项目:OntoBench    文件:OwlDataMaxCardinalityFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataMaxCardinality", pm);
  OWLDatatype datatype = OWL2Datatype.XSD_FLOAT.getDatatype(factory);
  addToGenericDomainAndNewRange(property, datatype);

  OWLClass range = featurePool.getExclusiveClass(":DataMaxCardinalityRange");
  OWLDataMaxCardinality cardinality = factory.getOWLDataMaxCardinality(19, property);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, cardinality));
}
项目:OntoBench    文件:OwlDataCardinalityFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataExactCardinality", pm);
  OWLDatatype datatype = OWL2Datatype.XSD_STRING.getDatatype(factory);
  addToGenericDomainAndNewRange(property, datatype);

  OWLClass range = featurePool.getExclusiveClass(":DataExactCardinalityRange");
  OWLDataExactCardinality cardinality = factory.getOWLDataExactCardinality(11, property);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, cardinality));
}
项目:OntoBench    文件:OwlDataHasValueFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataHasValueProperty", pm);

  OWLDataHasValue restriction = factory.getOWLDataHasValue(property, factory.getOWLLiteral(6));
  addToGenericDomainAndNewRange(property, OWL2Datatype.XSD_NON_NEGATIVE_INTEGER.getDatatype(factory));

  OWLClass hasValue = featurePool.getExclusiveClass(":DataHasValue");
  addAxiomToOntology(factory.getOWLSubClassOfAxiom(hasValue, restriction));
}
项目:OntoBench    文件:OwlDataSomeValuesFromOwl2RlFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataSomeValuesFromProperty_RL", pm);
  OWLDatatype datatype = OWL2Datatype.XSD_DATE_TIME.getDatatype(factory);

  OWLClass range = featurePool.getExclusiveClass(":DataSomeValuesFrom_RL");
  OWLDataSomeValuesFrom restriction = factory.getOWLDataSomeValuesFrom(property, datatype);
  addAxiomToOntology(factory.getOWLSubClassOfAxiom(restriction, range));
}
项目:OntoBench    文件:OwlDataSomeValuesFromFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataSomeValuesFromProperty", pm);
  OWLDatatype datatype = OWL2Datatype.XSD_DATE_TIME.getDatatype(factory);

  OWLClass someValuesFrom = featurePool.getExclusiveClass(":DataSomeValuesFrom");
  OWLDataSomeValuesFrom restriction = factory.getOWLDataSomeValuesFrom(property, datatype);
  addAxiomToOntology(factory.getOWLSubClassOfAxiom(someValuesFrom, restriction));
}
项目:OntoBench    文件:OwlDataAllValuesFromFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataAllValuesFromProperty", pm);
  OWLDatatype value = OWL2Datatype.XSD_INTEGER.getDatatype(factory);
  addToGenericDomainAndNewRange(property, value);

  OWLDataAllValuesFrom restriction = factory.getOWLDataAllValuesFrom(property, value);

  OWLClass allValuesFrom = featurePool.getExclusiveClass(":DataAllValuesFrom");
  addAxiomToOntology(factory.getOWLSubClassOfAxiom(allValuesFrom, restriction));
}
项目:OntoBench    文件:OwlDataUnionOfFeature.java   
@Override
public void addToOntology() {
  OWLDatatype d1 = factory.getOWLDatatype(":DataUnionOf_Datatype1", pm);
  OWLDatatype d2 = factory.getOWLDatatype(":DataUnionOf_Datatype2", pm);
  OWLDataUnionOf union = factory.getOWLDataUnionOf(d1, d2);

  OWLDataProperty property = factory.getOWLDataProperty(":DataUnionOf", pm);
  addToGenericDomainAndNewRange(property, union);
}
项目:OntoBench    文件:OwlDatatypeRestrictionFeature.java   
@Override
public void addToOntology() {
  OWLDatatype datatype = factory.getOWLDatatype(":DatatypeRestrictionDatatype", pm);

  OWLFacetRestriction fr1 = factory.getOWLFacetRestriction(OWLFacet.MIN_LENGTH, 10);
  OWLLiteral patternLiteral = factory.getOWLLiteral("DatatypeRestrictionLiteral");
  OWLFacetRestriction fr2 = factory.getOWLFacetRestriction(OWLFacet.PATTERN, patternLiteral);

  OWLDatatypeRestriction restriction = factory.getOWLDatatypeRestriction(datatype, fr1, fr2);

  OWLDataProperty property = factory.getOWLDataProperty(":datatypeRestrictionProperty", pm);
  addToGenericDomainAndNewRange(property, restriction);
}
项目:OntoBench    文件:OwlDataIntersectionOfFeature.java   
@Override
public void addToOntology() {
  OWLDatatype d1 = factory.getOWLDatatype(":DatatypeIntersectionOf_Datatype1", pm);
  OWLDatatype d2 = factory.getOWLDatatype(":DatatypeIntersectionOf_Datatype2", pm);
  OWLDataIntersectionOf intersection = factory.getOWLDataIntersectionOf(d1, d2);

  OWLDataProperty property = factory.getOWLDataProperty(":datatypeIntersectionOfProperty", pm);
  addToGenericDomainAndNewRange(property, intersection);
}
项目:OntoBench    文件:OwlDataIntersectionOfOwl2Feature.java   
@Override
public void addToOntology() {
  OWLDatatype d1 = OWL2Datatype.XSD_STRING.getDatatype(factory);
  OWLDatatype d2 = OWL2Datatype.XSD_DATE_TIME.getDatatype(factory);
  OWLDataIntersectionOf intersection = factory.getOWLDataIntersectionOf(d1, d2);

  OWLDataProperty property = factory.getOWLDataProperty(":datatypeIntersectionOfProperty_OWL2", pm);
  addToGenericDomainAndNewRange(property, intersection);
}
项目:OntoBench    文件:RdfsDataDomainFeature.java   
@Override
public void addToOntology() {
  OWLClass domain = featurePool.getExclusiveClass(":Domain");
  OWLDataProperty objectProperty = factory.getOWLDataProperty(":noRangeDataProperty", pm);

  addAxiomToOntology(factory.getOWLDataPropertyDomainAxiom(objectProperty, domain));
}
项目:OntoBench    文件:OwlAllDisjointDataPropertiesFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty p1 = factory.getOWLDataProperty(":allDisjointDataProperties_Property1", pm);
  OWLDataProperty p2 = factory.getOWLDataProperty(":allDisjointDataProperties_Property2", pm);
  OWLDataProperty p3 = factory.getOWLDataProperty(":allDisjointDataProperties_Property3", pm);

  addAxiomToOntology(factory.getOWLDisjointDataPropertiesAxiom(p1, p2, p3));

  OWLDatatype stringDatatype = OWL2Datatype.XSD_STRING.getDatatype(factory);
  addToGenericDomainAndNewRange(p1, stringDatatype);
  addToGenericDomainAndNewRange(p2, stringDatatype);
  addToGenericDomainAndNewRange(p3, stringDatatype);
}
项目:OntoBench    文件:OwlDataPropertyDisjointWithFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty p1 = factory.getOWLDataProperty(":dataPropertyDisjointWith_Property1", pm);
  OWLDataProperty p2 = factory.getOWLDataProperty(":dataPropertyDisjointWith_Property2", pm);

  addAxiomToOntology(factory.getOWLDisjointDataPropertiesAxiom(p1, p2));

  addToGenericDomainAndNewRange(p1, factory.getIntegerOWLDatatype());
  addToGenericDomainAndNewRange(p2, OWL2Datatype.XSD_DECIMAL.getDatatype(factory));
}
项目:OntoBench    文件:OwlDatatypePropertyFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":datatypeProperty", pm);
  OWLDatatype datatype = factory.getIntegerOWLDatatype();

  addToGenericDomainAndNewRange(property, datatype);
}
项目:OntoBench    文件:OwlTopDataPropertyFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLTopDataProperty();
  OWLDatatype datatype = factory.getIntegerOWLDatatype();

  addToGenericDomainAndNewRange(property, datatype);
}
项目:OntoBench    文件:OwlBottomDataPropertyFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLBottomDataProperty();
  OWLDatatype datatype = factory.getIntegerOWLDatatype();

  addToGenericDomainAndNewRange(property, datatype);
}
项目:OntoBench    文件:OwlEquivalentDataPropertyFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty p1 = factory.getOWLDataProperty(":equivalentDataProperty_1", pm);
  OWLDataProperty p2 = factory.getOWLDataProperty(":equivalentDataProperty_2", pm);
  OWLDataProperty p3 = factory.getOWLDataProperty(":equivalentDataProperty_3", pm);

  addAxiomToOntology(factory.getOWLEquivalentDataPropertiesAxiom(p1, p2, p3));

  OWLDatatype datatype = OWL2Datatype.XSD_NON_NEGATIVE_INTEGER.getDatatype(factory);
  addToGenericDomainAndNewRange(p1, datatype);
  addToGenericDomainAndNewRange(p2, datatype);
  addToGenericDomainAndNewRange(p3, datatype);
}
项目:OntoBench    文件:RdfsDataSubPropertyOfFeature.java   
@Override
public void addToOntology() {
  OWLClass start = featurePool.getReusableClass();
  OWLDatatype subRange = OWL2Datatype.XSD_STRING.getDatatype(factory);
  OWLDatatype superRange = OWL2Datatype.XSD_STRING.getDatatype(factory);

  OWLDataProperty subProperty = factory.getOWLDataProperty(":subDataProperty", pm);
  OWLDataProperty superProperty = factory.getOWLDataProperty(":superDataProperty", pm);
  addProperty(start, subProperty, subRange);
  addProperty(start, superProperty, superRange);

  addAxiomToOntology(factory.getOWLSubDataPropertyOfAxiom(subProperty, superProperty));
}
项目:OntoBench    文件:RdfsDataRangeFeature.java   
@Override
public void addToOntology() {
  OWLDatatype datatype = OWL2Datatype.RDFS_LITERAL.getDatatype(factory);
  OWLDataProperty objectProperty = factory.getOWLDataProperty(":noDomainDataProperty", pm);

  addAxiomToOntology(factory.getOWLDataPropertyRangeAxiom(objectProperty, datatype));
}
项目:OntoBench    文件:OwlFunctionalDataPropertyFeature.java   
@Override
public void addToOntology() {
  OWLDataProperty dataProperty = factory.getOWLDataProperty(":functionalDataProperty", pm);
  OWLDatatype datatype = OWL2Datatype.XSD_NON_NEGATIVE_INTEGER.getDatatype(factory);

  addToGenericDomainAndNewRange(dataProperty, datatype);
  addAxiomToOntology(factory.getOWLFunctionalDataPropertyAxiom(dataProperty));
}
项目:OntoBench    文件:OwlHasKeyFeature.java   
@Override
public void addToOntology() {
  OWLClass hasKeyClass = featurePool.getExclusiveClass(":HasKeyClass");

  OWLDataProperty hasKeyProperty1 = factory.getOWLDataProperty(":hasKeyProperty_1", pm);
  OWLDatatype hasKeyRange1 = OWL2Datatype.XSD_STRING.getDatatype(factory);
  addProperty(hasKeyClass, hasKeyProperty1, hasKeyRange1);

  OWLObjectProperty hasKeyProperty_2 = featurePool.getExclusiveProperty(":hasKeyProperty_2");
  OWLClass hasKeyRange2 = featurePool.getExclusiveClass(":HasKeyPropertyRange_2");
  addProperty(hasKeyClass, hasKeyProperty_2, hasKeyRange2);

  addAxiomToOntology(factory.getOWLHasKeyAxiom(hasKeyClass, hasKeyProperty1, hasKeyProperty_2));
}
项目:geoxygene    文件:OwlUtil.java   
/**
 * Get the {@link OWLDataProperty} object corresponding to a named data
 * property (i.e. attribute in OO) of the ontology.
 * @param onto
 * @param name
 * @return
 */
public static OWLDataProperty getOntoDataProperty(OWLOntology onto,
    String name) {
  for (OWLDataProperty p : onto.getDataPropertiesInSignature())
    if (p.getIRI().getFragment().equals(name))
      return p;
  return null;
}
项目:OWLAx    文件:IntegrateOntologyWithProtege.java   
/**
 * create axioms for class--dataproperty----literal relation.
 * 
 * @param src
 * @param dataprop
 * @param dest
 * @return
 */
private void getClass2DataProperty2LiteralAxioms(OWLClass src, OWLDataProperty dataprop, OWLLiteral dest) {
    // Set<OWLAxiom> tmpaxioms = new HashSet<OWLAxiom>();
    OWLAxiom axiom;
    OWLDataSomeValuesFrom owlDataSomeValuesFrom;
    OWLDataHasValue owlLDataHasValue;
    OWLDataMaxCardinality owlDataMaxCardinality;
    OWLDataOneOf owldataOneOf;

    // set domain and range
    // scoped domain
    if (editor.isGenerateDomainAxiom()) {
        owlLDataHasValue = owlDataFactory.getOWLDataHasValue(dataprop, dest);
        axiom = owlDataFactory.getOWLSubClassOfAxiom(owlLDataHasValue, src);
        domainAndRangeAxioms.add(axiom);

        owlDataSomeValuesFrom = owlDataFactory.getOWLDataSomeValuesFrom(dataprop, owlDataFactory.getTopDatatype());
        axiom = owlDataFactory.getOWLSubClassOfAxiom(owlDataSomeValuesFrom, src);
        domainAndRangeAxioms.add(axiom);
    }

    if (editor.isGenerateCardinalityAxiom()) {
        owlDataMaxCardinality = owlDataFactory.getOWLDataMaxCardinality(1, dataprop,
                owlDataFactory.getTopDatatype());
        axiom = owlDataFactory.getOWLSubClassOfAxiom(owlDataFactory.getOWLThing(), owlDataMaxCardinality);
        cardinalityAxioms.add(axiom);

        // need to verify with Adila
        owlDataMaxCardinality = owlDataFactory.getOWLDataMaxCardinality(1, dataprop,
                owlDataFactory.getTopDatatype());
        axiom = owlDataFactory.getOWLSubClassOfAxiom(src, owlDataMaxCardinality);
        cardinalityAxioms.add(axiom);
    }
    // return tmpaxioms;
}
项目:elk-reasoner    文件:ElkConverter.java   
@Override
public OWLDataProperty convert(ElkDataProperty input) {
    if (input instanceof ElkDataPropertyWrap<?>) {
        return ((ElkDataPropertyWrap<?>) input).getOwlObject();
    }
    // else
    return visit(input);
}