Class GeometryBinding
java.lang.Object
org.gvsig.gpe.prov.gml.parser.v2.geometries.GeometryBinding
- Direct Known Subclasses:
BoxTypeBinding,GeometryBinding,LinearRingTypeBinding,LineStringTypeBinding,MultiGeometryPropertyTypeBinding,MultiGeometryTypeBinding,MultiLineStringPropertyTypeBinding,MultiLineStringTypeBinding,MultiPointPropertyTypeBinding,MultiPointTypeBinding,MultiPolygonPropertyTypeBinding,MultiPolygonTypeBinding,PointTypeBinding,PolygonTypeBinding
This class parses a geometry. It is also used
to get the attributes for a GML geometry.
- Author:
- Jorge Piera LLodrĂ¡ (jorge.piera@iver.es)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetID()It returns a the geometry id attributegetID(GPEDefaultGmlParser handler, Map hash) It returns a the geometry id attributegetSrs()It returns a the geometry srs attributegetSRS(GPEDefaultGmlParser handler, Map hash) It returns the srs attributeparse(org.gvsig.xmlpull.lib.api.stream.IXmlStreamReader parser, GPEDefaultGmlParser handler) It parses the gml:Geometry tagprotected ObjectparseTag(org.gvsig.xmlpull.lib.api.stream.IXmlStreamReader parser, GPEDefaultGmlParser handler, org.gvsig.xmlpull.lib.api.stream.IQName tag) It parses an XML tagprotected voidsetAtributtes(org.gvsig.xmlpull.lib.api.stream.IXmlStreamReader parser, GPEDefaultGmlParser handler) This method has to be invoked by all the geometries before to make the parse process.
-
Field Details
-
srsName
-
id
-
-
Constructor Details
-
GeometryBinding
public GeometryBinding()
-
-
Method Details
-
parse
public Object parse(org.gvsig.xmlpull.lib.api.stream.IXmlStreamReader parser, GPEDefaultGmlParser handler) throws org.gvsig.xmlpull.lib.api.stream.XmlStreamException, IOException It parses the gml:Geometry tag- Parameters:
parser- The XML parserhandler- The GPE parser that contains the content handler and the error handler- Returns:
- A geometry
- Throws:
org.gvsig.xmlpull.lib.api.stream.XmlStreamExceptionIOException
-
parseTag
protected Object parseTag(org.gvsig.xmlpull.lib.api.stream.IXmlStreamReader parser, GPEDefaultGmlParser handler, org.gvsig.xmlpull.lib.api.stream.IQName tag) throws org.gvsig.xmlpull.lib.api.stream.XmlStreamException, IOException It parses an XML tag- Parameters:
parser-handler-tag-- Returns:
- Throws:
org.gvsig.xmlpull.lib.api.stream.XmlStreamExceptionIOException
-
setAtributtes
protected void setAtributtes(org.gvsig.xmlpull.lib.api.stream.IXmlStreamReader parser, GPEDefaultGmlParser handler) throws org.gvsig.xmlpull.lib.api.stream.XmlStreamException This method has to be invoked by all the geometries before to make the parse process. It retrieves the common geometry attributes- Parameters:
parser- The root geometry tagerrorHandler- To add the errors- Throws:
org.gvsig.xmlpull.lib.api.stream.XmlStreamException
-
getSRS
It returns the srs attribute- Parameters:
hash- Hashtable with the XML attributes- Returns:
- The id
-
getID
It returns a the geometry id attribute- Parameters:
hash- Hashtable with the XML attributes- Returns:
- The id
-
getID
It returns a the geometry id attribute- Returns:
- The id
-
getSrs
It returns a the geometry srs attribute- Returns:
- The srs
-