|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.deegree_impl.model.feature.GMLFeatureAdapter
| Field Summary | |
private static java.util.HashMap |
crsMap
|
| Constructor Summary | |
GMLFeatureAdapter()
|
|
| Method Summary | |
private static GM_Envelope |
createBoundedBy(org.w3c.dom.Element element)
returns the boundingbox of the feature |
private static Feature |
createFeature(org.w3c.dom.Element element)
creates an instance of a deegree feature from a contrete gml:_Feature node |
private static FeatureType |
createFeatureType(org.w3c.dom.Element element)
returns an instance of a FeatureType describig the passed feature (element) |
private static GM_Object |
createGeometry(org.w3c.dom.Element element)
|
private static GM_Curve |
createLineString(org.w3c.dom.Element element)
returns an instance of a curve created from the passed |
private static GM_MultiCurve |
createMultiLineString(org.w3c.dom.Element element)
returns an instance of a multi point created from the passed |
private static GM_MultiPoint |
createMultiPoint(org.w3c.dom.Element element)
returns an instance of a multi point created from the passed |
private static GM_MultiSurface |
createMultiSurface(org.w3c.dom.Element element)
returns an instance of a multi point created from the passed |
private static GM_Point |
createPoint(org.w3c.dom.Element element)
returns an instance of a point created from the passed |
private static GM_Surface |
createPolygon(org.w3c.dom.Element element)
returns an instance of a surface created from the passed |
private static GM_Position |
createPositionFromCoord(org.w3c.dom.Element element)
returns an instance of GM_Position created from the passed coord |
static GM_Position[] |
createPositionFromCoordinates(org.w3c.dom.Element element)
returns an array of GM_Positions created from the passed coordinates |
static void |
export(FeatureCollection fc,
java.util.Map namespaces,
java.util.Map prefixes,
java.util.Map schemaRef,
java.io.OutputStream os)
exports an instance of a FeatureCollection to the passed OutputStream formatted as GML. |
static void |
export(FeatureCollection fc,
java.util.Map namespaces,
java.util.Map prefixes,
java.util.Map schemaRef,
java.io.OutputStream os,
java.lang.String charsetName)
exports an instance of a FeatureCollection to the passed OutputStream formatted as GML. |
static void |
export(FeatureCollection fc,
java.io.OutputStream os)
exports an instance of a FeatureCollection to the passed OutputStream formatted as GML. |
static void |
export(Feature feature,
java.util.Map prefixes,
java.io.PrintWriter pw)
exports a Feature to the passed PrintWriter |
private static CS_CoordinateSystem |
getCRS(java.lang.String name)
returns an instance of CS_CoordinateSystem corrsponding to the passed crs name |
private static boolean |
isFeatureCollection(org.w3c.dom.Element element)
returns true if the passed element encapsulates a feature collection |
private static boolean |
isGeometryProperty(org.w3c.dom.Element element)
returns true if the submitted element contains just excatly one childelement that have to be a geometry |
static void |
main(java.lang.String[] args)
|
private static void |
openRootElement(Feature feature,
java.util.Map namespaces,
java.util.Map prefixes,
java.util.Map schemaRef,
java.io.PrintWriter pw)
Opens a PrintWriter from the passed OutputStream and writes the XML header and the opening root element of the GML document to it |
private static void |
printFeatureCollection(FeatureCollection fc,
java.util.Map prefixes,
java.io.PrintWriter pw)
prints the passed FeatureCollection to the also passed PrintWriter formatted as GMLs |
private static void |
printGeometry(GM_Object geo,
java.io.PrintWriter pw)
prints the passed geometry to the also passed PrintWriter formatted as GML |
static FeatureCollection |
wrap(org.w3c.dom.Element root)
|
static FeatureCollection |
wrap(java.io.Reader reader)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static java.util.HashMap crsMap
| Constructor Detail |
public GMLFeatureAdapter()
| Method Detail |
public static FeatureCollection wrap(java.io.Reader reader)
throws java.io.IOException,
XMLParsingException,
GM_Exception
reader -
java.io.IOException
XMLParsingException
GM_Exception
public static FeatureCollection wrap(org.w3c.dom.Element root)
throws XMLParsingException,
GM_Exception
root - root element of a GML document
XMLParsingException
GM_Exception
public static void export(FeatureCollection fc,
java.io.OutputStream os)
throws java.io.IOException,
FeatureException
fc - feature collection to exportos - output stream to write to
java.io.IOException
FeatureException
public static void export(FeatureCollection fc,
java.util.Map namespaces,
java.util.Map prefixes,
java.util.Map schemaRef,
java.io.OutputStream os)
throws java.io.IOException,
FeatureException
fc - feature collection to exportnamespaces - namespaces of the different feature types contained in
the feature collection.prefixes - prefixes of the elements to be used. gml: will be used
for GML-namespace; xlink: will be used for XLink ns.schemaRef - references to the application schemas the features of
the collection beloangs to. The feature type names will
be used as keysos - output stream to write to
java.io.IOException
FeatureException
public static void export(FeatureCollection fc,
java.util.Map namespaces,
java.util.Map prefixes,
java.util.Map schemaRef,
java.io.OutputStream os,
java.lang.String charsetName)
throws java.io.IOException,
FeatureException
fc - feature collection to exportnamespaces - namespaces of the different feature types contained in
the feature collection.prefixes - prefixes of the elements to be used. gml: will be used
for GML-namespace; xlink: will be used for XLink ns.schemaRef - references to the application schemas the features of
the collection beloangs to. The feature type names will
be used as keysos - output stream to write tocharsetName - The name of the used charset/encoding
java.io.IOException
FeatureException
private static void openRootElement(Feature feature,
java.util.Map namespaces,
java.util.Map prefixes,
java.util.Map schemaRef,
java.io.PrintWriter pw)
throws java.io.IOException,
FeatureException
feature - feature to exportnamespaces - namespaces of the different feature types contained in
the feature collection.prefixes - prefixes of the elements to be used. gml: will be used
for GML-namespace; xlink: will be used for XLink ns.schemaRef - references to the application schemas the features of
the collection beloangs to. The feature type names will
be used as keyspw - PrintWriter to write to
java.io.IOException
FeatureException
public static void export(Feature feature,
java.util.Map prefixes,
java.io.PrintWriter pw)
throws java.io.IOException,
FeatureException
feature - feature to exportprefixes - prefixes of the elements to be used. gml: will be used
for GML-namespace; xlink: will be used for XLink ns.pw - PrintWriter to write to
java.io.IOException
FeatureException
private static void printFeatureCollection(FeatureCollection fc,
java.util.Map prefixes,
java.io.PrintWriter pw)
throws java.io.IOException,
FeatureException
fc - feature collection to print/exportprefixes - Map containing prefixes for the XML Elements to
createpw - target of the printing/export
java.io.IOException
FeatureException
private static void printGeometry(GM_Object geo,
java.io.PrintWriter pw)
throws FeatureException
geo - geometry to print/extportpw - target of the printing/export
FeatureException
private static Feature createFeature(org.w3c.dom.Element element)
throws XMLParsingException,
GM_Exception
element - XMLParsingException
GM_Exception
private static FeatureType createFeatureType(org.w3c.dom.Element element)
throws XMLParsingException
element - XMLParsingExceptionprivate static boolean isFeatureCollection(org.w3c.dom.Element element)
private static boolean isGeometryProperty(org.w3c.dom.Element element)
private static GM_Envelope createBoundedBy(org.w3c.dom.Element element)
throws XMLParsingException
element - XMLParsingException
private static GM_Object createGeometry(org.w3c.dom.Element element)
throws XMLParsingException,
GM_Exception
element -
XMLParsingException
GM_Exception
private static GM_Position createPositionFromCoord(org.w3c.dom.Element element)
throws XMLParsingException
element - XMLParsingException
public static GM_Position[] createPositionFromCoordinates(org.w3c.dom.Element element)
throws XMLParsingException
element - XMLParsingExceptionprivate static CS_CoordinateSystem getCRS(java.lang.String name)
name - name of the crs
private static GM_Point createPoint(org.w3c.dom.Element element)
throws XMLParsingException
element - XMLParsingException
private static GM_Curve createLineString(org.w3c.dom.Element element)
throws XMLParsingException,
GM_Exception
element - XMLParsingException
GM_Exception
private static GM_Surface createPolygon(org.w3c.dom.Element element)
throws XMLParsingException,
GM_Exception
element - XMLParsingException
GM_Exception
private static GM_MultiPoint createMultiPoint(org.w3c.dom.Element element)
throws XMLParsingException,
GM_Exception
element - XMLParsingException
GM_Exception
private static GM_MultiCurve createMultiLineString(org.w3c.dom.Element element)
throws XMLParsingException,
GM_Exception
element - XMLParsingException
GM_Exception
private static GM_MultiSurface createMultiSurface(org.w3c.dom.Element element)
throws XMLParsingException,
GM_Exception
element - XMLParsingException
GM_Exception
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||