This new version allows the use of PostgresQL instead of SQLite3 (however, performances are
usually lower). It also facilitate the access to SOME restrictions on classes,
using the dotted notation "class.property".
Here are the changes in version 0.9:
* PostgresQL backend (in addition to SQLite3)
* Add 'exclusive = False' option for SQLite3 backend (slower, but allows multiple uses)
* Use unique index in sqlite3 quadstore on resources table
* Optimize sqlite3 quadstore by caching IRI dict (5% faster)
* Add == support for class construct
* Add get_namespace() support on World
* Add 'existential restrictions as class properties' feature
- Fix imported ontologies
- Fix saving ontologies in onto_path
- Fix clear() on CallbackList
- Fix bug in Class IRI in ontologies whose base IRI ends with a /
- Fix imported ontologies in ontologies whose base IRI ends with a /
I tried to load these ontologies. The problem (owlready2.base.OwlReadyOntologyParsingError: NTriples parsing error) is caused because doid.owl imports ontology "http://purl.obolibrary.org/obo/doid/obo/ext.owl", which is not a a format readable by Owlready2 (currently, NTriple, RDF/XML or OWL/XML).
The only solution is to translate this file in a supported format (e.g. manually using Protege), and to save it as a local copy in a directory listed in onto_path.
Notice that the same will apply for any other ontologies loaded by ext.owl.
This is the code to load my ontologies. It works well in my computer but when i try to send my appl on a remote server(i use heroku platform) i got this error :module 'owlready2' has no attribute 'namespace'
def load_ontologies(self, ontology_path=os.path.dirname('/ontologia/ontologies')):
for name in self.ontologies:
onto = get_ontology(self.ontologies[name])
self.number_ontologies += 1
self.obo = onto.get_namespace("http://purl.obolibrary.org/obo/")