org.neo4j.server.rest.repr
Class DefaultFormat
java.lang.Object
org.neo4j.server.rest.repr.RepresentationFormat
org.neo4j.server.rest.repr.DefaultFormat
- All Implemented Interfaces:
- org.neo4j.server.rest.repr.InputFormat
public class DefaultFormat
- extends org.neo4j.server.rest.repr.RepresentationFormat
This class decorates another RepresentationFormat (called inner here), and
tries to use inner to parse stuff. If it fails, it will throw an appropriate
exception, and not just blow up with an exception that leads to HTTP STATUS
500
|
Constructor Summary |
DefaultFormat(org.neo4j.server.rest.repr.RepresentationFormat inner,
Collection<javax.ws.rs.core.MediaType> supported,
javax.ws.rs.core.MediaType... requested)
|
| Methods inherited from class org.neo4j.server.rest.repr.RepresentationFormat |
complete, convertBoolean, convertByte, convertCharacter, convertDouble, convertFloat, convertInteger, convertLong, convertNode, convertRelationship, convertShort, convertString, convertURI, getNode, getNode, getRelationship, readParameterList, toString |
DefaultFormat
public DefaultFormat(org.neo4j.server.rest.repr.RepresentationFormat inner,
Collection<javax.ws.rs.core.MediaType> supported,
javax.ws.rs.core.MediaType... requested)
serializeValue
protected String serializeValue(String type,
Object value)
- Specified by:
serializeValue in class org.neo4j.server.rest.repr.RepresentationFormat
serializeList
protected org.neo4j.server.rest.repr.ListWriter serializeList(String type)
- Specified by:
serializeList in class org.neo4j.server.rest.repr.RepresentationFormat
serializeMapping
protected org.neo4j.server.rest.repr.MappingWriter serializeMapping(String type)
- Specified by:
serializeMapping in class org.neo4j.server.rest.repr.RepresentationFormat
complete
protected String complete(org.neo4j.server.rest.repr.ListWriter serializer)
- Specified by:
complete in class org.neo4j.server.rest.repr.RepresentationFormat
complete
protected String complete(org.neo4j.server.rest.repr.MappingWriter serializer)
- Specified by:
complete in class org.neo4j.server.rest.repr.RepresentationFormat
readValue
public Object readValue(String input)
readMap
public Map<String,Object> readMap(String input,
String... requiredKeys)
throws org.neo4j.server.rest.repr.BadInputException
- Throws:
org.neo4j.server.rest.repr.BadInputException
readList
public List<Object> readList(String input)
throws org.neo4j.server.rest.repr.BadInputException
- Throws:
org.neo4j.server.rest.repr.BadInputException
readUri
public URI readUri(String input)
throws org.neo4j.server.rest.repr.BadInputException
- Throws:
org.neo4j.server.rest.repr.BadInputException
validateKeys
public static <T> Map<String,T> validateKeys(Map<String,T> map,
String... requiredKeys)
throws org.neo4j.server.rest.repr.BadInputException
- Throws:
org.neo4j.server.rest.repr.BadInputException
Copyright © 2002-2014 The Neo4j Graph Database Project. All Rights Reserved.