Alternative RDF in core implementation draft

Events happening in the community are now at Drupal community events on www.drupal.org.
fago's picture

I've just hacked together some function skeletons showing some of my ideas for the rdf in core stuff - it's working on top of schema information that modules may return for arbitrary classes, which modules may expose too. Other modules can then alter this information and so change rdf properties / classes associated with it.

Implementation draft: http://drupalbin.com/9322
I've also attached a file containing the draft.

This should allow us to build the token patch on top of it, but also
* it does lazy loading, so there is no need load stuff that isn't need anyway
* it allows using callbacks for retrieving the actual property value
* for drupal_render one could just add #rdf_class and #rdf_property to an element, where the first is a reference on a RDFClass object as in code. So only if really used, the properties are fetched and integrated into the theme easily.
* having some schema information for the properties in place makes it easy to identify whether some other RDF Properties are compatible, so a contrib module could build an UI for selecting such properties.
* Field types can provide their schema information, so we can generate a (new) property on the fly.

We could use the xsd datatypes for the 'datatype' property of literals directly, but I think it's simpler with just using php primitive data types and then do an automatically mapping to xsd types when generating a real rdf schema.

Open questions are, how literals should be represented. If the language or a datatype is specified, we could add another (php)class for them or just an array. For simplicity we should also support using php primitive datatypes (string, integer,...).

AttachmentSize
rdf_core.php_.txt3.79 KB

Comments

*_*

beautifulmind's picture

The Url you mentioned doesn't opening.

:)
Beautifulmind

Semantic Web

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: