Closed sesuncedu closed 9 years ago
Ah... this would be the filter Axioms by doing a linear search through every single annotation property assertion axiom instead of using the index approach.
Internals::filterAxioms is about to get a minimalist hack.
After, 3.5s. That's a bit better. Now to see what broke
Rings a bell, I think I fixed something similar a month or two ago. Core Developer Misusing Own API Badge Of Shame: ASSIGNED :-(
I've changed a number of calls to Filters.annotations that I had missed first time around. Really that filter should go. I won't touch the area at the moment, if you're making changes as well.
Change made. I didn't pull request because I was feeling too tired, and I hit a weird writer bug in a non test suite run against some modded translated obo - FSS files with imports that didn't fire on related files without imports, and the was too tired to test.
Also: A pun? I mean a palindrome. A palindrome of Bolton would be Notlob.
I've had a peek on your repo, everything looks fine to me. Big boner, the punning test that does the opposite check <shame/>
I'm going to see what a merge looks like .
And I see why the RDF/XML rendering is exploding:
In RDFRenderBase, we create a graph for all annotations for this entity, from anywhere in the imports closure.
private boolean createGraph(@Nonnull OWLEntity entity,
Collection<IRI> illegalPuns) {
...
for (OWLOntology o : ontology.getImportsClosure()) {
axioms.addAll(o.getAnnotationAssertionAxioms(entity.getIRI()));
}
...
In RDFXMLNamespaceManager we get all the annotation properties in the axiom signature that we are going to define namespaces for, but with imports EXCLUDED .
protected Set<OWLEntity> getEntitiesThatRequireNamespaces() {
...
entities.addAll(getOntology().getAnnotationPropertiesInSignature(
EXCLUDED));
...
}
And in XMLWriterImpl, we explode if there is no namespace defined (or for absolutely no reason, if there is a namespace defined whose length is equal to the prefix part of the iri)
public void writeStartElement(IRI name) throws IOException {
String qName = xmlWriterNamespaceManager.getQName(name);
if (qName.length() == name.length()) {
// Could not generate a valid QName, therefore, we cannot
// write valid XML - just throw an exception!
throw new IllegalElementNameException(name.toString());
}
Cause it's all about the base, the base, the base no prefix.
This will move to a new issue and fix after I've had my supper.
Fixed last month.
Whilst looking in to the issue of why some parts of ontology rendering were non-deterministic, I discovered a major problem in the faster punning detection code
This defines defines a punned IRI as one that names a class, a data property, an object property that is not also a data property, etc.
In some ways this is a good thing, as correcting the error causes saving the Gene Ontology as RDF/XML to take half an hour, almost all of the time being in MapPointer.filterAxioms.
Investigation continues.
Also, Annotation Assertions are not sorted. Also, predicates in triples are not totally ordered.