Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLAnnotationValue


        String obj = peekToken();
        OWLAnnotation anno = null;
        if (isIndividualName(obj) || isClassName(obj)
                || isObjectPropertyName(obj) || isDataPropertyName(obj)) {
            consumeToken();
            OWLAnnotationValue value;
            if (obj.startsWith("_:")) {
                value = dataFactory.getOWLAnonymousIndividual(obj);
            } else {
                value = getIRI(obj);
            }
View Full Code Here


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

    final public OWLAnnotation Annotation() throws ParseException {
        OWLAnnotationProperty prop;
        OWLAnnotationValue val;
        Set<OWLAnnotation> annos = null;
        OWLAnnotation anno = null;
        jj_consume_token(ANNOTATION);
        annos = new HashSet<OWLAnnotation>();
        jj_consume_token(OPENPAR);
View Full Code Here

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

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

    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();
        prop = AnnotationPropertyIRI();
View Full Code Here

        }

        @Override
        public void handleTriple(@Nonnull IRI subject, IRI predicate,
                @Nonnull IRI object) {
            OWLAnnotationValue value;
            if (isAnonymous(object)) {
                value = df.getOWLAnonymousIndividual(object.toString());
            } else {
                value = object;
            }
View Full Code Here

    @Nullable
    protected IRI getIriByLabel(@Nonnull OWLOntology ontology,
            @Nonnull String label) {
        for (OWLAnnotationAssertionAxiom aa : ontology
                .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) {
View Full Code Here

                        df.getOWLLiteral(xrefQuotedString)));
            }
            String xrefId = matcher.group(XREF_ID_GROUP).trim();
            assert xrefId != null;
            OBOIdType idType = OBOIdType.getIdType(xrefId);
            OWLAnnotationValue annotationValue;
            if (idType != null) {
                annotationValue = getIRIFromOBOId(xrefId);
            } else {
                annotationValue = getDataFactory().getOWLLiteral(xrefId);
            }
View Full Code Here

            .create("http://owlapi.sourceforge.net/ontologies/test#X");

    @Nonnull
    private OWLAnnotationAssertionAxiom createAnnotationAssertionAxiom() {
        OWLAnnotationProperty prop = AnnotationProperty(iri("prop"));
        OWLAnnotationValue value = Literal("value");
        return AnnotationAssertion(prop, SUBJECT, value);
    }
View Full Code Here

    @Test
    public void testAnonAccessor() {
        OWLOntology ont = getOWLOntology("ontology");
        OWLAnnotationProperty prop = AnnotationProperty(iri("prop"));
        OWLAnnotationValue value = Literal("value");
        OWLAnonymousIndividual a = AnonymousIndividual();
        OWLAnnotationAssertionAxiom ax = AnnotationAssertion(prop, a, value);
        ont.getOWLOntologyManager().addAxiom(ont, ax);
        assertTrue(ont.getAnnotationAssertionAxioms(a).contains(ax));
    }
View Full Code Here

        Set<OWLAnnotation> annotations = owlOntology.getAnnotations();
        Set<String> comments = new HashSet<>();
        for (OWLAnnotation owlAnnotation : annotations) {
            OWLAnnotationProperty property = owlAnnotation.getProperty();
            if (property.isComment()) {
                OWLAnnotationValue value = owlAnnotation.getValue();
                if (value instanceof OWLLiteral) {
                    OWLLiteral literal = (OWLLiteral) value;
                    comments.add(literal.getLiteral());
                }
            }
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.model.OWLAnnotationValue

Copyright © 2018 www.massapicom. 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.