Class GeolocItemPolygon
- java.lang.Object
-
- fr.paris.lutece.plugins.leaflet.business.GeolocItemPolygon
-
public class GeolocItemPolygon extends java.lang.ObjectA geoloc item with methods to translate to/from geojson and to XML
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPATH_GEOMETRYstatic java.lang.StringPATH_GEOMETRY_COORDINATESstatic java.lang.StringPATH_GEOMETRY_TYPEstatic java.lang.StringPATH_PROPERTIESstatic java.lang.StringPATH_PROPERTIES_ICONstatic java.lang.StringPATH_PROPERTIES_LAYERstatic java.lang.StringPATH_TYPEstatic java.lang.StringVALUE_GEOMETRY_TYPE_POLYGONstatic java.lang.StringVALUE_GEOMETRY_TYPE_POLYLINEstatic java.lang.StringVALUE_TYPEstatic java.lang.StringXML_ICONstatic java.lang.StringXML_LATstatic java.lang.StringXML_LAYERstatic java.lang.StringXML_LONstatic java.lang.StringXML_ROOT
-
Constructor Summary
Constructors Constructor Description GeolocItemPolygon()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GeolocItemPolygonfromJSON(java.lang.String strJson)Parses a geojson string to build a GeolocItem Object.java.util.Map<java.lang.String,java.lang.Object>getGeometry()Returns the Geometryjava.lang.StringgetIcon()Returns the IcondoublegetLat()Returns the Latjava.lang.StringgetLayer()Returns the LayerdoublegetLon()Returns the Lonjava.util.List<java.lang.Double>getLonLat()Returns the LonLatjava.util.Map<java.lang.String,java.lang.Object>getProperties()Returns the Propertiesjava.lang.StringgetType()Returns the Typejava.lang.StringgetTypegeometry()voidsetGeometry(java.util.Map<java.lang.String,java.lang.Object> geometry)Sets the GeometryvoidsetIcon(java.lang.String icon)Sets the IconvoidsetProperties(java.util.Map<java.lang.String,java.lang.Object> properties)Sets the PropertiesvoidsetTypegeometry(java.lang.String _typegeometry)java.lang.StringtoJSON()Writes the geojson to a Stringjava.lang.StringtoXML()Writes the xml to a String.
-
-
-
Field Detail
-
PATH_TYPE
public static final java.lang.String PATH_TYPE
- See Also:
- Constant Field Values
-
PATH_GEOMETRY
public static final java.lang.String PATH_GEOMETRY
- See Also:
- Constant Field Values
-
PATH_GEOMETRY_TYPE
public static final java.lang.String PATH_GEOMETRY_TYPE
- See Also:
- Constant Field Values
-
PATH_GEOMETRY_COORDINATES
public static final java.lang.String PATH_GEOMETRY_COORDINATES
- See Also:
- Constant Field Values
-
PATH_PROPERTIES
public static final java.lang.String PATH_PROPERTIES
- See Also:
- Constant Field Values
-
PATH_PROPERTIES_ICON
public static final java.lang.String PATH_PROPERTIES_ICON
- See Also:
- Constant Field Values
-
PATH_PROPERTIES_LAYER
public static final java.lang.String PATH_PROPERTIES_LAYER
- See Also:
- Constant Field Values
-
XML_ROOT
public static final java.lang.String XML_ROOT
- See Also:
- Constant Field Values
-
XML_LON
public static final java.lang.String XML_LON
- See Also:
- Constant Field Values
-
XML_LAT
public static final java.lang.String XML_LAT
- See Also:
- Constant Field Values
-
XML_ICON
public static final java.lang.String XML_ICON
- See Also:
- Constant Field Values
-
XML_LAYER
public static final java.lang.String XML_LAYER
- See Also:
- Constant Field Values
-
VALUE_TYPE
public static final java.lang.String VALUE_TYPE
- See Also:
- Constant Field Values
-
VALUE_GEOMETRY_TYPE_POLYGON
public static final java.lang.String VALUE_GEOMETRY_TYPE_POLYGON
- See Also:
- Constant Field Values
-
VALUE_GEOMETRY_TYPE_POLYLINE
public static final java.lang.String VALUE_GEOMETRY_TYPE_POLYLINE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setGeometry
public void setGeometry(java.util.Map<java.lang.String,java.lang.Object> geometry)
Sets the Geometry- Parameters:
geometry- the geometry
-
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
Sets the Properties- Parameters:
properties- the geometry
-
getType
public java.lang.String getType()
Returns the Type- Returns:
- The type
-
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
Returns the Properties- Returns:
- The properties
-
getGeometry
public java.util.Map<java.lang.String,java.lang.Object> getGeometry()
Returns the Geometry- Returns:
- The geometry
-
getLonLat
public java.util.List<java.lang.Double> getLonLat()
Returns the LonLat- Returns:
- The LonLat
-
getLon
public double getLon()
Returns the Lon- Returns:
- The Lon
-
getLat
public double getLat()
Returns the Lat- Returns:
- The Lat
-
getIcon
public java.lang.String getIcon()
Returns the Icon- Returns:
- The icon
-
getLayer
public java.lang.String getLayer()
Returns the Layer- Returns:
- The layer
-
setIcon
public void setIcon(java.lang.String icon)
Sets the Icon- Parameters:
icon- the icon
-
toJSON
public java.lang.String toJSON()
Writes the geojson to a String- Returns:
- The geojseon String
-
toXML
public java.lang.String toXML()
Writes the xml to a String. This is a non standard representation.- Returns:
- The xml String
-
fromJSON
public static GeolocItemPolygon fromJSON(java.lang.String strJson) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, java.io.IOException
Parses a geojson string to build a GeolocItem Object.- Returns:
- The geolocItem object
- Throws:
com.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionjava.io.IOException
-
getTypegeometry
public java.lang.String getTypegeometry()
-
setTypegeometry
public void setTypegeometry(java.lang.String _typegeometry)
-
-