com.supermap.services.rest.encoders

Class SceneEncoder

  • Direct Known Subclasses:
    SceneZipEncoder


    public class SceneEncoder
    extends Encoder
    

    Scene object serializer.

    Used to serialize the XML string that identifies the scenario into an XML format.

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected ResourceManager message 
    • Constructor Summary

      Constructors 
      Constructor and Description
      SceneEncoder() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      protected java.util.List<MediaType> createSupportedMediaTypes()
      Creates a supported media type, here is the XML type.
      protected java.lang.String getSceneXML(java.lang.Object content) 
      Representation toRepresentation(MediaType mediaType, java.lang.Object content)
      Serializes XML strings into DOM-based XML representations.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • message

        protected ResourceManager message
        
    • Constructor Detail

      • SceneEncoder

        public SceneEncoder()
        
    • Method Detail

      • createSupportedMediaTypes

        protected java.util.List<MediaType> createSupportedMediaTypes()
        

        Creates a supported media type, here is the XML type.

        That is, SceneEncoder supports the conversion of the formatted object to the media type.

        Specified by:
        createSupportedMediaTypes in class Encoder
        Returns:
        media type list.
      • toRepresentation

        public Representation toRepresentation(MediaType mediaType,
                                      java.lang.Object content)
        

        Serializes XML strings into DOM-based XML representations.

        Specified by:
        toRepresentation in class Encoder
        Parameters:
        mediaType - The target media type to be serialized.
        content - The source XML string to be serialized.
        Returns:
        XML Formatting.
      • getSceneXML

        protected java.lang.String getSceneXML(java.lang.Object content)