Contents

Document Format of Operation

Operation DTD

<?xml encoding="UTF-8"?>
 
<!ELEMENT operations (operation)*>
 
<!ELEMENT operation EMPTY>
<!ATTLIST operation
  actor CDATA #REQUIRED
  verb CDATA #REQUIRED
  object1 CDATA #IMPLIED
  object2 CDATA #IMPLIED
  comment CDATA #IMPLIED
  logtime CDATA #REQUIRED>

Example of Operation

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE operation SYSTEM "http://tech-ada.utt.fr/validator/dtd/operation.dtd">
<operations>
  <operation actor="guest" verb="UNLINK" object1="/actor/Folksonomie/" object2="/viewpoint/4/" comment="" logtime="2008-01-07 10:14:45.828"/>
</operations>

XML structure of Operation

XPath Cardinality Description
/operation/@actor Required Actor, who execute this operation
/operation/@verb Required Verb, could be: "LINK", "UNLINK", "CREATE", etc.
/operation/@object1 Optional Object 1
/operation/@object2 Optional Object2
/operation/@comment Optional Comment
/operation/@logtime Required Log time

Get Operation

Get all operations. Note: This method requires an HTTP GET request.

Example Request

GET /operation/

Example Response

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE operation SYSTEM "http://tech-ada.utt.fr/validator/dtd/operation.dtd">
<operations>
  <operation actor="guest" verb="UNLINK" object1="/actor/Folksonomie/" object2="/viewpoint/4/" comment="" logtime="2008-01-07 10:14:45.828"/>
</operations>

Status Codes

200: OK

The request has succeeded.

404: Not Found

The server has not found anything matching the Request-URI.

500: Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

503: Service currently unavailable

The requested service is temporarily unavailable.

Query Operation

Get operations by SQL like clause.

The clause should be encoded with RFC1738 encode.

Note: This method requires an HTTP GET request.

Example Request

GET /operation/set/actor='guest'/

Example Response

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE operation SYSTEM "http://tech-ada.utt.fr/validator/dtd/operation.dtd">
<operations>
  <operation actor="guest" verb="UNLINK" object1="/actor/Folksonomie/" object2="/viewpoint/4/" comment="" logtime="2008-01-07 10:14:45.828"/>
</operations>

Status Codes

200: OK

The request has succeeded.

500: Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

503: Service currently unavailable

The requested service is temporarily unavailable.

Operation Examples

Actor

Create an actor

Create the actor:

Actor ID: actorId
Actor Name: example
Viewpoints:
/viewpoint/1/@'reader'
Verb Object1 Object2 Comment
NAME /actor/actorId/ example
LINK /actor/actorId/ /viewpoint/1/ @role='reader'

Delete an actor

Delete the actor:

Actor ID: actorId
Actor Name: example
Viewpoints:
/viewpoint/1/@'reader'
Verb Object1 Object2 Comment
UNLINK /actor/actorId/ @name='example'
UNLINK /actor/actorId/ /viewpoint/1/ @role='reader'

Update an actor

Update the actor:

Actor ID: actorId 
Actor Name: example
Viewpoints:
/viewpoint/1/@'reader'
/viewpoint/2/@'reader'

The new actor:

Actor ID: actorId
Actor Name: new example
Viewpoints:
/viewpoint/2/@'owner'
/viewpoint/3/@'reader'
Verb Object1 Object2 Comment
RENAME /actor/actorId/ 'new example' @name='example'
UNLINK /actor/actorId/ /viewpoint/1/ @role='reader'
LINK /actor/actorId/ /viewpoint/3/ @role='reader'
UNLINK /actor/actorId/ /viewpoint/2/ @role='reader'
LINK /actor/actorId/ /viewpoint/2/ @role='owner'

Viewpoint

Create a viewpoint

Create the viewpoint:

Viewpoint Name: example
Actors:
 /actor/actorId/@'reader'
Verb Object1 Object2 Comment
NAME /viewpoint/1/ example
LINK /viewpoint/1/ /actor/actorId/ @role='reader'

Delete a viewpoint

Delete the viewpoint:

Viewpoint URI: /viewpoint/1/
Viewpoint Name: example
Actors:
 /actor/actorId/@'reader'
Topics:
 /viewpoint/1/topic/1/ includes /viewpoint/1/topic/2/, /entity/example/
 /viewpoint/1/topic/1/ includes /viewpoint/1/topic/3/
 /viewpoint/1/topic/2/ includes /viewpoint/1/topic/4/
Verb Object1 Object2 Comment
UNLINK /viewpoint/1/ @name='example'
UNLINK /viewpoint/1/ /actor/actorId/ @role='reader'
UNLINK /viewpoint/1/topic/1/ /viewpoint/1/topic/2/ @relationType='includes'
UNLINK /viewpoint/1/topic/1/ /viewpoint/1/topic/3/ @relationType='includes'
UNLINK /viewpoint/1/topic/2/ /viewpoint/1/topic/4/ @relationType='includes'
UNLINK /viewpoint/1/topic/1/ /entity/example/
UNLINK /viewpoint/1/ /viewpoint/1/topic/1/ @name='topic #1'
UNLINK /viewpoint/1/ /viewpoint/1/topic/2/ @name='topic #2'
UNLINK /viewpoint/1/ /viewpoint/1/topic/3/ @name='topic #3'
UNLINK /viewpoint/1/ /viewpoint/1/topic/4/ @name='topic #4'

Update a viewpoint

Update the Viewpoint:

Viewpoint URI: /viewpoint/1/ 
Viewpoint Name: example
Actors:
 /actor/actorId1/@'reader'
 /actor/actorId2/@'reader'

The new viewpoint:

Viewpoint URI: /viewpoint/1/ 
Viewpoint Name: example
Actors:
 /actor/actorId1/@'owner'
 /actor/actorId3/@'reader'
Verb Object1 Object2 Comment
RENAME /viewpoint/1/ 'new example' @name='example'
UNLINK /viewpoint/1/ /actor/acotrId1/ @role='reader'
LINK /viewpoint/1/ /actor/acotrId1/ @role='owner'
UNLINK /viewpoint/1/ /actor/acotrId2/ @role='reader'
LINK /viewpoint/1/ /actor/acotrId3/ @role='reader'

Topic

Create a topic

Create the topic:

Topic URI: /viewpoint/1/topic/1/
Topic Name: example
Related Topics:
 /viewpoint/1/topic/2/@'includes'
 /viewpoint/1/topic/3/@'includedIn'
Entities:
 /entity/example/
Verb Object1 Object2 Comment
NAME /viewpoint/1/topic/1/ example
LINK /viewpoint/1/topic/1/ /viewpoint/1/topic/2/ @relationType='includes'
LINK /viewpoint/1/topic/1/ /viewpoint/1/topic/3/ @relationType='includedIn'
LINK /viewpoint/1/topic/1/ /entity/example/

Delete a topic

Delete the topic:

Topic URI: /viewpoint/1/topic/1/
Topic Name: example
Related Topics:
 /viewpoint/1/topic/2/@'includes'
 /viewpoint/1/topic/3/@'includedIn'
Entities:
 /entity/example/
Verb Object1 Object2 Comment
UNLINK /viewpoint/1/topic/1/ @name='example'
UNLINK /viewpoint/1/topic/1/ /viewpoint/1/topic/2/ @relationType='includes'
UNLINK /viewpoint/1/topic/1/ /viewpoint/1/topic/3/ @relationType='includedIn'
UNLINK /viewpoint/1/topic/1/ /entity/example/

Update a topic

Update the Topic:

Topic URI: /viewpoint/1/topic/1/
Topic Name: example
Related Topics:
 /viewpoint/1/topic/2/@'includes'
 /viewpoint/1/topic/3/@'includedIn'
Entities:
 /entity/example/

The new topic:

Topic URI: /viewpoint/1/topic/1/
Topic Name: topic #1
Related Topics:
 /viewpoint/1/topic/2/@'includedIn'
 /viewpoint/1/topic/4/@'includedIn'
Entities:
 /entity/example/subitem/

Verb Object1 Object2 Comment
RENAME /viewpoint/1/topic/1/ 'topic #1' @name='example'
UNLINK /viewpoint/1/topic/1/ /viewpoint/1/topic/2/ @relationType='includes'
LINK /viewpoint/1/topic/1/ /viewpoint/1/topic/2/ @relationType='includedIn'
UNLINK /viewpoint/1/topic/1/ /viewpoint/1/topic/3/ @relationType='includedIn'
LINK /viewpoint/1/topic/1/ /viewpoint/1/topic/4/ @relationType='includedIn'
UNLINK /viewpoint/1/topic/1/ /entity/example/
LINK /viewpoint/1/topic/1/ /entity/example/subitem/

Entity

Delete an entity

Delete the entity:

Entity URI: /entity/entityid/
Attributes:
 /attribute/name/value/
Resources:
 /resource/name/url/
Topics:
 /viewpoint/1/topic/1/
Verb Object1 Object2 Comment
UNLINK /entity/entityid/
UNLINK /entity/entityid/ /attribute/name/value/
UNLINK /entity/entityid/ /resource/name/url/
UNLINK /entity/entityid/ /viewpoint/1/topic/1/

Create / Update an entity

Update the Entity:

Entity URI: /entity/entityid/
Attributes:
 /attribute/name/value/
Resources:
 /resource/name/url/
Topics:
 /viewpoint/1/topic/1/

The new Entity:

Entity URI: /entity/entityid/
Attributes:
 /attribute/name/value2/
 /attribute/name2/value2/
Resources:
 /resource/name2/url2/
Topics:
 /viewpoint/2/topic/2/
Verb Object1 Object2 Comment
UNLINK /entity/entityid/ /attribute/name/value/
UNLINK /entity/entityid/ /resource/name/url/
UNLINK /entity/entityid/ /viewpoint/1/topic/1/
LINK /entity/entityid/ /attribute/name/value2/
LINK /entity/entityid/ /attribute/name2/value2/
LINK /entity/entityid/ /resource/name2/url2/
LINK /entity/entityid/ /viewpoint2/topic/2/
Powered by MediaWiki