Examples of OWLAnnotationAssertionAxiom


Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

            f = getTermFrame(entity.asOWLClass());
        } else if (entity instanceof OWLObjectProperty) {
            f = getTypedefFrame(entity.asOWLObjectProperty());
        } else if (entity instanceof OWLAnnotationProperty) {
            for (OWLAxiom a : set) {
                OWLAnnotationAssertionAxiom ax = (OWLAnnotationAssertionAxiom) a;
                OWLAnnotationProperty prop = ax.getProperty();
                String tag = owlObjectToTag(prop);
                if (OboFormatTag.TAG_IS_METADATA_TAG.getTag().equals(tag)) {
                    f = getTypedefFrame(entity);
                    break;
                }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

        OWLObjectProperty op = df.getOWLObjectProperty(iri("testProperty"));
        OWLAnnotationProperty ap = df
                .getOWLAnnotationProperty(iri("testProperty"));
        m.addAxiom(o, df.getOWLDeclarationAxiom(op));
        m.addAxiom(o, df.getOWLTransitiveObjectPropertyAxiom(op));
        OWLAnnotationAssertionAxiom assertion = df
                .getOWLAnnotationAssertionAxiom(iri("test"),
                        df.getOWLAnnotation(ap, iri("otherTest")));
        m.addAxiom(o, assertion);
        return o;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

        OWLObjectProperty op = df
                .getOWLObjectProperty(iri("testObjectProperty"));
        OWLAnnotationProperty ap = df
                .getOWLAnnotationProperty(iri("testAnnotationProperty"));
        m.addAxiom(o, df.getOWLTransitiveObjectPropertyAxiom(op));
        OWLAnnotationAssertionAxiom assertion = df
                .getOWLAnnotationAssertionAxiom(iri("test"),
                        df.getOWLAnnotation(ap, iri("otherTest")));
        m.addAxiom(o, assertion);
        return o;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

    }

    @Test
    public void shouldBuildAnnotationAssertion() {
        // given
        OWLAnnotationAssertionAxiom expected = df
                .getOWLAnnotationAssertionAxiom(ap, iri, lit, annotations);
        BuilderAnnotationAssertion builder = new BuilderAnnotationAssertion(
                expected, df);
        // when
        OWLObject built = builder.buildObject();
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

    @Override
    protected Set<? extends OWLAxiom> createAxioms() {
        OWLLiteral literalWithLang = Literal("abc", "en");
        OWLClass cls = Class(iri("A"));
        OWLAnnotationProperty prop = AnnotationProperty(iri("prop"));
        OWLAnnotationAssertionAxiom ax = AnnotationAssertion(prop,
                cls.getIRI(), literalWithLang);
        Set<OWLAxiom> axioms = new HashSet<>();
        axioms.add(ax);
        axioms.add(Declaration(cls));
        return axioms;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

        IRI subject = IRI("http://owlapi.sourceforge.net/ontology#subject");
        axioms.add(Declaration(NamedIndividual(subject)));
        OWLAnonymousIndividual individual1 = AnonymousIndividual();
        OWLAnonymousIndividual individual2 = AnonymousIndividual();
        OWLAnonymousIndividual individual3 = AnonymousIndividual();
        OWLAnnotationAssertionAxiom annoAssertion1 = AnnotationAssertion(
                property, subject, individual1);
        OWLAnnotationAssertionAxiom annoAssertion2 = AnnotationAssertion(
                property, individual1, individual2);
        OWLAnnotationAssertionAxiom annoAssertion3 = AnnotationAssertion(
                property, individual2, individual3);
        axioms.add(annoAssertion1);
        axioms.add(annoAssertion2);
        axioms.add(annoAssertion3);
        return axioms;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

        super(handler);
    }

    @Override
    OWLAxiom createAxiom() {
        OWLAnnotationAssertionAxiom toReturn = df
                .getOWLAnnotationAssertionAxiom(annotation.getProperty(),
                        entity.getIRI(), annotation.getValue());
        annotation = null;
        entity = null;
        return toReturn;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

            annotations.addAll(getXRefAnnotations(matcher));
            OWLEntity subject = getConsumer().getCurrentEntity();
            String synonym = matcher.group(VALUE_GROUP);
            assert synonym != null;
            OWLLiteral synonymLiteral = df.getOWLLiteral(synonym);
            OWLAnnotationAssertionAxiom annoAssertion = df
                    .getOWLAnnotationAssertionAxiom(property, subject.getIRI(),
                            synonymLiteral, annotations);
            applyChange(new AddAxiom(getOntology(), annoAssertion));
        }
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

        if (currentId == null) {
            return;
        }
        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) {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

                    IRI annotationPropertyIRI = getIRIFromTagName(tag);
                    OWLAnnotationProperty property = getDataFactory()
                            .getOWLAnnotationProperty(annotationPropertyIRI);
                    OWLAnnotation anno = getDataFactory().getOWLAnnotation(
                            property, con);
                    OWLAnnotationAssertionAxiom ax = getDataFactory()
                            .getOWLAnnotationAssertionAxiom(subject, anno);
                    owlOntologyManager.addAxiom(ontology, ax);
                    OWLDeclarationAxiom annotationPropertyDeclaration = getDataFactory()
                            .getOWLDeclarationAxiom(property);
                    owlOntologyManager.addAxiom(ontology,
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.