Document Format of ActorActor List DTD<?xml encoding="UTF-8"?> <!ELEMENT actors (actor)*> <!ATTLIST actors href CDATA #IMPLIED> <!ELEMENT actor (#PCDATA)> <!ATTLIST actor href CDATA #REQUIRED> Example of Actor List<?xml version='1.0' encoding='UTF-8'?> <actors> <actor href="http://tech-ada.utt.fr/actor/windows+user/">windows xp user</actor> <actor href="http://tech-ada.utt.fr/actor/linux+fans/">linux fans group</actor> </actors> Actor DTD<?xml encoding="UTF-8"?> <!ELEMENT actor (viewpoint)*> <!ATTLIST actor name CDATA #IMPLIED href CDATA #IMPLIED> <!ELEMENT viewpoint (#PCDATA)> <!ATTLIST viewpoint href CDATA #REQUIRED role CDATA #IMPLIED name CDATA #IMPLIED> Example of Actor<?xml version='1.0' encoding='UTF-8'?> <actor name="linux fans"> <viewpoint href="http://tech-ada.utt.fr/viewpoint/1/" role="publisher">Software features</viewpoint> <viewpoint href="http://tech-ada.utt.fr/viewpoint/2/" role="author">Software creators</viewpoint> </actor> XML structure of Actor
Create or Update ActorTo create or update an actor, using PUT method. If the actor doesn't exist, this method will create a new actor. If the actor exists, this method will replace it. Argumentsactorname (Required)
ExamplesTo create a new actor (identity: linux fans, full name: linux fans group) without linking to any viewpoint, send a PUT request, and supply a new actor in specific format: PUT http://tech-ada.utt.fr/actor/linux+fans/ <?xml version='1.0' encoding='UTF-8'?> <actor name="linux fans group" /> The server responds: 201 Created Location: http://tech-ada.utt.fr/actor/linux+fans/ Note: If you try to link a viewpoint which doesn't exist to an actor, this request will not be executed successful. To update an actor, using PUT request. The following example shows how to update an actor: PUT http://tech-ada.utt.fr/actor/linux+fans/ <?xml version='1.0' encoding='UTF-8'?> <actor name="linux fans group"> <viewpoint href="http://tech-ada.utt.fr/viewpoint/1/" role="publisher">Software features</viewpoint> <viewpoint href="http://tech-ada.utt.fr/viewpoint/2/" role="author">Software creators</viewpoint> </actor> The server responds: 205 Reset Content Note: Before you update the actor 'linux fans', please create the viewpoint 'Software feature' and 'Software creators' first. Status Codes201: Created
205: Reset Content
400: Bad Request
500: Internal Server Error
503: Service currently unavailable
Delete an actorDelete an actor by actorname. Argumentsactorname (Required)
ExamplesTo delete an actor, send DELETE request to actor's URI. DELETE http://tech-ada.utt.fr/actor/linux+fans/ The server responds: 200 OK If the specific actor doesn't exist, this method will return 404 status code. Status Codes200: OK
404: Not Found
500: Internal Server Error
503: Service currently unavailable
Get List of ActorGet a list of all actors. Argumentsnone ExamplesTo get a list of all actors, send GET request to /actor/. The following example shows how to get a list of actor: GET http://tech-ada.utt.fr/actor/ The server responds: <?xml version='1.0' encoding='UTF-8'?> <actors> <actor href="http://tech-ada.utt.fr/actor/windows+user/">windows user</actor> <actor href="http://tech-ada.utt.fr/actor/linux+fans/">linux fans</actor> <actor href="http://tech-ada.utt.fr/actor/mac+os+fans/">mac os fans</actor> </actors> Status Codes200: OK
500: Internal Server Error
Get an ActorGet a specific actor's information. Argumentsactorname (Required)
ExamplesGET http://tech-ada.utt.fr/actor/linux+fans/ The server responds: <?xml version='1.0' encoding='UTF-8'?> <actor name="linux fans"> <viewpoint href="http://tech-ada.utt.fr/viewpoint/1/" role="publisher">Software features</viewpoint> <viewpoint href="http://tech-ada.utt.fr/viewpoint/2/" role="author">Software creators</viewpoint> </actor> Status Codes200: OK
404: Not Found
500: Internal Server Error
503: Service currently unavailable
![]() |