Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotate ontology annotations #791

Closed
ignazio1977 opened this issue Sep 30, 2018 · 0 comments
Closed

Annotate ontology annotations #791

ignazio1977 opened this issue Sep 30, 2018 · 0 comments
Labels

Comments

@ignazio1977
Copy link
Contributor

This test needs to pass:

@test
public void shouldAnnotateOntologyannotations()
throws OWLOntologyCreationException, OWLOntologyStorageException {
IRI create = IRI.create("urn:test:onto");
OWLOntology o = m.createOntology(create);
OWLAnnotationProperty p1 = AnnotationProperty(iri("p1"));
OWLAnnotationProperty p2 = AnnotationProperty(iri("p2"));
OWLLiteral ann1 = Literal("value1");
OWLLiteral ann2 = Literal("value2");
OWLAnnotation a2 = df.getOWLAnnotation(p2, ann2);
OWLAnnotation a1 = df.getOWLAnnotation(p1, ann1, a2);
o.applyChange(new AddOntologyAnnotation(o, a1));
System.out.println("AnnotatetAnnotationsTestCase.shouldAnnotateOntologyannotations() "
+ saveOntology(o, new RDFXMLDocumentFormat()));
System.out.println("AnnotatetAnnotationsTestCase.shouldAnnotateOntologyannotations() "
+ saveOntology(o, new FunctionalSyntaxDocumentFormat()));
OWLOntology o1 = roundTrip(o, new FunctionalSyntaxDocumentFormat());
equal(o, o1);
o1 = roundTrip(o, new RDFXMLDocumentFormat());
equal(o, o1);
}

Also ensure that all annotation properties are declared - this is not the case in functional syntax.

ignazio1977 added a commit that referenced this issue Sep 30, 2018
Missing that, renderers do not know to add declarations as required.
Related to #791
ignazio1977 added a commit that referenced this issue Oct 28, 2018
Missing that, renderers do not know to add declarations as required.
Related to #791
ignazio1977 added a commit that referenced this issue Nov 17, 2018
Missing that, renderers do not know to add declarations as required.
Related to #791
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant