views:

68

answers:

1

Hello, I created a bunch of classes using ROWLEX and had them serialized to RDF using

RdfDocument rdfDocument = Rdfizer.Serialize(ontology);

Now i would like to deserialize it (similar to how XmlSerializer.Deserialize() works) so that I could have the data in the ontology populated in my object

I would like to do something like this:

RdfSerializer serializer = new RdfSeriailzer(typeof(MyOntology));
  MyOntology ontology = (MyOntology)serializer.Deserize(fileStream);

Could anyone please tell me how I can deserialize an OWL document back to my object using ROWLEX?

Thanks

+1  A: 

Hello Cryo,

I have a very simple and disappointing answer: deserialization is not implemented.

Rational behind: .NET is a very strict and formal environment while RDF is not. Converting data in a generic manner is only feasible towards the less restrictive direction. Full cycle serialization/deserialization could work reliably only if you are holding both activities in your own hand. If one company implements serialization, sends the RDF over to another company that implements the deserialization, you cannot expect too much. Different kinds of systems have different business logic and perfect 1:1 mapping is not even theoretically possible. It would be possible to build a very fault-tolerant deserialization, but you would get no guarantee that the deserialized .NET objects would carry the same meaning as the original RDF document. Because individuals in RDF documents can be partial by the very nature of RDF.

The only justified reason I can think of where guaranteed serialization/deserialization could work (correct me if I am wrong), if you would use ROWLEX as data storage layer, persisting/retrieving your objects to/from RDF. But there are so many other alternatives to store persist/retrieve your objects. Would you really need this?

ROWLEX Admin