Class GeoJsonGeometryFormat

java.lang.Object
org.elasticsearch.common.geo.GeoJsonGeometryFormat
All Implemented Interfaces:
GeometryFormat<org.elasticsearch.geometry.Geometry>

public class GeoJsonGeometryFormat
extends java.lang.Object
implements GeometryFormat<org.elasticsearch.geometry.Geometry>
  • Field Summary

    Fields
    Modifier and Type Field Description
    static java.lang.String NAME  
  • Constructor Summary

    Constructors
    Constructor Description
    GeoJsonGeometryFormat​(GeoJson geoJsonParser)  
  • Method Summary

    Modifier and Type Method Description
    org.elasticsearch.geometry.Geometry fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser)
    Parser JSON representation of a geometry
    java.lang.String name()
    The name of the format, for example 'wkt'.
    org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.geometry.Geometry geometry, org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
    Serializes the geometry into its JSON representation
    java.lang.Object toXContentAsObject​(org.elasticsearch.geometry.Geometry geometry)
    Serializes the geometry into a standard Java object.

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • GeoJsonGeometryFormat

      public GeoJsonGeometryFormat​(GeoJson geoJsonParser)
  • Method Details

    • name

      public java.lang.String name()
      Description copied from interface: GeometryFormat
      The name of the format, for example 'wkt'.
      Specified by:
      name in interface GeometryFormat<org.elasticsearch.geometry.Geometry>
    • fromXContent

      public org.elasticsearch.geometry.Geometry fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOException
      Description copied from interface: GeometryFormat
      Parser JSON representation of a geometry
      Specified by:
      fromXContent in interface GeometryFormat<org.elasticsearch.geometry.Geometry>
      Throws:
      java.io.IOException
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.geometry.Geometry geometry, org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException
      Description copied from interface: GeometryFormat
      Serializes the geometry into its JSON representation
      Specified by:
      toXContent in interface GeometryFormat<org.elasticsearch.geometry.Geometry>
      Throws:
      java.io.IOException
    • toXContentAsObject

      public java.lang.Object toXContentAsObject​(org.elasticsearch.geometry.Geometry geometry)
      Description copied from interface: GeometryFormat
      Serializes the geometry into a standard Java object. For example, the GeoJson format returns the geometry as a map, while WKT returns a string.
      Specified by:
      toXContentAsObject in interface GeometryFormat<org.elasticsearch.geometry.Geometry>