Ticket #1 (closed enhancement: fixed)

Opened 15 months ago

Last modified 10 months ago

rdflibSingle and rdflibMultiple should check for rdfs types

Reported by: phil Owned by: phil
Priority: major Milestone: RDFAlchemy 0.2
Component: rdfAlchemy Keywords: rdfs
Cc:

Description

The descriptors should check for rdfs type of the object

If it's a literal:

  • __set__ method should coerce/ force python type to rdf Literal
  • __get__ should do the reverse

If it's a URIRef:

Check the rdf:type of the returned item. Can set the python type (subclass of rdfObject like Company or whatever). This introspection can be done during the descriptor __init__ so it doesn't have to happen at get time

Change History

Changed 15 months ago by phil

  • status changed from new to accepted
  • milestone set to RdfAlchemy 0.1

Changed 10 months ago by http://astro.pip.verisignlabs.com/

  • status changed from new to closed

Changed 10 months ago by http://openvest.myopenid.com/

This is closed with the following comments:

The descriptors should check for rdfs type of the object

If it's a literal:

* set method should coerce/ force python type to rdf Literal

This is done on the actual datatype of the returned Literal

* get should do the reverse

If it's a URIRef:

Check the rdf:type of the returned item. Can set the python type (subclass of rdfObject like Company or whatever). This introspection can be done during the descriptor init so it doesn't have to happen at get time

if it's a Literal, the Literal.toPython() call get's it done...mostly.

The general spirit of this posting fall under the perview of database consistency checking and belongs in either a branch or a milestone with RDFS or OWL inverence checks. Likeley a submodule like orm is

Changed 10 months ago by http://openvest.myopenid.com/

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.