Closed ar-chad closed 2 weeks ago
Hi @ar-chad ! I wonder if this is fixed since we updated the version of QUDT imported by Brick. I was able to load the latest nightly build in Protege successfully this morning. Can you give it a try when you get a chance?
@gtfierro thank you for fixing this. I was able to load Brick+imports.ttl
, Brick-only.ttl
Brick+extensions.ttl
and Brick.ttl
from the latest nightly build with the latest available version of Protege (5.6.4), in this order.
@gtfierro, I was going to try to help by looking at the QUDT imports, but I cannot generate the Brick ttl files any more. I used to be able to go to the Brick repo and run my alias that is defined as follows:
rm -r brickvenv;python3 -m venv brickvenv;source brickvenv/bin/activate;pip install -r requirements.txt;pre-commit install;python generate_brick.py'
but now it says:
Traceback (most recent call last):
File "/Users/steveray/Repositories/Brick/generate_brick.py", line 22, in <module>
from bricksrc.env import env
File "/Users/steveray/Repositories/Brick/bricksrc/env.py", line 3, in <module>
env = OntoEnv(cfg)
^^^^^^^^^^^^
ValueError: IO error for operation on rec/Source/SHACL/RealEstateCore: No such file or directory (os error 2)
Any suggestions on what I'm missing?
The RealEstateCore stuff is now in a git submodule! If you run the command from step 2 then the build should work
Thanks, that did the trick! I'll update my alias definition.
(Incidentally, do you include imports/qudtusertest.ttl in your build? I'm not sure I'm looking in the right place)
I think it is currently included. https://github.com/BrickSchema/Brick/blob/master/bricksrc/ontology.py#L36 has the list of imports for the Brick build
There is an issue with loading Brick.ttl 1.4.1 in Protege
At some point it can't resolve import:
And after that fails with an error:
Stack trace of the error is bellow:
Ontology already exists. OntologyID(OntologyIRI(http://qudt.org/2.1/vocab/dimensionvector) VersionIRI())
Full Stack Trace
org.semanticweb.owlapi.model.OWLOntologyAlreadyExistsException: Ontology already exists. OntologyID(OntologyIRI(http://qudt.org/2.1/vocab/dimensionvector) VersionIRI())
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:1253)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:1200)
at org.protege.editor.owl.model.io.OntologyLoader.loadOntologyInternal(OntologyLoader.java:124)
at org.protege.editor.owl.model.io.OntologyLoader.lambda$loadOntologyInOtherThread$0(OntologyLoader.java:71)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.semanticweb.owlapi.model.OWLOntologyRenameException: Could not rename ontology. An ontology with this ID already exists: OntologyID(OntologyIRI(http://qudt.org/2.1/vocab/dimensionvector) VersionIRI()) change: SetOntologyIDData(OntologyID(OntologyIRI(http://qudt.org/2.1/vocab/dimensionvector) VersionIRI()))
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.checkForOntologyIDChange(OWLOntologyManagerImpl.java:882)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.enactChangeApplication(OWLOntologyManagerImpl.java:642)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.applyChanges(OWLOntologyManagerImpl.java:670)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.applyChange(OWLOntologyManagerImpl.java:820)
at org.semanticweb.owlapi.rdf.rdfxml.parser.OWLRDFConsumer.applyChange(OWLRDFConsumer.java:733)
at org.semanticweb.owlapi.rdf.rdfxml.parser.OWLRDFConsumer.chooseAndSetOntologyIRI(OWLRDFConsumer.java:1492)
at org.semanticweb.owlapi.rdf.rdfxml.parser.OWLRDFConsumer.endModel(OWLRDFConsumer.java:1393)
at org.semanticweb.owlapi.rio.RioOWLRDFConsumerAdapter.endRDF(RioOWLRDFConsumerAdapter.java:78)
at org.semanticweb.owlapi.rio.RioParserImpl$RioParserRDFHandler.endRDF(RioParserImpl.java:300)
at org.eclipse.rdf4j.rio.turtle.TurtleParser.parse(TurtleParser.java:170)
at org.eclipse.rdf4j.rio.turtle.TurtleParser.parse(TurtleParser.java:125)
at org.semanticweb.owlapi.rio.RioParserImpl.parseDocumentSource(RioParserImpl.java:245)
at org.semanticweb.owlapi.rio.RioParserImpl.parse(RioParserImpl.java:185)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OWLOntologyFactoryImpl.java:220)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.actualParse(OWLOntologyManagerImpl.java:1303)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:1243)
... 7 more