ch.hsr.bieridee.resourcehandler.interfaces
Interface IDocumentResource

All Known Implementing Classes:
BeerResource, BeertypeResource, BreweryResource, ImageResource, TagResource

public interface IDocumentResource

Represents a document resource.


Method Summary
 void remove()
          Delete a document.
 org.restlet.representation.Representation retrieve()
          Retrieve a document.
 org.restlet.representation.Representation store(org.restlet.representation.Representation rep)
          Update or create a document.
 

Method Detail

retrieve

@Get
org.restlet.representation.Representation retrieve()
                                                   throws WrongNodeTypeException,
                                                          org.neo4j.server.rest.web.NodeNotFoundException
Retrieve a document.

Returns:
The document representation.
Throws:
org.neo4j.server.rest.web.NodeNotFoundException
WrongNodeTypeException

store

@Put
org.restlet.representation.Representation store(org.restlet.representation.Representation rep)
                                                throws org.json.JSONException,
                                                       java.io.IOException,
                                                       org.neo4j.graphdb.NotFoundException,
                                                       WrongNodeTypeException
Update or create a document.

Parameters:
rep - The information for the new/update document
Returns:
The created or updated document
Throws:
org.json.JSONException
java.io.IOException
org.neo4j.graphdb.NotFoundException
WrongNodeTypeException

remove

@Delete
void remove()
            throws org.neo4j.graphdb.NotFoundException,
                   WrongNodeTypeException
Delete a document.

Throws:
WrongNodeTypeException
org.neo4j.graphdb.NotFoundException