Examples of OWLAnnotation


Examples of org.semanticweb.owlapi.model.OWLAnnotation

    @Nonnull
    @Override
    protected Set<? extends OWLAxiom> createAxioms() {
        OWLAnnotationProperty ap = AnnotationProperty(IRI("http://annotation.com/annos#prop"));
        OWLLiteral val = Literal("Test", "");
        OWLAnnotation anno = Annotation(ap, val);
        Set<OWLAnnotation> annos = new HashSet<>();
        annos.add(anno);
        OWLClassExpression ce = Class(iri("A"));
        OWLObjectProperty p1 = ObjectProperty(iri("p1"));
        OWLObjectProperty p2 = ObjectProperty(iri("p2"));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotation

            String comment) {
        // Just register the namespace with the consumer and add it as an
        // annotation to the ontology
        getConsumer().setDefaultNamespaceTagValue(value);
        // Add an annotation to the ontology
        OWLAnnotation annotation = getAnnotationForTagValuePair(
                OBOVocabulary.DEFAULT_NAMESPACE.getName(), value);
        applyChange(new AddOntologyAnnotation(getOntology(), annotation));
    }
View Full Code Here

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

Examples of org.semanticweb.owlapi.model.OWLAnnotation

        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

Examples of org.semanticweb.owlapi.model.OWLAnnotation

    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

Examples of org.semanticweb.owlapi.model.OWLAnnotation

          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

Examples of org.semanticweb.owlapi.model.OWLAnnotation

      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

Examples of org.semanticweb.owlapi.model.OWLAnnotation

    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

Examples of org.semanticweb.owlapi.model.OWLAnnotation

        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

Examples of org.semanticweb.owlapi.model.OWLAnnotation

        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
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.