Package dap4.core.dmr
Class ErrorResponse
- java.lang.Object
-
- dap4.core.dmr.ErrorResponse
-
public class ErrorResponse extends Object
The official format for an error response is defined here: http://docs.opendap.org/index.php/DAP4_Web_Services_v3#DAP4_Error_Response. Basically, the response looks something like this.... ... ...
-
-
Constructor Summary
Constructors Constructor Description ErrorResponse()ErrorResponse(int httpcode, String message, String context, String other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DapExceptionbuildException()Convert an ErrorResponse to the equivalent DapException.StringbuildXML()Convert an ErrorResponse to the equivalent XMLintgetCode()StringgetContext()StringgetMessage()StringgetOtherInfo()StringgetRawContext()StringgetRawMessage()StringgetRawOtherInfo()voidsetCode(int code)voidsetContext(String context)voidsetMessage(String message)voidsetOtherInfo(String other)
-
-
-
Method Detail
-
getCode
public int getCode()
-
getRawMessage
public String getRawMessage()
-
getMessage
public String getMessage()
-
getRawContext
public String getRawContext()
-
getContext
public String getContext()
-
getRawOtherInfo
public String getRawOtherInfo()
-
getOtherInfo
public String getOtherInfo()
-
setCode
public void setCode(int code)
-
setMessage
public void setMessage(String message)
-
setContext
public void setContext(String context)
-
setOtherInfo
public void setOtherInfo(String other)
-
buildXML
public String buildXML()
Convert an ErrorResponse to the equivalent XML- Returns:
- XML representation of the ErrorResponse
-
buildException
public DapException buildException()
Convert an ErrorResponse to the equivalent DapException.- Returns:
- DapException representation of the ErrorResponse
-
-