Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLAnnotation


    @Nonnull
    private OWLAnnotationAssertionAxiom convertToAnnotation(
            @Nonnull OWLNamedIndividual ind,
            @Nonnull OWLDataPropertyAssertionAxiom ax) {
        OWLDataFactory df = getDataFactory();
        OWLAnnotation anno = df.getOWLAnnotation(
                df.getOWLAnnotationProperty(ax.getProperty()
                        .asOWLDataProperty().getIRI()), ax.getObject());
        return df.getOWLAnnotationAssertionAxiom(ind.getIRI(), anno);
    }
View Full Code Here


        if (xrefs != null) {
            StringTokenizer tokenizer = new StringTokenizer(xrefs, ",");
            while (tokenizer.hasMoreTokens()) {
                String xrefValue = tokenizer.nextToken();
                assert xrefValue != null;
                OWLAnnotation xrefAnnotation = getConsumer().parseXRef(
                        xrefValue);
                annotations.add(xrefAnnotation);
            }
        }
        return annotations;
View Full Code Here

    public LegacyEntityAnnotationElementHandler(OWLXMLParserHandler handler) {
        super(handler);
    }

    protected OWLAxiom createAxiom() throws OWLXMLParserException {
        OWLAnnotation anno = annotation;
        annotation = null;
        entity = null;
        return getOWLDataFactory().getOWLAnnotationAssertionAxiom(anno.getProperty(), entity.getIRI(), anno.getValue());
    }
View Full Code Here

          OWLAxiom removeax = factory.getOWLAnnotationAssertionAxiom(
              (OWLAnnotationSubject) annind, ann);
          manager.applyChange(new RemoveAxiom(ontology, removeax));
        }
        String[] array = (String[]) urisandvals.get(keys[i]);
        OWLAnnotation newann = factory.getOWLAnnotation(factory
            .getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL
                .getIRI()), factory.getOWLStringLiteral(
            array[0], "en"));
        OWLAxiom ax = factory.getOWLAnnotationAssertionAxiom(
            annind.getIRI(), newann);
View Full Code Here

      OWLAnnotationSubject annsub = annind.getIRI();
      OWLAxiom removeax = factory.getOWLAnnotationAssertionAxiom(annsub,
          ann);
      manager.applyChange(new RemoveAxiom(ontology, removeax));
    }
    OWLAnnotation newann = factory.getOWLAnnotation(
        factory.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL
            .getIRI()), factory.getOWLStringLiteral(value, "en"));
    OWLAxiom ax = factory.getOWLAnnotationAssertionAxiom(annind.getIRI(),
        newann);
    manager.applyChange(new AddAxiom(ontology, ax));
View Full Code Here

    for (OWLAnnotation ann : anns) {
      OWLAnnotationSubject annsub = ent.getIRI();
      OWLAxiom removeax = factory.getOWLAnnotationAssertionAxiom(annsub, ann);
      manager.applyChange(new RemoveAxiom(ontology, removeax));
    }
    OWLAnnotation newann = factory.getOWLAnnotation(
        factory.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI()), factory.getOWLStringLiteral(value, "en"));
    OWLAxiom ax = factory.getOWLAnnotationAssertionAxiom(ent.getIRI(), newann);
    manager.applyChange(new AddAxiom(ontology, ax));
//    SBMLreactionCollector.logfilewriter.println("RDF label for " + ent.toString() + ": "
//        + value);
View Full Code Here

        OWLClass cls = factory.getOWLClass(IRI.create(CLAZZ));
        OWLDataProperty dp = factory.getOWLDataProperty(IRI.create(DP));
        OWLObjectProperty op = factory.getOWLObjectProperty(IRI.create(OP));
        OWLAnnotationProperty oa = factory.getOWLAnnotationProperty(IRI.create(label));
        OWLAnnotation oav = factory.getOWLAnnotation(oa, factory.getOWLStringLiteral(clazzlabel, "en"));
        OWLDatatype dt = factory.getOWLDatatype(IRI.create(DATATYPE));
        OWLNamedIndividual sub = factory.getOWLNamedIndividual(IRI.create(SUBJECT));
        OWLNamedIndividual obj = factory.getOWLNamedIndividual(IRI.create(OBJECT));
        OWLLiteral literal1 = factory.getOWLTypedLiteral(VALUE, dt);
        OWLDeclarationAxiom daxiomcls = factory.getOWLDeclarationAxiom(cls); // Classe
View Full Code Here

        OWLClass cls = factory.getOWLClass(IRI.create(CLAZZ));
        OWLDataProperty dp = factory.getOWLDataProperty(IRI.create(DP));
        OWLObjectProperty op = factory.getOWLObjectProperty(IRI.create(OP));
        OWLAnnotationProperty oa = factory.getOWLAnnotationProperty(IRI.create(label));
        OWLAnnotation oav = factory.getOWLAnnotation(oa, factory.getOWLStringLiteral(clazzlabel, "en"));
        OWLDatatype dt = factory.getOWLDatatype(IRI.create(DATATYPE));
        OWLNamedIndividual sub = factory.getOWLNamedIndividual(IRI.create(SUBJECT));
        OWLNamedIndividual obj = factory.getOWLNamedIndividual(IRI.create(OBJECT));
        OWLLiteral literal1 = factory.getOWLTypedLiteral(VALUE, dt);
        OWLDeclarationAxiom daxiomcls = factory.getOWLDeclarationAxiom(cls); // Classe
View Full Code Here

                annoAnnos = parseAnnotationList();
            }
            else {
                annoAnnos = Collections.emptySet();
            }
            OWLAnnotation anno = parseAnnotation();
            if (anno != null) {
                anno = anno.getAnnotatedAnnotation(annoAnnos);
                annos.add(anno);
            }
            sep = peekToken();
            if (sep.equals(",")) {
                consumeToken();
View Full Code Here


    private OWLAnnotation parseAnnotation() throws ParserException {
        OWLAnnotationProperty annoProp = parseAnnotationProperty();
        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);
View Full Code Here

TOP

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

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.