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

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

  OWLLiteral label = factory.getOWLLiteral("Comment of a property (undefined language)");
  OWLAnnotationProperty comment = factory.getRDFSComment();

  OWLAnnotation pA = factory.getOWLAnnotation(comment, label);
  addAxiomToOntology(factory.getOWLAnnotationAssertionAxiom(property.getIRI(), pA));

  OWLAnnotation cA = factory.getOWLAnnotation(comment, factory.getOWLLiteral("Comment of a class (undefined language)"));
  addAxiomToOntology(factory.getOWLAnnotationAssertionAxiom(range.getIRI(), cA));

  addToGenericDomainAndNewRange(property, range);
}
项目:OntoBench    文件:RdfsLabelMultiLanguageFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":propertyWithInfos");
  OWLClass range = featurePool.getExclusiveClass(":ClassWithInfos");
  OWLAnnotationProperty label = factory.getRDFSLabel();

  OWLAnnotation enAnnotation = factory.getOWLAnnotation(label, factory.getOWLLiteral("Label of a property", Locale.ENGLISH.getLanguage()));
  OWLAnnotation deAnnotation = factory.getOWLAnnotation(label, factory.getOWLLiteral("Bezeichnung einer Property", Locale.GERMAN.getLanguage()));
  OWLAnnotation jpAnnotation = factory.getOWLAnnotation(label, factory.getOWLLiteral("プロパティの指定", Locale.JAPANESE.getLanguage()));

  addAxiomToOntology(factory.getOWLAnnotationAssertionAxiom(property.getIRI(), deAnnotation));
  addAxiomToOntology(factory.getOWLAnnotationAssertionAxiom(property.getIRI(), enAnnotation));
  addAxiomToOntology(factory.getOWLAnnotationAssertionAxiom(property.getIRI(), jpAnnotation));

  OWLAnnotation enClassAnnotation = factory.getOWLAnnotation(label, factory.getOWLLiteral("Label of a class", Locale.ENGLISH.getLanguage()));
  OWLAnnotation deClassAnnotation = factory.getOWLAnnotation(label, factory.getOWLLiteral("Bezeichnung einer Klasse", Locale.GERMAN.getLanguage()));
  OWLAnnotation jpClassAnnotation = factory.getOWLAnnotation(label, factory.getOWLLiteral("どうもありがとうミスターロボット", Locale.JAPANESE.getLanguage()));

  addAxiomToOntology(factory.getOWLAnnotationAssertionAxiom(range.getIRI(), enClassAnnotation));
  addAxiomToOntology(factory.getOWLAnnotationAssertionAxiom(range.getIRI(), deClassAnnotation));
  addAxiomToOntology(factory.getOWLAnnotationAssertionAxiom(range.getIRI(), jpClassAnnotation));


  addToGenericDomainAndNewRange(property, range);
}
项目:OntoBench    文件:RdfsCommentMultiLanguageFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":propertyWithInfos");
  OWLClass range = featurePool.getExclusiveClass(":ClassWithInfos");
  OWLAnnotationProperty comment = factory.getRDFSComment();

  OWLAnnotation enAnnotation = factory.getOWLAnnotation(comment, factory.getOWLLiteral("Comment of a property", Locale.ENGLISH.getLanguage()));
  OWLAnnotation deAnnotation = factory.getOWLAnnotation(comment, factory.getOWLLiteral("Kommentar einer Property", Locale.GERMAN.getLanguage()));
  OWLAnnotation jpAnnotation = factory.getOWLAnnotation(comment, factory.getOWLLiteral("プロパティのコメント", Locale.JAPANESE.getLanguage()));

  addAxiomToOntology(factory.getOWLAnnotationAssertionAxiom(property.getIRI(), deAnnotation));
  addAxiomToOntology(factory.getOWLAnnotationAssertionAxiom(property.getIRI(), enAnnotation));
  addAxiomToOntology(factory.getOWLAnnotationAssertionAxiom(property.getIRI(), jpAnnotation));


  OWLAnnotation enClassAnnotation = factory.getOWLAnnotation(comment, factory.getOWLLiteral("Comment of a class", Locale.ENGLISH.getLanguage()));
  OWLAnnotation deClassAnnotation = factory.getOWLAnnotation(comment, factory.getOWLLiteral("Kommentar einer Klasse", Locale.GERMAN.getLanguage()));
  OWLAnnotation jpClassAnnotation = factory.getOWLAnnotation(comment, factory.getOWLLiteral("どうもありがとうミスターロボット", Locale.JAPANESE.getLanguage()));

  addAxiomToOntology(factory.getOWLAnnotationAssertionAxiom(range.getIRI(), enClassAnnotation));
  addAxiomToOntology(factory.getOWLAnnotationAssertionAxiom(range.getIRI(), deClassAnnotation));
  addAxiomToOntology(factory.getOWLAnnotationAssertionAxiom(range.getIRI(), jpClassAnnotation));

  addToGenericDomainAndNewRange(property, range);
}
项目:OntoBench    文件:OwlPropertyChainAxiomFeature.java   
@Override
public void addToOntology() {
  OWLClass start = featurePool.getReusableClass();
  OWLClass middle = featurePool.getExclusiveClass(":PropertyChainMiddle");
  OWLClass end = featurePool.getExclusiveClass(":PropertyChainEnd");

  OWLObjectProperty singleStep = featurePool.getExclusiveProperty(":propertyChainProperty_SingleStep");
  OWLObjectProperty doubleStep = featurePool.getExclusiveProperty(":propertyChainProperty_DoubleStep");

  List<OWLObjectProperty> propertyChain = Arrays.asList(singleStep, singleStep);
  addAxiomToOntology(factory.getOWLSubPropertyChainOfAxiom(propertyChain, doubleStep));

  addProperty(end, singleStep, middle);
  addProperty(middle, singleStep, start);
  addProperty(end, doubleStep, start);
}
项目:OWLAx    文件:OWLCellRenderer.java   
private void highlightPropertyIfUnsatisfiable(final OWLEntity entity, final StyledDocument doc,
        final int tokenStartIndex, final int tokenLength) {
    try {
        getOWLModelManager().getReasonerPreferences()
                .executeTask(OptionalInferenceTask.SHOW_OBJECT_PROPERTY_UNSATISFIABILITY, () -> {
                    OWLObjectProperty prop = (OWLObjectProperty) entity;
                    OWLReasoner reasoner = getOWLModelManager().getReasoner();
                    boolean consistent = reasoner.isConsistent();
                    if (!consistent || reasoner.getBottomObjectPropertyNode().contains(prop)) {
                        doc.setCharacterAttributes(tokenStartIndex, tokenLength, inconsistentClassStyle, true);
                    }
                });
    } catch (Exception e) {
        logger.warn("An error occurred whilst highlighting an unsatisfiable property: {}", e);
    }
}
项目:owltools    文件:ExtendedReasonerTest.java   
protected Set<OWLClass> findAncestors(String expr, 
        OWLObjectProperty p, boolean direct, Integer numExpected) throws TimeOutException, FreshEntitiesException, InconsistentOntologyException, ClassExpressionNotInProfileException, ReasonerInterruptedException, OWLParserException {
    System.out.println("Query: "+expr+" "+p+" Direct="+direct);
    OWLClassExpression qc = parseOMN(expr);
    System.out.println("QueryC: "+qc);
    //Set<OWLClassExpression> ces = reasoner.getSuperClassExpressions(qc, false);
    //System.out.println("NumX:"+ces.size());
    Set<OWLClass> clzs = reasoner.getSuperClassesOver(qc, p, direct);
    System.out.println("NumD:"+clzs.size());
    for (OWLClass c : clzs) {
        System.out.println("  D:"+c);
    }
    if (numExpected != null) {
        assertEquals(numExpected.intValue(), clzs.size());
    }
    return clzs;
}
项目:owltools    文件:OWLGraphWrapperEdgesExtendedTest.java   
/**
 * Test {@link OWLGraphWrapperEdgesExtended#getSubPropertyReflexiveClosureOf(OWLObjectPropertyExpression)}.
 */
@Test
public void shouldGetSubPropertyReflexiveClosureOf()
{
    OWLObjectProperty fakeRel1 = 
            wrapper.getOWLObjectPropertyByIdentifier("fake_rel1");
    List<OWLObjectProperty> expectedSubProps = new ArrayList<OWLObjectProperty>();
    expectedSubProps.add(fakeRel1);
    expectedSubProps.add(wrapper.getOWLObjectPropertyByIdentifier("fake_rel2"));
    expectedSubProps.add(wrapper.getOWLObjectPropertyByIdentifier("fake_rel3"));
    expectedSubProps.add(wrapper.getOWLObjectPropertyByIdentifier("fake_rel4"));
    //fake_rel3 and fake_rel4 are sub-properties of fake_rel2, 
    //which is the sub-property of fake_rel1
    //we also test the order of the returned properties
    LinkedHashSet<OWLObjectPropertyExpression> subprops = 
            wrapper.getSubPropertyReflexiveClosureOf(fakeRel1);
    assertEquals("Incorrect sub-properties returned: ", 
            expectedSubProps, new ArrayList<OWLObjectPropertyExpression>(subprops));

}
项目:owltools    文件:OWLInAboxTranslator.java   
/**
 * @param p
 * @return type-level form of relation
 */
private OWLObjectPropertyExpression trTypeLevel(
        OWLObjectPropertyExpression p) {
    if (!this.isTranslateObjectProperty) {
        return p;
    }
    if (p instanceof OWLObjectInverseOf) {
        OWLObjectPropertyExpression p2 = trTypeLevel(((OWLObjectInverseOf)p).getInverse());
        return getOWLDataFactory().getOWLObjectInverseOf(p2);
    }
    else {
        instanceLevelRelations.add((OWLObjectProperty)p);
        IRI iri = ((OWLObjectProperty) p).getIRI();
        return trTypeLevel(iri);
    }
}
项目:minerva    文件:MolecularModelJsonRenderer.java   
/**
 * @param opa
 * @return Map to be passed to Gson
 */
public JsonOwlFact renderObject(OWLObjectPropertyAssertionAxiom opa) {
    OWLNamedIndividual subject;
    OWLObjectProperty property;
    OWLNamedIndividual object;

    JsonOwlFact fact = null;
    if (opa.getSubject().isNamed() && opa.getObject().isNamed() && opa.getProperty().isAnonymous() == false) {
        subject = opa.getSubject().asOWLNamedIndividual();
        property = opa.getProperty().asOWLObjectProperty();
        object = opa.getObject().asOWLNamedIndividual();

        fact = new JsonOwlFact();
        fact.subject = curieHandler.getCuri(subject);
        fact.property = curieHandler.getCuri(property);
        fact.propertyLabel = graph.getLabel(property);
        fact.object = curieHandler.getCuri(object);

        JsonAnnotation[] anObjs = renderAnnotations(opa.getAnnotations(), curieHandler);
        if (anObjs != null && anObjs.length > 0) {
            fact.annotations = anObjs;
        }
    }
    return fact;
}
项目:minerva    文件:MolecularModelManager.java   
/**
 * Convenience wrapper for {@link CoreMolecularModelManager#addType}.
 * 
 * @param modelId
 * @param iid
 * @param pid
 * @param cid
 * @param metadata
 * @throws UnknownIdentifierException 
 */
public void addType(IRI modelId,
        String iid, String pid, String cid, METADATA metadata) throws UnknownIdentifierException {
    ModelContainer model = checkModelId(modelId);
    OWLNamedIndividual individual = getIndividual(iid, model);
    if (individual == null) {
        throw new UnknownIdentifierException("Could not find a individual for id: "+iid);
    }
    OWLObjectProperty property = getObjectProperty(pid, model);
    if (property == null) {
        throw new UnknownIdentifierException("Could not find a property for id: "+pid);
    }
    OWLClass cls = getClass(cid, model);
    if (cls == null) {
        throw new UnknownIdentifierException("Could not find a class for id: "+cid);
    }
    addType(model, individual, property, cls, metadata);
}
项目:minerva    文件:MolecularModelManager.java   
/**
 * Convenience wrapper for {@link CoreMolecularModelManager#addFact}
 * 
 * @param modelId
 * @param pid
 * @param iid
 * @param jid
 * @param annotations 
 * @param metadata
 * @return relevant individuals
 * @throws UnknownIdentifierException 
 */
public List<OWLNamedIndividual> addFact(IRI modelId, String pid, String iid, String jid,
        Set<OWLAnnotation> annotations, METADATA metadata) throws UnknownIdentifierException {
    ModelContainer model = checkModelId(modelId);
    OWLObjectProperty property = getObjectProperty(pid, model);
    if (property == null) {
        throw new UnknownIdentifierException("Could not find a property for id: "+pid);
    }
    OWLNamedIndividual individual1 = getIndividual(iid, model);
    if (individual1 == null) {
        throw new UnknownIdentifierException("Could not find a individual (1) for id: "+iid);
    }
    OWLNamedIndividual individual2 = getIndividual(jid, model);
    if (individual2 == null) {
        throw new UnknownIdentifierException("Could not find a individual (2) for id: "+jid);
    }
    addFact(model, property, individual1, individual2, annotations, metadata);
    return Arrays.asList(individual1, individual2);
}
项目:minerva    文件:MolecularModelManager.java   
public List<OWLNamedIndividual> addAnnotations(ModelContainer model, String pid, 
        String iid, String jid, Set<OWLAnnotation> annotations, METADATA metadata) throws UnknownIdentifierException {
    OWLObjectProperty property = getObjectProperty(pid, model);
    if (property == null) {
        throw new UnknownIdentifierException("Could not find a property for id: "+pid);
    }
    OWLNamedIndividual individual1 = getIndividual(iid, model);
    if (individual1 == null) {
        throw new UnknownIdentifierException("Could not find a individual (1) for id: "+iid);
    }
    OWLNamedIndividual individual2 = getIndividual(jid, model);
    if (individual2 == null) {
        throw new UnknownIdentifierException("Could not find a individual (2) for id: "+jid);
    }
    addAnnotations(model, property, individual1, individual2, annotations, metadata);

    return Arrays.asList(individual1, individual2);
}
项目:owltools    文件:BioChebiGenerator.java   
private static Set<OWLObjectProperty> getPropertiesByLabels(OWLGraphWrapper graph, String...labels) {
    Set<OWLObjectProperty> set = new HashSet<OWLObjectProperty>();
    for (String label : labels) {
        OWLObject obj = graph.getOWLObjectByLabel(label);
        if (obj == null) {
            throw new RuntimeException("No property found for label: "+label);
        }
        if (obj instanceof OWLObjectProperty) {
            set.add((OWLObjectProperty) obj);
        }
        else {
            throw new RuntimeException("No obj is wrong type: '"+obj.getClass().getName()+"' + for label: "+label);
        }
    }
    return set;
}
项目:owltools    文件:SpeciesSubsetterUtil.java   
/**
 * Removes from the {@code OWLOntology} wrapped into {@link #graph} the relations 
 * defined in {@link #defaultRelationsToRemove}.
 * 
 * @return an {@code int} that is the number of {@code OWLAxiom}s actually removed.
 */
private int removeDefaultAxioms() {
    //Set<OWLObjectProperty> props = new HashSet<OWLObjectProperty>();
       Set<OWLAxiom> rmAxioms = new HashSet<OWLAxiom>();
       for (String p : defaultRelationsToRemove) {
           IRI iri = graph.getIRIByIdentifier(p);
           OWLObjectProperty prop = fac.getOWLObjectProperty(iri);
           if (prop != null) {
               LOG.info(" FILTERING: "+prop);
               //props.add(prop);
               for (OWLAxiom ax : ont.getAxioms()) {
                   if (ax.getObjectPropertiesInSignature().contains(prop)) {
                       LOG.info("REMOVING:"+ax);
                       rmAxioms.add(ax);
                   }
               }
           }
       }

       LOG.info("Removing: "+rmAxioms.size());
       mgr.removeAxioms(ont, rmAxioms);
       return rmAxioms.size();
}
项目:jcel    文件:AxiomTranslator.java   
@Override
public Set<ComplexIntegerAxiom> visit(OWLEquivalentObjectPropertiesAxiom axiom) throws TranslationException {
    Objects.requireNonNull(axiom);
    Set<OWLObjectPropertyExpression> propertySet = axiom.getProperties();
    Set<IntegerObjectPropertyExpression> propertyExprSet = new HashSet<>();
    propertySet.forEach(propertyExpr -> {
        if (propertyExpr instanceof OWLObjectProperty) {
            OWLObjectProperty property = asOWLObjectProperty(propertyExpr);
            propertyExprSet.add(getDataTypeFactory().createObjectProperty(translateObjectProperty(property)));
        } else {
            throw new IllegalStateException();
        }
    });
    ComplexIntegerAxiom ret = getAxiomFactory().createEquivalentObjectPropertiesAxiom(propertyExprSet,
            translateAnnotations(axiom.getAnnotations()));
    return Collections.singleton(ret);
}
项目:jcel    文件:ReverseAxiomTranslator.java   
@Override
public OWLAxiom visit(RI3Axiom axiom) {
    Objects.requireNonNull(axiom);
    OWLObjectProperty owlLeftSubProperty = translator.getTranslationRepository()
            .getOWLObjectProperty(axiom.getLeftSubProperty());
    OWLObjectProperty owlRightSubProperty = translator.getTranslationRepository()
            .getOWLObjectProperty(axiom.getRightSubProperty());
    OWLObjectProperty owlSuperProperty = translator.getTranslationRepository()
            .getOWLObjectProperty(axiom.getSuperProperty());
    Set<OWLAnnotation> owlAnnotations = translateAnnotations(axiom.getAnnotations());
    OWLDataFactory dataFactory = ontology.getOWLOntologyManager().getOWLDataFactory();
    List<OWLObjectProperty> owlPropertyList = new ArrayList<>();
    owlPropertyList.add(owlLeftSubProperty);
    owlPropertyList.add(owlRightSubProperty);
    return dataFactory.getOWLSubPropertyChainOfAxiom(owlPropertyList, owlSuperProperty, owlAnnotations);
}
项目:Wolpertinger    文件:NaiveTranslation.java   
/**
 *
 * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLNegativeObjectPropertyAssertionAxiom)
 */

public void visit(OWLNegativeObjectPropertyAssertionAxiom negObjPropertyAssertion) {
    //assert !negObjPropertyAssertion.getProperty().isAnonymous();

    OWLObjectProperty property = negObjPropertyAssertion.getProperty().asOWLObjectProperty();
    String propertyName = mapper.getPredicateName(property);

    OWLNamedIndividual subject = negObjPropertyAssertion.getSubject().asOWLNamedIndividual();
    OWLNamedIndividual object = negObjPropertyAssertion.getObject().asOWLNamedIndividual();

    String subjectName = mapper.getConstantName(subject);
    String objectName = mapper.getConstantName(object);

    writer.print(ASP2CoreSymbols.CLASSICAL_NEGATION);
    writer.print(propertyName);
    writer.print(ASP2CoreSymbols.BRACKET_OPEN);
    writer.print(subjectName);
    writer.print(ASP2CoreSymbols.ARG_SEPERATOR);
    writer.print(objectName);
    writer.print(ASP2CoreSymbols.BRACKET_CLOSE);
    writer.print(ASP2CoreSymbols.EOR);
}
项目:owltools    文件:OWLGraphManipulatorTest.java   
/**
 * Test {@link owltools.graph.OWLGraphEdge#hashCode()}. 
 * There used to be a problem that two equal {@code OWLGraphEdge{@code  could have 
 * different hashcodes, leading to the the possibility to have several identical 
 * {@code OWLGraphEdge}s in a {@code Set}.
 */
@Test
public void testOWLGraphEdgeHashCode()
{
    OWLOntology ont = this.graphManipulator.getOwlGraphWrapper().getSourceOntology();
    OWLObjectProperty partOf = this.graphManipulator.getOwlGraphWrapper().
            getOWLObjectPropertyByIdentifier("BFO:0000050");
    OWLClass source = 
            this.graphManipulator.getOwlGraphWrapper().getOWLClassByIdentifier("FOO:0003");
    OWLClass target = 
            this.graphManipulator.getOwlGraphWrapper().getOWLClassByIdentifier("FOO:0001");
    OWLGraphEdge edge1 = new OWLGraphEdge(source, target, partOf, Quantifier.SOME, ont);
    OWLGraphEdge edge2 = new OWLGraphEdge(source, target, partOf, Quantifier.SOME, ont);
    assertTrue("Two OWLGraphEdges are equal but have different hashcodes.", 
            edge1.equals(edge2) && edge1.hashCode() == edge2.hashCode());
}
项目:HermiT-android    文件:OWLNormalization.java   
public void visit(SWRLObjectPropertyAtom at) {
    OWLObjectPropertyExpression ope=at.getPredicate().getSimplified();
    OWLObjectProperty op=ope.getNamedProperty();
    SWRLVariable variable1;
    SWRLVariable variable2;
    if (ope.isAnonymous()) {
        variable1=getVariableFor(at.getSecondArgument());
        variable2=getVariableFor(at.getFirstArgument());
    }
    else {
        variable1=getVariableFor(at.getFirstArgument());
        variable2=getVariableFor(at.getSecondArgument());

    }
    SWRLAtom newAtom=m_factory.getSWRLObjectPropertyAtom(op,variable1,variable2);
    if (m_isPositive) {
        // head
        m_normalizedHeadAtoms.add(newAtom);
    }
    else {
        // body
        m_normalizedBodyAtoms.add(newAtom);
    }
}
项目:owltools    文件:OWLHandler.java   
@Deprecated
public void deleteFactCommand() throws IOException, OWLOntologyCreationException, OWLOntologyStorageException, UnknownOWLClassException {
    if (isHelp()) {
        info("generates ClassAssertion");
        return;
    }
    OWLOntology ont = resolveOntology(Param.ontology);
    OWLIndividual i = resolveIndividual(Param.individualId);
    OWLIndividual j = resolveIndividual(Param.fillerId);
    OWLObjectProperty p = resolveObjectProperty(Param.propertyId);
    for (OWLObjectPropertyAssertionAxiom ax : ont.getAxioms(AxiomType.OBJECT_PROPERTY_ASSERTION)) {
        if (ax.getSubject().equals(i)) {
            if (p == null || ax.getProperty().equals(p)) {
                if (j == null || ax.getObject().equals(j)) {
                    removeAxiom(ont, graph.getDataFactory().getOWLObjectPropertyAssertionAxiom(p, i, j));
                }
            }
        }
    }
    String jsonStr = "";
    response.getWriter().write(jsonStr);
}
项目:OntoBench    文件:OwlNegativeObjectPropertyAssertionFeature.java   
@Override
public void addToOntology() {
  OWLNamedIndividual source = factory.getOWLNamedIndividual(":NegativeObjectPropertyAssertion_SourceIndividual", pm);
  OWLNamedIndividual target = factory.getOWLNamedIndividual(":NegativeObjectPropertyAssertion_TargetIndividual", pm);
  OWLObjectProperty property = featurePool.getExclusiveProperty(":negativeObjectPropertyAssertionProperty");

  addAxiomToOntology(factory.getOWLNegativeObjectPropertyAssertionAxiom(property, source, target));
}
项目:OntoBench    文件:OwlObjectCardinalityOwlLiteFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectExactCardinalityProperty_Lite");
  OWLClass range = featurePool.getExclusiveClass(":ObjectExactCardinalityRange_Lite");
  addToGenericDomainAndNewRange(property, range);

  OWLObjectExactCardinality exactCardinality = factory.getOWLObjectExactCardinality(1, property);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, exactCardinality));
}
项目:OntoBench    文件:OwlObjectMaxCardinalityOwlLiteAnd2RlFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectMaxCardinalityProperty_LiteRL");
  OWLClass range = featurePool.getExclusiveClass(":ObjectMaxCardinalityRange_LiteRL");
  addToGenericDomainAndNewRange(property, range);

  OWLObjectMaxCardinality maxCardinality = factory.getOWLObjectMaxCardinality(1, property);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, maxCardinality));
}
项目:OntoBench    文件:OwlObjectMaxQualifiedCardinalityFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectMaxQualifiedCardinalityProperty");
  OWLClass range = featurePool.getExclusiveClass(":ObjectMaxQualifiedCardinalityRange");
  addToGenericDomainAndNewRange(property, range);

  OWLClass qualifier = featurePool.getExclusiveClass(":ObjectMaxQualifiedCardinality_Qualifier");
  OWLObjectMaxCardinality maxCardinality = factory.getOWLObjectMaxCardinality(3, property, qualifier);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, maxCardinality));
}
项目:OntoBench    文件:OwlObjectMinCardinalityFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectMinCardinalityProperty");
  OWLClass range = featurePool.getExclusiveClass(":ObjectMinCardinalityRange");
  addToGenericDomainAndNewRange(property, range);

  OWLObjectMinCardinality minCardinality = factory.getOWLObjectMinCardinality(2, property);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, minCardinality));
}
项目:OntoBench    文件:OwlObjectMaxQualifiedCardinalityOwl2RlFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectMaxQualifiedCardinalityProperty_RL");
  OWLClass range = featurePool.getExclusiveClass(":ObjectMaxQualifiedCardinalityRange_RL");
  addToGenericDomainAndNewRange(property, range);

  OWLClass qualifier = featurePool.getExclusiveClass(":ObjectMaxQualifiedCardinality_RL_Qualifier");
  OWLObjectMaxCardinality maxCardinality = factory.getOWLObjectMaxCardinality(0, property, qualifier);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, maxCardinality));
}
项目:OntoBench    文件:OwlObjectCardinalityFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectExactCardinalityProperty");
  OWLClass range = featurePool.getExclusiveClass(":ObjectExactCardinalityRange");
  addToGenericDomainAndNewRange(property, range);

  OWLObjectExactCardinality exactCardinality = factory.getOWLObjectExactCardinality(4, property);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, exactCardinality));
}
项目:OntoBench    文件:OwlObjectMinCardinalityOwlLiteFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectMinCardinalityProperty_Lite");
  OWLClass range = featurePool.getExclusiveClass(":ObjectMinCardinalityRange_Lite");
  addToGenericDomainAndNewRange(property, range);

  OWLObjectMinCardinality minCardinality = factory.getOWLObjectMinCardinality(0, property);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, minCardinality));
}
项目:OntoBench    文件:OwlObjectMinQualifiedCardinalityFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectMinQualifiedCardinalityProperty");
  OWLClass range = featurePool.getExclusiveClass(":ObjectMinQualifiedCardinalityRange");
  addToGenericDomainAndNewRange(property, range);

  OWLClass qualifier = featurePool.getExclusiveClass(":ObjectMinQualifiedCardinality_Qualifier");
  OWLObjectMinCardinality minCardinality = factory.getOWLObjectMinCardinality(1, property, qualifier);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, minCardinality));
}
项目:OntoBench    文件:OwlObjectMaxCardinalityFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectMaxCardinalityProperty");
  OWLClass range = featurePool.getExclusiveClass(":ObjectMaxCardinalityRange");
  addToGenericDomainAndNewRange(property, range);

  OWLObjectMaxCardinality maxCardinality = factory.getOWLObjectMaxCardinality(8, property);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, maxCardinality));
}
项目:OntoBench    文件:OwlObjectQualifiedCardinalityFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectExactQualifiedCardinalityProperty");
  OWLClass range = featurePool.getExclusiveClass(":ObjectExactQualifiedCardinalityRange");
  addToGenericDomainAndNewRange(property, range);

  OWLClass qualifier = featurePool.getExclusiveClass(":ObjectExactQualifiedCardinality_Qualifier");
  OWLObjectExactCardinality exactCardinality = factory.getOWLObjectExactCardinality(1, property, qualifier);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, exactCardinality));
}
项目:OntoBench    文件:OwlObjectSomeValuesFromOwl2RlFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectSomeValuesFromProperty_RL");
  OWLClass range = featurePool.getExclusiveClass(":ObjectSomeValuesFromRange_RL");

  OWLClass someValuesFrom = featurePool.getExclusiveClass(":ObjectSomeValuesFrom_RL");
  OWLObjectSomeValuesFrom restriction = factory.getOWLObjectSomeValuesFrom(property, range);
  addAxiomToOntology(factory.getOWLSubClassOfAxiom(restriction, someValuesFrom));
}
项目:OntoBench    文件:OwlHasSelfFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":hasSelfProperty");

  OWLClass hasSelf = featurePool.getExclusiveClass(":HasSelfClass");

  OWLObjectHasSelf restriction = factory.getOWLObjectHasSelf(property);
  addAxiomToOntology(factory.getOWLEquivalentClassesAxiom(hasSelf, restriction));
}
项目: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));
}
项目:OntoBench    文件:OwlObjectSomeValuesFromFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectSomeValuesFromProperty");
  OWLClass range = featurePool.getExclusiveClass(":ObjectSomeValuesFromRange");

  OWLClass someValuesFrom = featurePool.getExclusiveClass(":ObjectSomeValuesFrom");
  OWLObjectSomeValuesFrom restriction = factory.getOWLObjectSomeValuesFrom(property, range);
  addAxiomToOntology(factory.getOWLSubClassOfAxiom(someValuesFrom, restriction));
}
项目:OntoBench    文件:OwlObjectHasValueFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectHasValueProperty");

  OWLIndividual value = factory.getOWLNamedIndividual(":ObjectHasValue_Individual", pm);
  OWLObjectHasValue restriction = factory.getOWLObjectHasValue(property, value);

  OWLClass hasValue = featurePool.getExclusiveClass(":ObjectHasValue");
  addAxiomToOntology(factory.getOWLSubClassOfAxiom(hasValue, restriction));
}
项目:OntoBench    文件:OwlDeprecatedPropertyFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":DeprecatedProperty");
  addToGenericDomainAndNewRange(property, featurePool.getExclusiveClass(":DeprecatedPropertyRange"));

  OWLAnnotation annotation = factory.getOWLAnnotation(factory.getOWLDeprecated(), factory.getOWLLiteral(true));
  OWLAxiom deprecatedAxiom = factory.getOWLAnnotationAssertionAxiom(property.getIRI(), annotation);
  addAxiomToOntology(deprecatedAxiom);
}
项目:OntoBench    文件:RdfsLabelFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":propertyWithInfos");
  OWLClass range = featurePool.getExclusiveClass(":ClassWithInfos");
  OWLAnnotationProperty label = factory.getRDFSLabel();

  OWLAnnotation pA = factory.getOWLAnnotation(label, factory.getOWLLiteral("Label of a property (undefined language)"));
  addAxiomToOntology(factory.getOWLAnnotationAssertionAxiom(property.getIRI(), pA));

  OWLAnnotation cA = factory.getOWLAnnotation(label, factory.getOWLLiteral("Label of a class (undefined language)"));
  addAxiomToOntology(factory.getOWLAnnotationAssertionAxiom(range.getIRI(), cA));

  addToGenericDomainAndNewRange(property, range);
}
项目:OntoBench    文件:OwlBottomObjectPropertyFeature.java   
@Override
public void addToOntology() {
  OWLObjectProperty objectProperty = factory.getOWLBottomObjectProperty();
  OWLClass range = featurePool.getExclusiveClass(":BottomObjectPropertyRange");

  addToGenericDomainAndNewRange(objectProperty, range);
}
项目:OntoBench    文件:OwlInverseOfPropertyFeature.java   
@Override
public void addToOntology() {
  OWLClass domain = featurePool.getReusableClass();
  OWLClass range = featurePool.getExclusiveClass(":InverseOfPropertyRange");

  OWLObjectProperty property = featurePool.getExclusiveProperty(":nonInverseProperty");
  addProperty(domain, property, range);

  OWLObjectProperty inverseProperty = featurePool.getExclusiveProperty(":inverseProperty");
  addProperty(range, inverseProperty, domain);

  addAxiomToOntology(factory.getOWLInverseObjectPropertiesAxiom(property, inverseProperty));
}