cordawyn / spira

Fork of Spira with experimental branches, occasionally merged upstream.
http://blog.datagraph.org/2010/05/spira
The Unlicense
8 stars 2 forks source link

Integration of rdf-xsd #18

Open cordawyn opened 11 years ago

cordawyn commented 11 years ago

Consider integrating rdf-xsd with Spira, thus getting rid of type duplicates. Perhaps move serialize and unserialize methods to the classes of rdf-xsd? Several types of Spira seem to be missing in rdf-xsd (e.g. "boolean"). @gkellogg ?

gkellogg commented 11 years ago

The types that aren't in rdf-xsd are native to RDF.rb, such as xsd:schema. Missing is xsd:string (which is changing in RDF 1.1) and rdf:langString (new in RDF 1.1).

Serializing a typed literal is typically done with #to_s, after canonicalizing. Parsing should also be done in #initialize. See the specs for both RDF.rb and rdf-xsd.

I'm certainly open to adding more convenience methods if something is missing.