Package com.kheops.jmap.metadata
Class MapImageResponse
java.lang.Object
com.kheops.jmap.metadata.MapImageResponse
- All Implemented Interfaces:
- Serializable
The MapImageResponse is returned by the JMSImageProducer when a MapImageRequest is processed.
 If no error occurred during the request, it contains the produced image encoded as a byte array
 using the image format that was specified in the request.
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final shortThis constant means that an unspecified error occurred.static final shortThis constant which means that the image producer is disabled for the specified project.static final shortThis constant means that no error occurred.static final shortThis constant means that the specified user doesn't have the permissions to view data from this project.static final shortThis constant means that an invalid project id was specified.shortThe error id returned by the server.The image format that was used to encode the image.String[][]The HTML image map that was created by the server using the mouseover and the url of all shown elements.byte[]The encoded image created by the image producer.If an error occurred, message contains the message returned by the server.The affine transformation that was used to create the image.The image view bounds in world coordinates.
- 
Constructor SummaryConstructorsConstructorDescriptionThis constructor is used internally.MapImageResponse(byte[] mapImage, String imageFormat, String message, short errorId) Creates a new MapImageResponse instance using the specified arguments.
- 
Method SummaryModifier and TypeMethodDescriptionvoidshortReturns the error Id if an error occurred, otherwise -1 will be returned.Returns the format of the image that was specified in the MapImageRequest.String[][]Returns a formatted HTML ImageMap prepared using the information returned by the mouseover configured in all used themes if theMapImageRequest.OPTION_GET_IMAGEMAPoption was set in the MapImageRequest.byte[]Returns an encoded image as a byte array.Returns the error message that was sent by the server.Returns the K2DTransform of the view that was used to make to produce the image if theMapImageRequest.OPTION_GET_TRANSFORMoption was set in the MapImageRequest.Returns the bounding box of the view if theMapImageRequest.OPTION_GET_BOUNDSoption was set in the MapImageRequest.voidremoveData(Class key) voidsetViewState(ViewState viewState) 
- 
Field Details- 
ERROR_NONEpublic static final short ERROR_NONEThis constant means that no error occurred.- See Also:
 
- 
ERROR_IMAGE_PROD_DISABLEDpublic static final short ERROR_IMAGE_PROD_DISABLEDThis constant which means that the image producer is disabled for the specified project.- See Also:
 
- 
ERRORpublic static final short ERRORThis constant means that an unspecified error occurred.- See Also:
 
- 
ERROR_PROJECTpublic static final short ERROR_PROJECTThis constant means that an invalid project id was specified.- See Also:
 
- 
ERROR_PERMISSIONSpublic static final short ERROR_PERMISSIONSThis constant means that the specified user doesn't have the permissions to view data from this project.- See Also:
 
- 
mapImagepublic byte[] mapImageThe encoded image created by the image producer.
- 
imageFormatThe image format that was used to encode the image.
- 
transformThe affine transformation that was used to create the image. The transformation is only returned when requested.
- 
viewBoundsThe image view bounds in world coordinates. The view bounds is only returned when requested.
- 
imageMapThe HTML image map that was created by the server using the mouseover and the url of all shown elements. It is only returned when requested.
- 
errorIdpublic short errorIdThe error id returned by the server. If nothing wrong happened, errorId equalsERROR_NONE.
- 
messageIf an error occurred, message contains the message returned by the server.
 
- 
- 
Constructor Details- 
MapImageResponsepublic MapImageResponse()This constructor is used internally.
- 
MapImageResponseCreates a new MapImageResponse instance using the specified arguments.- Parameters:
- mapImage- the encoded map image.
- imageFormat- the image format that was used to encode the image.
- message- the error message,- nullif errorId equals -1 (ERROR_NONE).
- errorId- the error id, or -1 (ERROR_NONE) if there is no reported error.
 
 
- 
- 
Method Details- 
getErrorIdpublic short getErrorId()Returns the error Id if an error occurred, otherwise -1 will be returned.- Returns:
- the error Id if an error occurred, otherwise -1.
 
- 
getMapImagepublic byte[] getMapImage()Returns an encoded image as a byte array. The image is encoded in the format that was specified in the MapImageRequest. If no format was specified, the GIF image format was used to encode the image.- Returns:
- an encoded image as a byte array.
 
- 
getMessageReturns the error message that was sent by the server. Can returnnull.- Returns:
- the error message that was sent by the server.
 
- 
getTransformReturns the K2DTransform of the view that was used to make to produce the image if theMapImageRequest.OPTION_GET_TRANSFORMoption was set in the MapImageRequest.- Returns:
- the K2DTransform of the view that was used to make to produce the image.
 
- 
getViewBoundsReturns the bounding box of the view if theMapImageRequest.OPTION_GET_BOUNDSoption was set in the MapImageRequest.- Returns:
- the bounding box of the view that was used to make to produce the image.
 
- 
getImageFormatReturns the format of the image that was specified in the MapImageRequest. If no format was specified, the GIF image format will be returned.- Returns:
- format of the image.
 
- 
getViewState
- 
setViewState
- 
getImageMapReturns a formatted HTML ImageMap prepared using the information returned by the mouseover configured in all used themes if theMapImageRequest.OPTION_GET_IMAGEMAPoption was set in the MapImageRequest.- Returns:
- a formatted HTML ImageMap.
 
- 
getData
- 
addData
- 
removeData
 
-