Index of relationships
URI: GET http://www.myexperiment.org/relationships.xml
Example output:
<?xml version="1.0"?>
<relationships>
<relationship uri="http://www.myexperiment.org/relationship.xml?id=2"/>
<relationship uri="http://www.myexperiment.org/relationship.xml?id=3"/>
<relationship uri="http://www.myexperiment.org/relationship.xml?id=4"/>
<relationship uri="http://www.myexperiment.org/relationship.xml?id=5"/>
<relationship uri="http://www.myexperiment.org/relationship.xml?id=6"/>
</relationships>
Create relationship
URL: POST http://www.myexperiment.org/relationship.xml
Example output:
<?xml version="1.0"?>
<relationship>
<subject resource="http://kosh.myexperiment.org:3000/files/4"/>
<predicate resource="http://kosh.myexperiment.org:3000/predicates/1"/>
<object resource="http://kosh.myexperiment.org:3000/workflows/6"/>
<context resource="http://kosh.myexperiment.org:3000/packs/1"/>
</relationship>
Read relationship
URL: GET http://www.myexperiment.org/relationship.xml?id=2
Example output:
<?xml version="1.0"?>
<relationship uri="http://www.myexperiment.org/relationship.xml?id=2">
<id>2</id>
<user uri="http://www.myexperiment.org/user.xml?id=22" resource="http://www.myexperiment.org/users/22">Don Cruickshank</user>
<subject>
<external resource="http://dl.dropbox.com/u/1202407/Presentations/SocialisingEScienceAHM2009final.pptx" uri="http://www.myexperiment.org/external-pack-item.xml?id=142"></external>
</subject>
<predicate uri="http://www.myexperiment.org/predicate.xml?id=5" resource="http://www.myexperiment.org/predicates/5">presentAt</predicate>
<object>
<external resource="http://www.escience2009.org/" uri="http://www.myexperiment.org/external-pack-item.xml?id=433">IEEE e-Science 2009</external>
</object>
<context>
<pack resource="http://www.myexperiment.org/packs/105" uri="http://www.myexperiment.org/pack.xml?id=105">Presentation - Socialising e-Science</pack>
</context>
<created-at>Tue Jun 28 17:27:44 +0100 2011</created-at>
</relationship>
Update relationship
Not implemented as there is nothing to update.
Delete relationship
URL: DELETE http://www.myexperiment.org/relationship.xml?id=2
Example output:
<?xml version="1.0"?>
<relationship uri="http://www.myexperiment.org/relationship.xml?id=2">
<id>2</id>
<user uri="http://www.myexperiment.org/user.xml?id=22" resource="http://www.myexperiment.org/users/22">Don Cruickshank</user>
<subject>
<external resource="http://dl.dropbox.com/u/1202407/Presentations/SocialisingEScienceAHM2009final.pptx" uri="http://www.myexperiment.org/external-pack-item.xml?id=142"></external>
</subject>
<predicate uri="http://www.myexperiment.org/predicate.xml?id=5" resource="http://www.myexperiment.org/predicates/5">presentAt</predicate>
<object>
<external resource="http://www.escience2009.org/" uri="http://www.myexperiment.org/external-pack-item.xml?id=433">IEEE e-Science 2009</external>
</object>
<context>
<pack resource="http://www.myexperiment.org/packs/105" uri="http://www.myexperiment.org/pack.xml?id=105">Presentation - Socialising e-Science</pack>
</context>
<created-at>Tue Jun 28 17:27:44 +0100 2011</created-at>
</relationship>
Elements for relationship
- id - the id of the relationship
- user - the user that created the relationship
- subject - the subject of the relationship (an internal or external item of a pack, such as a workflow, file, pack or external URI)
- predicate - the predicate resource describing the relationship between subject and object
- object - the object of the relationship (an internal or external item of a pack, such as a workflow, file, pack or external URI)
- context - the pack in which this relationship is being defined
- created-at - the date/time that the relationship was created