Package org.n52.svalbard.decode.json
Class JSONDecoder<T>
java.lang.Object
org.n52.svalbard.decode.AbstractDelegatingDecoder<T,com.fasterxml.jackson.databind.JsonNode>
org.n52.svalbard.decode.json.JSONDecoder<T>
- All Implemented Interfaces:
Component<DecoderKey>,Keyed<DecoderKey>,Decoder<T,com.fasterxml.jackson.databind.JsonNode>
- Direct Known Subclasses:
AbstractSosRequestDecoder
public abstract class JSONDecoder<T>
extends AbstractDelegatingDecoder<T,com.fasterxml.jackson.databind.JsonNode>
TODO JavaDoc
- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionJSONDecoder(Class<T> type) JSONDecoder(Collection<DecoderKey> keys) JSONDecoder(DecoderKey... keys) -
Method Summary
Modifier and TypeMethodDescriptiondecode(com.fasterxml.jackson.databind.JsonNode objectToDecode) abstract TdecodeJSON(com.fasterxml.jackson.databind.JsonNode node, boolean validate) protected <T> TdecodeJsonToObject(com.fasterxml.jackson.databind.JsonNode json, Class<T> type) protected <T> List<T> decodeJsonToObjectList(com.fasterxml.jackson.databind.JsonNode node, Class<T> type) getKeys()protected CodeTypeparseCodeType(com.fasterxml.jackson.databind.JsonNode node) protected CodeWithAuthorityparseCodeWithAuthority(com.fasterxml.jackson.databind.JsonNode node) protected org.joda.time.DateTimeparseDateTime(String time) protected TimeparseTime(com.fasterxml.jackson.databind.JsonNode node) protected TimeInstantparseTimeInstant(com.fasterxml.jackson.databind.JsonNode node) protected TimePeriodparseTimePeriod(com.fasterxml.jackson.databind.JsonNode node) Methods inherited from class org.n52.svalbard.decode.AbstractDelegatingDecoder
getDecoder, getDecoderRepository, setDecoderRepositoryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.n52.svalbard.decode.Decoder
getSupportedTypes
-
Constructor Details
-
JSONDecoder
-
JSONDecoder
-
JSONDecoder
-
-
Method Details
-
decodeJsonToObject
protected <T> T decodeJsonToObject(com.fasterxml.jackson.databind.JsonNode json, Class<T> type) throws DecodingException - Throws:
DecodingException
-
decodeJsonToObjectList
protected <T> List<T> decodeJsonToObjectList(com.fasterxml.jackson.databind.JsonNode node, Class<T> type) throws DecodingException - Throws:
DecodingException
-
getKeys
-
decode
- Throws:
DecodingException
-
parseTimeInstant
protected TimeInstant parseTimeInstant(com.fasterxml.jackson.databind.JsonNode node) throws DateTimeParseException - Throws:
DateTimeParseException
-
parseTimePeriod
protected TimePeriod parseTimePeriod(com.fasterxml.jackson.databind.JsonNode node) throws DateTimeParseException - Throws:
DateTimeParseException
-
parseDateTime
- Throws:
DateTimeParseException
-
parseTime
protected Time parseTime(com.fasterxml.jackson.databind.JsonNode node) throws DateTimeParseException - Throws:
DateTimeParseException
-
parseCodeWithAuthority
-
parseCodeType
-
decodeJSON
public abstract T decodeJSON(com.fasterxml.jackson.databind.JsonNode node, boolean validate) throws DecodingException - Throws:
DecodingException
-