T
- concrete AbstractServiceResponse
public class AbstractSosResponseEncoder<T extends AbstractServiceResponse> extends Object implements Encoder<EXIObject,T>
EXIObject
Modifier and Type | Field and Description |
---|---|
private Set<EncoderKey> |
encoderKeys |
private static org.slf4j.Logger |
LOGGER |
Constructor and Description |
---|
AbstractSosResponseEncoder(Class<T> type,
Enum<?> operation,
String version)
Constructor
|
AbstractSosResponseEncoder(Class<T> type,
String operation,
String version)
Constructor
|
private static final org.slf4j.Logger LOGGER
private final Set<EncoderKey> encoderKeys
public AbstractSosResponseEncoder(Class<T> type, String operation, String version)
type
- Concrete AbstractServiceResponse
classoperation
- SOS operation as String
version
- SOS versionpublic EXIObject encode(T objectToEncode, Map<SosConstants.HelperValues,String> additionalValues) throws OwsExceptionReport, UnsupportedEncoderInputException
Encoder
encode
in interface Encoder<EXIObject,T extends AbstractServiceResponse>
objectToEncode
- the object to encodeadditionalValues
- the helper valuesOwsExceptionReport
- if an error occursUnsupportedEncoderInputException
- if the supplied object (or any of it's contents) is not
supported by this encoderpublic EXIObject encode(T objectToEncode) throws OwsExceptionReport, UnsupportedEncoderInputException
Encoder
encode
in interface Encoder<EXIObject,T extends AbstractServiceResponse>
objectToEncode
- the object to encodeOwsExceptionReport
- if an error occursUnsupportedEncoderInputException
- if the supplied object (or any of it's contents) is not
supported by this encoderpublic Map<ServiceConstants.SupportedTypeKey,Set<String>> getSupportedTypes()
Encoder
getSupportedTypes
in interface Encoder<EXIObject,T extends AbstractServiceResponse>
public Set<String> getConformanceClasses()
getConformanceClasses
in interface ConformanceClass
public Set<EncoderKey> getEncoderKeyType()
getEncoderKeyType
in interface Encoder<EXIObject,T extends AbstractServiceResponse>
EncoderKey
)public void addNamespacePrefixToMap(Map<String,String> nameSpacePrefixMap)
Encoder
addNamespacePrefixToMap
in interface Encoder<EXIObject,T extends AbstractServiceResponse>
public MediaType getContentType()
getContentType
in interface Encoder<EXIObject,T extends AbstractServiceResponse>
public Set<SchemaLocation> getSchemaLocations()
getSchemaLocations
in interface Encoder<EXIObject,T extends AbstractServiceResponse>
protected Encoder<Object,AbstractServiceResponse> getEncoder(AbstractServiceResponse asr)
Encoder
for the AbstractServiceResponse
and the
requested contentTypeasr
- AbstractServiceResponse
to get Encoder
forEncoder
for the AbstractServiceResponse
protected <D,S> Encoder<D,S> getEncoder(EncoderKey key)
key
- Encoder keyprotected MediaType getEncodedContentType(AbstractServiceResponse asr)
MediaType
from AbstractServiceResponse
asr
- AbstractServiceResponse
to get content type fromMediaType
protected MediaType getEncodedContentType(ResponseFormat responseFormat)
MediaType
from ResponseFormat
responseFormat
- ResponseFormat
to get content type fromMediaType
Copyright © 2012-2015 52north.org. All Rights Reserved.