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
Constructors Constructor Description JSONDecoder(Class<T> type)JSONDecoder(Collection<DecoderKey> keys)JSONDecoder(DecoderKey... keys)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Tdecode(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)Set<DecoderKey>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, setDecoderRepository
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.n52.svalbard.decode.Decoder
getSupportedTypes
-
-
-
-
Constructor Detail
-
JSONDecoder
public JSONDecoder(DecoderKey... keys)
-
JSONDecoder
public JSONDecoder(Collection<DecoderKey> keys)
-
-
Method Detail
-
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
public Set<DecoderKey> getKeys()
-
decode
public T decode(com.fasterxml.jackson.databind.JsonNode objectToDecode) throws DecodingException
- 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
protected org.joda.time.DateTime parseDateTime(String time) throws DateTimeParseException
- Throws:
DateTimeParseException
-
parseTime
protected Time parseTime(com.fasterxml.jackson.databind.JsonNode node) throws DateTimeParseException
- Throws:
DateTimeParseException
-
parseCodeWithAuthority
protected CodeWithAuthority parseCodeWithAuthority(com.fasterxml.jackson.databind.JsonNode node)
-
parseCodeType
protected CodeType parseCodeType(com.fasterxml.jackson.databind.JsonNode node)
-
decodeJSON
public abstract T decodeJSON(com.fasterxml.jackson.databind.JsonNode node, boolean validate) throws DecodingException
- Throws:
DecodingException
-
-