Owlready2 0.22 has been released!

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Owlready2 0.22 has been released!

Jiba
Administrator
Hi everybody,

This new release adds support for disjoint unions, blank node creation with RDFlib, and removes OwlReadySharedBlankNodeError when transfering constructs.

Here are the changes:

* Add support for disjoint unions (Class.disjoint_unions)
* Add deepcopy support on class constructs, and automatically deep-copy constructs when needed (i.e. no more OwlReadySharedBlankNodeError)
* Support the creation of blank nodes with RDFlib

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Owlready2 0.22 has been released!

Peter
Thanks Jiba
Do you have any illustrations of the additional bnode functionality to share please?
Reply | Threaded
Open this post in threaded view
|

Re: Owlready2 0.22 has been released!

Jiba
Administrator
Hi,

You can now create blank node with RDFlib, however, you need to create the blank node with the new BNode() method of the graph object, as in the following example:


import rdflib
graph = default_world.as_rdflib_graph()

bn = graph.BNode()

with onto:
      graph.add((bn, rdflib.URIRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), rdflib.URIRef("http://www.w3.org/2002/07/owl#Class")))

Jiba