Examples of OWLAnnotationSubject


Examples of org.semanticweb.owlapi.model.OWLAnnotationSubject

                        .getAxioms(AxiomType.ANNOTATION_ASSERTION);
                for (OWLAnnotationAssertionAxiom aa : aas) {
                    OWLAnnotationValue v = aa.getValue();
                    OWLAnnotationProperty property = aa.getProperty();
                    if (isMatchingLabel(label, v, property)) {
                        OWLAnnotationSubject obj = aa.getSubject();
                        if (obj instanceof IRI) {
                            return (IRI) obj;
                        }
                    }
                }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationSubject

        }
        throw new Error("Missing return statement in function");
    }

    final public OWLAnnotationSubject AnnotationSubject() throws ParseException {
        OWLAnnotationSubject subj;
        switch (jj_ntk == -1 ? jj_ntk_f() : jj_ntk) {
            case FULLIRI:
            case PNAME_LN: {
                subj = IRI();
                break;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationSubject

    }

    final public OWLAnnotationAssertionAxiom AnnotationAssertion()
            throws ParseException {
        OWLAnnotationProperty prop;
        OWLAnnotationSubject subj;
        OWLAnnotationValue val;
        Set<OWLAnnotation> axiomAnnos;
        jj_consume_token(ANNOTATIONASSERTION);
        jj_consume_token(OPENPAR);
        axiomAnnos = AxiomAnnotationSet();
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationSubject

        @Override
        public void handleTriple(@Nonnull IRI subject, IRI predicate,
                OWLLiteral object) {
            OWLAnnotationProperty prop = df.getOWLAnnotationProperty(predicate);
            OWLAnnotationSubject annotationSubject;
            if (isAnonymous(subject)) {
                annotationSubject = df.getOWLAnonymousIndividual(subject
                        .toString());
            } else {
                annotationSubject = subject;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationSubject

            } else {
                value = object;
            }
            OWLAnnotationProperty prop = df.getOWLAnnotationProperty(predicate);
            OWLAnnotation anno = df.getOWLAnnotation(prop, value);
            OWLAnnotationSubject annoSubject;
            if (isAnonymous(subject)) {
                annoSubject = df.getOWLAnonymousIndividual(subject.toString());
            } else {
                annoSubject = subject;
            }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationSubject

                .getAxioms(AxiomType.ANNOTATION_ASSERTION)) {
            OWLAnnotationValue v = aa.getValue();
            OWLAnnotationProperty property = aa.getProperty();
            if (property.isLabel() && v instanceof OWLLiteral) {
                if (label.equals(((OWLLiteral) v).getLiteral())) {
                    OWLAnnotationSubject subject = aa.getSubject();
                    if (subject instanceof IRI) {
                        return (IRI) subject;
                    }
                }
            }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationSubject

    @Test
    public void testConvert() {
        // PARSE TEST FILE
        OWLOntology ontology = convert(parseOBOFile("obsolete_term_test.obo"));
        // TEST CONTENTS OF OWL ONTOLOGY
        OWLAnnotationSubject subj = IRI
                .create("http://purl.obolibrary.org/obo/XX_0000034");
        Set<OWLAnnotationAssertionAxiom> aas = ontology
                .getAnnotationAssertionAxioms(subj);
        boolean okDeprecated = false;
        for (OWLAnnotationAssertionAxiom aa : aas) {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationSubject

    @Test
    public void testContainsReferenceForAnnotationAssertion() {
        OWLAnnotationProperty ap = AnnotationProperty(iri("prop"));
        OWLLiteral val = Literal("Test", "");
        OWLAnnotationSubject subject = Class(iri("A")).getIRI();
        OWLAnnotationAssertionAxiom ax = AnnotationAssertion(ap, subject, val);
        OWLOntology ont = getOWLOntology("Ont");
        ont.getOWLOntologyManager().addAxiom(ont, ax);
        assertTrue(ont.containsAnnotationPropertyInSignature(ap.getIRI(),
                EXCLUDED));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationSubject

    private void renderUntypedIRIAnnotationAssertions() throws IOException {
        Set<IRI> annotatedIRIs = new HashSet<>();
        for (OWLAnnotationAssertionAxiom ax : ontology
                .getAxioms(AxiomType.ANNOTATION_ASSERTION)) {
            OWLAnnotationSubject subject = ax.getSubject();
            if (subject instanceof IRI) {
                IRI iri = (IRI) subject;
                if (punned.contains(iri)
                        || !ontology.containsEntityInSignature(iri, EXCLUDED)) {
                    annotatedIRIs.add(iri);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationSubject

    @Test
    public void testConvert() {
        // PARSE TEST FILE
        OWLOntology ontology = convert(parseOBOFile("subset_test.obo"));
        OWLAnnotationSubject subj = IRI
                .create("http://purl.obolibrary.org/obo/GO_0000003");
        Set<OWLAnnotationAssertionAxiom> aas = ontology
                .getAnnotationAssertionAxioms(subj);
        boolean ok = false;
        for (OWLAnnotationAssertionAxiom aa : aas) {
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.