Package org.n52.iceland.binding.exi
Class EXIBinding
- java.lang.Object
-
- org.n52.iceland.binding.SimpleBinding
-
- org.n52.iceland.binding.exi.EXIBinding
-
- All Implemented Interfaces:
Binding,EncodingExceptionHandler,Component<BindingKey>,Keyed<BindingKey>
public class EXIBinding extends SimpleBinding
Binding implementation for EXI - Efficient XML Interchange See See http://www.w3.org/TR/exi/- Since:
- 2.0.0
-
-
Constructor Summary
Constructors Constructor Description EXIBinding(EXIUtils exiUtils)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckOperationHttpPostSupported(OwsOperationKey k)Check, if the operation is supported by the decoder by the HTTP-Post method.protected org.apache.xmlbeans.XmlObjectdecode(javax.servlet.http.HttpServletRequest request)Parse the incoming EXI encodedInputStreamtransform toXmlObjectvoiddoPostOperation(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)HTTP POST request handling method.protected MediaTypegetDefaultContentType()Set<BindingKey>getKeys()protected booleanisUseHttpResponseCodes()protected OwsServiceRequestparseRequest(javax.servlet.http.HttpServletRequest request)Parse and decode the incoming EXI encodedInputStream-
Methods inherited from class org.n52.iceland.binding.SimpleBinding
checkServiceOperatorKeyTypes, chooseResponseContentType, chooseResponseContentTypeForExceptionReport, encodeOwsExceptionReport, encodeResponse, getDecoder, getDecoderRepository, getEncoder, getEncoderRepository, getEventBus, getHttpUtils, getRequestContext, getServiceOperator, getServiceOperator, getServiceOperatorRepository, handleEncodingException, hasDecoder, hasDecoder, hasEncoder, hasEncoder, hasEncoder, isServiceSupported, isVersionSupported, setDecoderRepository, setEncoderRepository, setEventBus, setHttpUtils, setServiceOperatorRepository, writeOwsExceptionReport, writeResponse
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.n52.iceland.binding.Binding
checkOperationHttpDeleteSupported, checkOperationHttpGetSupported, checkOperationHttpOptionsSupported, checkOperationHttpPutSupported, doDeleteOperation, doGetOperation, doOptionsOperation, doPutOperation
-
-
-
-
Constructor Detail
-
EXIBinding
@Inject public EXIBinding(EXIUtils exiUtils)
-
-
Method Detail
-
getDefaultContentType
protected MediaType getDefaultContentType()
- Specified by:
getDefaultContentTypein classSimpleBinding
-
isUseHttpResponseCodes
protected boolean isUseHttpResponseCodes()
- Specified by:
isUseHttpResponseCodesin classSimpleBinding
-
checkOperationHttpPostSupported
public boolean checkOperationHttpPostSupported(OwsOperationKey k) throws HTTPException
Description copied from interface:BindingCheck, if the operation is supported by the decoder by the HTTP-Post method.- Parameters:
k- identifier of the decoder- Returns:
- true, if the decoder
decoderKeysupports HTTP-Post for operationoperationName - Throws:
HTTPException- if an error occurs
-
doPostOperation
public void doPostOperation(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws HTTPException, IOExceptionDescription copied from interface:BindingHTTP POST request handling method.- Parameters:
req- HTTP POST requestres- HTTP POST response- Throws:
HTTPException- if the encoding of an exception failedIOException- if an IO error occurs
-
parseRequest
protected OwsServiceRequest parseRequest(javax.servlet.http.HttpServletRequest request) throws OwsExceptionReport
Parse and decode the incoming EXI encodedInputStream- Parameters:
request-HttpServletRequestwith EXI encodedInputStream- Returns:
OwsServiceRequestfrom EXI encodedInputStream- Throws:
OwsExceptionReport- If an error occurs during parsing
-
decode
protected org.apache.xmlbeans.XmlObject decode(javax.servlet.http.HttpServletRequest request) throws OwsExceptionReportParse the incoming EXI encodedInputStreamtransform toXmlObject- Parameters:
request-HttpServletRequestwith EXI encodedInputStream- Returns:
XmlObjectcreated from the EXI encodedInputStream- Throws:
OwsExceptionReport- If an error occurs during parsing
-
getKeys
public Set<BindingKey> getKeys()
-
-