org.neo4j.server.rest.repr
Class RepresentationFormat
java.lang.Object
org.neo4j.server.rest.repr.RepresentationFormat
- All Implemented Interfaces:
- InputFormat
public abstract class RepresentationFormat
- extends Object
- implements InputFormat
Implementations of this class must be stateless. Implementations of this
class must have a public no arguments constructor.
- Author:
- Tobias Ivarsson , Andres Taylor
RepresentationFormat
public RepresentationFormat(javax.ws.rs.core.MediaType mediaType)
toString
public String toString()
- Overrides:
toString in class Object
serializeValue
protected abstract String serializeValue(String type,
Object value)
serializeList
protected abstract ListWriter serializeList(String type)
serializeMapping
protected abstract MappingWriter serializeMapping(String type)
complete
protected abstract String complete(ListWriter serializer)
- Will be invoked (when serialization is done) with the result retrieved
from invoking
serializeList(String), it is therefore safe for
this method to convert the ListWriter argument to the
implementation class returned by serializeList(String).
complete
protected abstract String complete(MappingWriter serializer)
- Will be invoked (when serialization is done) with the result retrieved
from invoking
serializeMapping(String), it is therefore safe for
this method to convert the MappingWriter argument to the
implementation class returned by serializeMapping(String).
readParameterList
public ParameterList readParameterList(String input)
throws BadInputException
- Specified by:
readParameterList in interface InputFormat
- Throws:
BadInputException
convertRelationship
protected org.neo4j.graphdb.Relationship convertRelationship(org.neo4j.kernel.GraphDatabaseAPI graphDb,
Object value)
throws BadInputException
- Throws:
BadInputException
convertNode
protected org.neo4j.graphdb.Node convertNode(org.neo4j.kernel.GraphDatabaseAPI graphDb,
Object value)
throws BadInputException
- Throws:
BadInputException
getNode
protected org.neo4j.graphdb.Node getNode(org.neo4j.kernel.GraphDatabaseAPI graphDb,
String value)
throws BadInputException,
NodeNotFoundException
- Throws:
BadInputException
NodeNotFoundException
getNode
protected org.neo4j.graphdb.Node getNode(org.neo4j.kernel.GraphDatabaseAPI graphDb,
URI uri)
throws BadInputException,
NodeNotFoundException
- Throws:
BadInputException
NodeNotFoundException
getRelationship
protected org.neo4j.graphdb.Relationship getRelationship(org.neo4j.kernel.GraphDatabaseAPI graphDb,
URI uri)
throws BadInputException,
RelationshipNotFoundException
- Throws:
BadInputException
RelationshipNotFoundException
convertURI
protected URI convertURI(Object value)
throws BadInputException
- Throws:
BadInputException
convertString
protected String convertString(Object value)
throws BadInputException
- Throws:
BadInputException
convertShort
protected Short convertShort(Object value)
throws BadInputException
- Throws:
BadInputException
convertLong
protected Long convertLong(Object value)
throws BadInputException
- Throws:
BadInputException
convertInteger
protected Integer convertInteger(Object value)
throws BadInputException
- Throws:
BadInputException
convertFloat
protected Float convertFloat(Object value)
throws BadInputException
- Throws:
BadInputException
convertDouble
protected Double convertDouble(Object value)
throws BadInputException
- Throws:
BadInputException
convertCharacter
protected Character convertCharacter(Object value)
throws BadInputException
- Throws:
BadInputException
convertByte
protected Byte convertByte(Object value)
throws BadInputException
- Throws:
BadInputException
convertBoolean
protected Boolean convertBoolean(Object value)
throws BadInputException
- Throws:
BadInputException
complete
public void complete()
Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.