Enum GeoJsonType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<GeoJsonType>

    public enum GeoJsonType
    extends java.lang.Enum<GeoJsonType>
    Enumerates all the GeoJson types that are currently supported by Morphia.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      Geometry createGeometry​(java.util.List<?> geometries)  
      static GeoJsonType fromString​(java.lang.String type)
      Allows you to turn String values of types into the Enum that corresponds to this type.
      java.lang.String getType()
      Returns the value that needs to be stored with the GeoJson values in the database to declare which GeoJson type the coordinates represent.
      java.lang.Class<? extends Geometry> getTypeClass()
      Returns a concrete class that implements Geometry, the class that represents this GeoJsonType.
      static GeoJsonType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static GeoJsonType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        public static GeoJsonType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (GeoJsonType c : GeoJsonType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static GeoJsonType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • fromString

        public static GeoJsonType fromString​(java.lang.String type)
        Allows you to turn String values of types into the Enum that corresponds to this type.
        Parameters:
        type - a String, one of the values from this list of supported types
        Returns:
        the GeoJsonType that corresponds to this type String
      • getType

        public java.lang.String getType()
        Returns the value that needs to be stored with the GeoJson values in the database to declare which GeoJson type the coordinates represent. See the documentation for a list of the GeoJson objects supported by MongoDB.
        Returns:
        a String of the GeoJson type.
      • getTypeClass

        public java.lang.Class<? extends Geometry> getTypeClass()
        Returns a concrete class that implements Geometry, the class that represents this GeoJsonType.
        Returns:
        the Geometry class for this GeoJsonType
      • createGeometry

        public abstract Geometry createGeometry​(java.util.List<?> geometries)