Class AbstractGeoJsonFeature<G,​P>

  • Type Parameters:
    G - the geometry type parameter
    P - the properties type parameter
    Direct Known Subclasses:
    GeoJsonFeature

    public abstract class AbstractGeoJsonFeature<G,​P>
    extends org.bremersee.common.model.UnknownAware
    A GeoJSON object with the type Feature (see rfc7946 section 3.3).
    Author:
    Christian Bremer
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractGeoJsonFeature()
      Instantiates a new abstract geo json feature.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract boolean equals​(G g1, Object g2)
      Equals boolean.
      boolean equals​(Object o)  
      double[] getBbox()
      Return the bounding box of the GeoJSON object or null if there is no such object (see Bounding Box).
      abstract G getGeometry()
      Return the geometry object of this GeoJSON feature.
      abstract String getId()
      Return the id of this GeoJSON feature or null if there is no id available.
      P getProperties()
      Return the properties that are associated with this GeoJSON feature or null if there are no properties.
      int hashCode()  
      void setBbox​(double[] bbox)
      Set the bounding box of the GeoJSON object.
      abstract void setGeometry​(G geometry)
      Set the geometry object of this GeoJSON feature.
      abstract void setId​(String id)
      Set the id of this GeoJSON feature.
      void setProperties​(P properties)
      Set the properties that are associated with this GeoJSON feature.
      String toString()  
      • Methods inherited from class org.bremersee.common.model.UnknownAware

        canEqual, findUnknown, findUnknownList, findUnknownMap, hasUnknown, unknown, unknown, unknown
    • Constructor Detail

      • AbstractGeoJsonFeature

        protected AbstractGeoJsonFeature()
        Instantiates a new abstract geo json feature.
    • Method Detail

      • getId

        public abstract String getId()
        Return the id of this GeoJSON feature or null if there is no id available.
        Returns:
        the id of this GeoJSON feature
      • setId

        public abstract void setId​(String id)
        Set the id of this GeoJSON feature.
        Parameters:
        id - the id of this GeoJSON feature
      • getGeometry

        public abstract G getGeometry()
        Return the geometry object of this GeoJSON feature.
        Returns:
        the geometry
      • setGeometry

        public abstract void setGeometry​(G geometry)
        Set the geometry object of this GeoJSON feature.
        Parameters:
        geometry - the geometry to set
      • getBbox

        public double[] getBbox()
        Return the bounding box of the GeoJSON object or null if there is no such object (see Bounding Box).
        Returns:
        the bounding box
      • setBbox

        public void setBbox​(double[] bbox)
        Set the bounding box of the GeoJSON object.
        Parameters:
        bbox - the bounding box to set
      • getProperties

        public P getProperties()
        Return the properties that are associated with this GeoJSON feature or null if there are no properties.
        Returns:
        the properties of this feature
      • setProperties

        public void setProperties​(P properties)
        Set the properties that are associated with this GeoJSON feature.

        Be aware that each object must be serializable with the Jackson JSON processor.

        Parameters:
        properties - the properties of this feature
      • toString

        public String toString()
        Overrides:
        toString in class org.bremersee.common.model.UnknownAware
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class org.bremersee.common.model.UnknownAware
      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class org.bremersee.common.model.UnknownAware
      • equals

        protected abstract boolean equals​(G g1,
                                          Object g2)
        Equals boolean.
        Parameters:
        g1 - the g 1
        g2 - the g 2
        Returns:
        the boolean