[Esip-drupal] making associations in Drupal for later LOD export

Adam Shepherd ashepherd at whoi.edu
Thu Aug 1 09:32:13 EDT 2013


I haven't tried this in Drupal 6, but my guess would be you'd would make 
the following changes:

Step 1: use node_reference module from cck module 
(https://drupal.org/project/cck) instead of entityreference
Step 2: use the RDF module (https://drupal.org/project/RDF) instead of rdfx

For the triplestore, there isn't a module I know of for D6 that 
populates external stores, but you could still use the ARC2 store in 
Drupal to stand up a SPARQL endpoint by using the SPARQL module 
(http://drupal.org/project/sparql). Things get a little wonky with this 
module if you have more than 500 nodes to index where you need to apply 
a patch (http://drupal.org/files/sparql_rebuild.patch).

For RDF serialization, I don't know of a module for D6 like restws, but 
the ARC2 code, which is a requirement of the SPARQL module,  has an RDF 
Serializer class: ARC2_RDFXMLSerializer that you could use by calling 
its getSerializedIndex() function to return an RDF+XML string.

cheers, Adam

---------------------------------------------------------------------------------------
Adam Shepherd                                     voice: 508.289.2772
MS #36, Shiverick, WHOI                           fax: 508.289.2009
Woods Hole, MA  02543                         skype: ashep15
ashepherd at whoi.edu                            drupal: ashepherd

Biological and Chemical Oceanography Data Management Office
Computer and Information Services
Woods Hole Oceanographic Institution
---------------------------------------------------------------------------------------
http://www.whoi.edu/profile/ashepherd
http://bco-dmo.org




On 8/1/13 9:18 AM, Lynnes, Christopher S. (GSFC-6102) wrote:
> Great recipe, thx Adam!  Would this work in either Drupal 6 or Drupal 7?
>
> On Jul 31, 2013, at 1:18 PM, Adam Shepherd <ashepherd at whoi.edu> wrote:
>
>> Hi Chris,
>>
>> Thanks for posing a question here! The way I would do this would be the following:
>>
>> 1. create an entity reference field (https://drupal.org/project/entityreference) on the one of your content types to setup the relationship.
>> 2. install the rdfx module (https://drupal.org/project/rdfx)
>> 3. enable rdfx and rdf_ui
>> 4. declare your RDF mappings & namespaces you plan to use at URL: admin/config/services/rdf
>>
>> At this point you have the option to generate RDF for each entity in a couple of ways:
>>
>> 1. with the restWS module (https://drupal.org/project/restws), you can expose your RDF by adding the ".rdf" file extension onto a URL like 'node/1234'
>> - 'node/1234.rdf' returns RDF/XML
>>
>> 2. the rdf_indexer module (https://drupal.org/project/rdf_indexer) can stand up a SPARQL endpoint for your RDF to be queried.
>> - this was the topic of the June ESIP Drupal call here: http://commons.esipfed.org/node/1597
>> - I just submitted a patch to this module that provides support for populating external triplestores like Virtuoso here: https://drupal.org/node/2029717#comment-7685267
>>
>>
>> If you need ANY help, please feel free to contact me as we've gone through this process a few times at WHOI.
>>
>> cheers, Adam
>>
>> ---------------------------------------------------------------------------------------
>> Adam Shepherd                                     voice: 508.289.2772
>> MS #36, Shiverick, WHOI                           fax: 508.289.2009
>> Woods Hole, MA  02543                         skype: ashep15
>> ashepherd at whoi.edu                            drupal: ashepherd
>>
>> Biological and Chemical Oceanography Data Management Office
>> Computer and Information Services
>> Woods Hole Oceanographic Institution
>> ---------------------------------------------------------------------------------------
>> http://www.whoi.edu/profile/ashepherd
>> http://bco-dmo.org
>>
>>
>>
>> On Jul 31, 2013, at 1:03 PM, "Lynnes, Christopher S. (GSFC-6102)" <christopher.s.lynnes at nasa.gov> wrote:
>>
>>> Hey, we're running Drupal 7 here and are going to have two content types, Data Collection and Tools.
>>> We want to associate which Tools are applicable to which Data Collections, so that we can generate links to the Tool pages in a given Data Collection page.
>>> Ideally, would also like to be able to extract those relationships into Linked Open Data or some similar semantic web construct.
>>> Have any of you all done something like this?  What is the best way to do it?
>>> --
>>> Dr. Christopher Lynnes     NASA/GSFC, Code 610.2    phone: 301-614-5185
>>> "Making the simple complicated is commonplace; making the complicated simple, awesomely simple, that's creativity." -- C. Mingus
>>>
>>>
>>> _______________________________________________
>>> Esip-drupal mailing list
>>> Esip-drupal at lists.esipfed.org
>>> http://www.lists.esipfed.org/mailman/listinfo/esip-drupal
>>>
> --
> Dr. Christopher Lynnes     NASA/GSFC, Code 610.2    phone: 301-614-5185
> "Perfection is achieved, not when there is nothing left to add, but when there is nothing left to take away" -- A. de Saint-Exupery
>
>
>
>
>
>



More information about the Esip-drupal mailing list