public static enum ShapeBuilder.GeoShapeType extends Enum<ShapeBuilder.GeoShapeType>
ShapeBuilder.GeoShapeType
s that can be handledEnum Constant and Description |
---|
CIRCLE |
ENVELOPE |
GEOMETRYCOLLECTION |
LINESTRING |
MULTILINESTRING |
MULTIPOINT |
MULTIPOLYGON |
POINT |
POLYGON |
Modifier and Type | Method and Description |
---|---|
static ShapeBuilder.GeoShapeType |
forName(String geoshapename) |
static ShapeBuilder |
parse(XContentParser parser) |
static ShapeBuilder |
parse(XContentParser parser,
GeoShapeFieldMapper shapeMapper)
Parse the geometry specified by the source document and return a ShapeBuilder instance used to
build the actual geometry
|
protected static CircleBuilder |
parseCircle(ShapeBuilder.CoordinateNode coordinates,
DistanceUnit.Distance radius) |
protected static EnvelopeBuilder |
parseEnvelope(ShapeBuilder.CoordinateNode coordinates,
ShapeBuilder.Orientation orientation) |
protected static GeometryCollectionBuilder |
parseGeometries(XContentParser parser,
GeoShapeFieldMapper mapper)
Parse the geometries array of a GeometryCollection
|
protected static LineStringBuilder |
parseLinearRing(ShapeBuilder.CoordinateNode coordinates,
boolean coerce) |
protected static LineStringBuilder |
parseLineString(ShapeBuilder.CoordinateNode coordinates) |
protected static MultiLineStringBuilder |
parseMultiLine(ShapeBuilder.CoordinateNode coordinates) |
protected static MultiPointBuilder |
parseMultiPoint(ShapeBuilder.CoordinateNode coordinates) |
protected static MultiPolygonBuilder |
parseMultiPolygon(ShapeBuilder.CoordinateNode coordinates,
ShapeBuilder.Orientation orientation,
boolean coerce) |
protected static PointBuilder |
parsePoint(ShapeBuilder.CoordinateNode node) |
protected static PolygonBuilder |
parsePolygon(ShapeBuilder.CoordinateNode coordinates,
ShapeBuilder.Orientation orientation,
boolean coerce) |
protected static void |
validateMultiPointNode(ShapeBuilder.CoordinateNode coordinates) |
protected static void |
validatePointNode(ShapeBuilder.CoordinateNode node) |
static ShapeBuilder.GeoShapeType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ShapeBuilder.GeoShapeType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ShapeBuilder.GeoShapeType POINT
public static final ShapeBuilder.GeoShapeType MULTIPOINT
public static final ShapeBuilder.GeoShapeType LINESTRING
public static final ShapeBuilder.GeoShapeType MULTILINESTRING
public static final ShapeBuilder.GeoShapeType POLYGON
public static final ShapeBuilder.GeoShapeType MULTIPOLYGON
public static final ShapeBuilder.GeoShapeType GEOMETRYCOLLECTION
public static final ShapeBuilder.GeoShapeType ENVELOPE
public static final ShapeBuilder.GeoShapeType CIRCLE
protected final String shapename
public static ShapeBuilder.GeoShapeType[] values()
for (ShapeBuilder.GeoShapeType c : ShapeBuilder.GeoShapeType.values()) System.out.println(c);
public static ShapeBuilder.GeoShapeType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static ShapeBuilder.GeoShapeType forName(String geoshapename)
public static ShapeBuilder parse(XContentParser parser) throws IOException
IOException
public static ShapeBuilder parse(XContentParser parser, GeoShapeFieldMapper shapeMapper) throws IOException
parser
- - parse utility object including source documentshapeMapper
- - field mapper needed for index specific parametersIOException
protected static void validatePointNode(ShapeBuilder.CoordinateNode node)
protected static PointBuilder parsePoint(ShapeBuilder.CoordinateNode node)
protected static CircleBuilder parseCircle(ShapeBuilder.CoordinateNode coordinates, DistanceUnit.Distance radius)
protected static EnvelopeBuilder parseEnvelope(ShapeBuilder.CoordinateNode coordinates, ShapeBuilder.Orientation orientation)
protected static void validateMultiPointNode(ShapeBuilder.CoordinateNode coordinates)
protected static MultiPointBuilder parseMultiPoint(ShapeBuilder.CoordinateNode coordinates)
protected static LineStringBuilder parseLineString(ShapeBuilder.CoordinateNode coordinates)
protected static MultiLineStringBuilder parseMultiLine(ShapeBuilder.CoordinateNode coordinates)
protected static LineStringBuilder parseLinearRing(ShapeBuilder.CoordinateNode coordinates, boolean coerce)
protected static PolygonBuilder parsePolygon(ShapeBuilder.CoordinateNode coordinates, ShapeBuilder.Orientation orientation, boolean coerce)
protected static MultiPolygonBuilder parseMultiPolygon(ShapeBuilder.CoordinateNode coordinates, ShapeBuilder.Orientation orientation, boolean coerce)
protected static GeometryCollectionBuilder parseGeometries(XContentParser parser, GeoShapeFieldMapper mapper) throws IOException
parser
- Parser that will be read fromIOException
- Thrown if an error occurs while reading from the XContentParserCopyright © 2009–2016. All rights reserved.