Package org.n52.svalbard.encode
Class ExiEncoder<T>
- java.lang.Object
-
- org.n52.svalbard.encode.AbstractDelegatingEncoder<EXIObject<org.apache.xmlbeans.XmlObject>,T>
-
- org.n52.svalbard.encode.ExiEncoder<T>
-
- All Implemented Interfaces:
Component<EncoderKey>,Keyed<EncoderKey>,Encoder<EXIObject<org.apache.xmlbeans.XmlObject>,T>
- Direct Known Subclasses:
ExiExceptionEncoder,ExiResponseEncoder
public abstract class ExiEncoder<T> extends AbstractDelegatingEncoder<EXIObject<org.apache.xmlbeans.XmlObject>,T>
TODO JavaDoc
-
-
Constructor Summary
Constructors Constructor Description ExiEncoder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description EXIObject<org.apache.xmlbeans.XmlObject>encode(T response)EXIObject<org.apache.xmlbeans.XmlObject>encode(T response, EncodingContext additionalValues)MediaTypegetContentType()protected MediaTypegetEncodedContentType(OwsServiceResponse response)Get encodingMediaTypefromOwsServiceResponseprotected MediaTypegetEncodedContentType(ResponseFormat responseFormat)Get encodingMediaTypefromResponseFormatprotected Encoder<Object,T>getEncoder(T response)Get theEncoderfor theOwsServiceResponseand the requested contentTypeprotected abstract EncoderKeygetKey(T object)-
Methods inherited from class org.n52.svalbard.encode.AbstractDelegatingEncoder
getEncoder, getEncoderRepository, setEncoderRepository
-
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.encode.Encoder
getSupportedTypes
-
-
-
-
Method Detail
-
getContentType
public MediaType getContentType()
-
encode
public EXIObject<org.apache.xmlbeans.XmlObject> encode(T response, EncodingContext additionalValues) throws EncodingException
- Throws:
EncodingException
-
encode
public EXIObject<org.apache.xmlbeans.XmlObject> encode(T response) throws EncodingException
- Throws:
EncodingException
-
getEncoder
protected Encoder<Object,T> getEncoder(T response) throws EncodingException
Get theEncoderfor theOwsServiceResponseand the requested contentType- Parameters:
response-OwsServiceResponseto getEncoderfor- Returns:
Encoderfor theOwsServiceResponse- Throws:
EncodingException- if no encoder could be found
-
getKey
protected abstract EncoderKey getKey(T object)
-
getEncodedContentType
protected MediaType getEncodedContentType(OwsServiceResponse response)
Get encodingMediaTypefromOwsServiceResponse- Parameters:
response-OwsServiceResponseto get content type from- Returns:
- Encoding
MediaType
-
getEncodedContentType
protected MediaType getEncodedContentType(ResponseFormat responseFormat)
Get encodingMediaTypefromResponseFormat- Parameters:
responseFormat-ResponseFormatto get content type from- Returns:
- Encoding
MediaType
-
-