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

Review signatures, add exceptions as required #349

Closed
jamesaoverton opened this issue Aug 16, 2018 · 4 comments
Closed

Review signatures, add exceptions as required #349

jamesaoverton opened this issue Aug 16, 2018 · 4 comments
Assignees
Milestone

Comments

@jamesaoverton
Copy link
Member

See #344. We want to maintain backwards compatibility as much as possible, but there are some mistakes that we should fix. It would be better to do this all at once for the 1.2.0 release (which will already break backwards compatibility in QueryOperation because of Jena updates #314).

@beckyjackson
Copy link
Contributor

I was looking at DiffOperation.java and it looks like the original implementation was supposed to include labels and short forms of IRIs (the addLabels method), but it doesn't execute properly.

Updating it changes the output of diff to look something like this:

+ AnnotationAssertion(<obo:IAO_0000117>[term editor] <obo:OBI_0000921>[labeled RNA extract] "Group: OBI group"^^xsd:string)
+ AnnotationAssertion(<obo:IAO_0000117>[term editor] <obo:OBI_0000924>[labeled specimen] "OBI group"^^xsd:string)
+ AnnotationAssertion(<obo:IAO_0000117>[term editor] <obo:OBI_0000925>[infectious agent] "IEDB"@en)
+ AnnotationAssertion(<obo:IAO_0000117>[term editor] <obo:OBI_0000930>[calorimeter] "PERSON:Bjoern Peters"^^xsd:string)

As opposed to the original:

+ AnnotationAssertion(<http://purl.obolibrary.org/obo/IAO_0000117> <http://purl.obolibrary.org/obo/OBI_0000921> "Group: OBI group"^^xsd:string)
+ AnnotationAssertion(<http://purl.obolibrary.org/obo/IAO_0000117> <http://purl.obolibrary.org/obo/OBI_0000924> "OBI group"^^xsd:string)
+ AnnotationAssertion(<http://purl.obolibrary.org/obo/IAO_0000117> <http://purl.obolibrary.org/obo/OBI_0000925> "IEDB"@en)
+ AnnotationAssertion(<http://purl.obolibrary.org/obo/IAO_0000117> <http://purl.obolibrary.org/obo/OBI_0000930> "PERSON:Bjoern Peters"^^xsd:string)

Is this something that should be fixed? I can always do it in a separate issue tracker/PR, but it does add exceptions to some of the methods in DiffOperation.java.

@jamesaoverton
Copy link
Member Author

I changed the default to not look up labels, because of performance problems: #47

I'd rather fix the docs than change this (non-label default) behaviour.

@beckyjackson
Copy link
Contributor

That makes sense. The compare method still loads all the labels from both ontologies, though. We could speed up the diff time by removing this if we aren't using labels anyway:

Map<IRI, String> labels = OntologyHelper.getLabels(ontology1);
labels.putAll(OntologyHelper.getLabels(ontology2));

beckyjackson pushed a commit to beckyjackson/robot that referenced this issue Aug 21, 2018
jamesaoverton added a commit that referenced this issue Aug 23, 2018
Add new Exceptions, optimize codebase, see #349
@beckyjackson
Copy link
Contributor

Closed by #351

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants