Class SubHandler

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int GEOMETRY_END
      Indicates end of a geometry.
      static int GEOMETRY_START
      Indicates start of a geometry.
      static int GEOMETRY_SUB
      Indicates a sub geometry message.
    • Constructor Summary

      Constructors 
      Constructor Description
      SubHandler()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void addCoordinate​(Coordinate coordinate)
      Adds a coordinate to the object being built if appropriate.
      abstract Geometry create​(GeometryFactory geometryFactory)
      Creates a new JTS geometry.
      protected int getSRID()
      Creates a basic SRID by looking at the provided srs.
      protected String getSRS()  
      abstract boolean isComplete​(String message)
      Determines whether or not the geometry is ready to return.
      void setSRS​(String SRS)  
      void subGeometry​(String message, int type)
      Tells the handler that it just saw a subhandler.
      String toString()
      Describes the handler.
      • Methods inherited from class Object

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

      • GEOMETRY_START

        public static final int GEOMETRY_START
        Indicates start of a geometry.
        See Also:
        Constant Field Values
      • GEOMETRY_END

        public static final int GEOMETRY_END
        Indicates end of a geometry.
        See Also:
        Constant Field Values
      • GEOMETRY_SUB

        public static final int GEOMETRY_SUB
        Indicates a sub geometry message.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SubHandler

        public SubHandler()
    • Method Detail

      • getSRS

        protected String getSRS()
        Returns:
        the srs
      • getSRID

        protected int getSRID()
        Creates a basic SRID by looking at the provided srs.

        As an example "EPSG:4326" would be turned into 4326

        Returns:
        An int value based on the srs field, or 0
      • setSRS

        public void setSRS​(String SRS)
      • addCoordinate

        public abstract void addCoordinate​(Coordinate coordinate)
        Adds a coordinate to the object being built if appropriate.
        Parameters:
        coordinate - Coordinate to add
      • subGeometry

        public void subGeometry​(String message,
                                int type)
        Tells the handler that it just saw a subhandler.
        Parameters:
        message - The sub geometry message (i.e. isInnerBoundary).
        type - The type of sub message (start, end, etc.)
      • isComplete

        public abstract boolean isComplete​(String message)
        Determines whether or not the geometry is ready to return.
        Parameters:
        message - The geometry to inspect.
        Returns:
        Flag for a complete geometry.
      • create

        public abstract Geometry create​(GeometryFactory geometryFactory)
        Creates a new JTS geometry.
        Parameters:
        geometryFactory - The JTS geometry factory to use for geometry creation.
        Returns:
        An OGC simple geometry type for return.
      • toString

        public String toString()
        Describes the handler.
        Overrides:
        toString in class Object
        Returns:
        String representation of the current handler.