Examples of AddAxiom


Examples of org.semanticweb.owlapi.model.AddAxiom

            String name = matcher.group(NAME_GROUP);
            assert name != null;
            OWLDataFactory df = getDataFactory();
            OWLAnnotationProperty annotationProperty = df
                    .getOWLAnnotationProperty(annotationPropertyIRI);
            applyChange(new AddAxiom(getOntology(),
                    df.getOWLDeclarationAxiom(annotationProperty)));
            IRI subsetdefIRI = getTagIRI(OBOVocabulary.SUBSETDEF.getName());
            OWLAnnotationProperty subsetdefAnnotationProperty = df
                    .getOWLAnnotationProperty(subsetdefIRI);
            applyChange(new AddAxiom(getOntology(),
                    df.getOWLSubAnnotationPropertyOfAxiom(annotationProperty,
                            subsetdefAnnotationProperty)));
            OWLLiteral nameLiteral = df.getOWLLiteral(name);
            applyChange(new AddAxiom(getOntology(),
                    df.getOWLAnnotationAssertionAxiom(df.getRDFSLabel(),
                            annotationPropertyIRI, nameLiteral)));
        } else {
            OWLAnnotation annotation = getAnnotationForTagValuePair(
                    OBOVocabulary.SYNONYM_TYPE_DEF.getName(), value);
View Full Code Here

Examples of org.semanticweb.owlapi.model.AddAxiom

        List<OWLObjectProperty> chain = new ArrayList<>();
        chain.add(first);
        chain.add(second);
        OWLAxiom ax = getDataFactory().getOWLSubPropertyChainOfAxiom(chain,
                first);
        applyChange(new AddAxiom(getOntology(), ax));
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.AddAxiom

        if (Boolean.parseBoolean(value)) {
            OWLObjectProperty prop = getDataFactory().getOWLObjectProperty(
                    getIRIFromOBOId(currentId));
            OWLAxiom ax = getDataFactory().getOWLTransitiveObjectPropertyAxiom(
                    prop);
            applyChange(new AddAxiom(getOntology(), ax));
        }
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.AddAxiom

        OWLAnnotation xrefAnnotation = getConsumer().parseXRef(value);
        IRI subject = getIRIFromOBOId(currentId);
        OWLAnnotationAssertionAxiom ax = getDataFactory()
                .getOWLAnnotationAssertionAxiom(xrefAnnotation.getProperty(),
                        subject, xrefAnnotation.getValue());
        applyChange(new AddAxiom(getOntology(), ax));
        if (getConsumer().isTypedef()
                && xrefAnnotation.getValue() instanceof IRI) {
            IRI xrefIRI = (IRI) xrefAnnotation.getValue();
            String typedefId = getConsumer().getCurrentId();
            getConsumer().addSymbolicIdMapping(typedefId, xrefIRI);
View Full Code Here

Examples of org.semanticweb.owlapi.model.AddAxiom

                } else {
                    con = ontologyManager.getOWLDataFactory().getOWLLiteral(
                            shortForm);
                }
                if (ontology.containsEntityInSignature(ent)) {
                    OWLOntologyChange chg = new AddAxiom(ont, ontologyManager
                            .getOWLDataFactory()
                            .getOWLAnnotationAssertionAxiom(
                                    ontologyManager.getOWLDataFactory()
                                            .getOWLAnnotationProperty(
                                                    annotationIRI),
View Full Code Here

Examples of org.semanticweb.owlapi.model.AddAxiom

            for (OWLAxiom ax : ont.getLogicalAxioms()) {
                assert ax != null;
                OWLAxiom dupAx = replacer.duplicateObject(ax);
                if (!ax.equals(dupAx)) {
                    addChange(new RemoveAxiom(ont, ax));
                    addChange(new AddAxiom(ont, dupAx));
                }
            }
        }
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.AddAxiom

            }
        }
        supers.remove(cls);
        for (OWLClassExpression sup : supers) {
            assert sup != null;
            addChange(new AddAxiom(targetOntology, getDataFactory()
                    .getOWLSubClassOfAxiom(cls, sup)));
        }
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.AddAxiom

    }

    @Nonnull
    @Override
    public AddAxiom createOntologyChange(@Nonnull OWLOntology ontology) {
        return new AddAxiom(ontology, getAxiom());
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.AddAxiom

        if (usePairwiseDisjointAxioms) {
            List<OWLClassExpression> descList = new ArrayList<>(
                    classExpressions);
            for (int i = 0; i < descList.size(); i++) {
                for (int j = i + 1; j < descList.size(); j++) {
                    addChange(new AddAxiom(targetOntology, getDataFactory()
                            .getOWLDisjointClassesAxiom(
                                    CollectionFactory.createSet(
                                            descList.get(i), descList.get(j)))));
                }
            }
        } else {
            addChange(new AddAxiom(targetOntology, getDataFactory()
                    .getOWLDisjointClassesAxiom(classExpressions)));
        }
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.AddAxiom

    private void createEquivalentClass(OWLClassExpression classExpression) {
        OWLAxiom ax = getDataFactory()
                .getOWLEquivalentClassesAxiom(
                        CollectionFactory.createSet(getCurrentClass(),
                                classExpression));
        getOWLOntologyManager().applyChange(new AddAxiom(ontology, ax));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.