com.vividsolutions.jump.util.io
Class SimpleGMLReader

java.lang.Object
  extended by com.vividsolutions.jump.util.io.SimpleGMLReader

public class SimpleGMLReader
extends java.lang.Object

Provides an easy way to read spatial data from a GML document. Attributes are not read. Simply pass in a Reader on the GML, and the names of the various tags. A List of Geometries will be returned.


Constructor Summary
SimpleGMLReader()
           
 
Method Summary
 FeatureCollection readFMEFile(java.io.File file)
          Reads a GML file that is in FME format.
 java.util.List toGeometries(java.io.Reader gml, java.lang.String collectionElement, java.lang.String featureElement, java.lang.String geometryElement)
           
 java.util.List toGeometries(java.lang.String gml, java.lang.String collectionElement, java.lang.String featureElement, java.lang.String geometryElement)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleGMLReader

public SimpleGMLReader()
Method Detail

toGeometries

public java.util.List toGeometries(java.io.Reader gml,
                                   java.lang.String collectionElement,
                                   java.lang.String featureElement,
                                   java.lang.String geometryElement)
                            throws java.lang.Exception
Parameters:
gml - a Reader on an XML document containing GML
collectionElement - the name of the feature-collection tag
featureElement - the name of the feature tag
geometryElement - the name of the geometry tag
Returns:
a List of Geometries
Throws:
java.lang.Exception

toGeometries

public java.util.List toGeometries(java.lang.String gml,
                                   java.lang.String collectionElement,
                                   java.lang.String featureElement,
                                   java.lang.String geometryElement)
                            throws java.lang.Exception
Parameters:
gml -
Throws:
java.lang.Exception
See Also:
toGeometries(Reader, String, String, String)

readFMEFile

public FeatureCollection readFMEFile(java.io.File file)
                              throws java.lang.Exception
Reads a GML file that is in FME format.

Returns:
the contents of the file, including both spatial and attribute data
Throws:
java.lang.Exception