|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.model.feature.GMLFeatureAdapter
public class GMLFeatureAdapter
Exports feature instances to their GML representation.
Has support for XLink output and to disable XLink output (which is generally not feasible).
Also responsible for "xlinking" features: if a feature occurs several times in a feature collection, it must be exported only once - all other occurences must use xlink-attributes in the surrounding property element to reference the feature. TODO Handle FeatureCollections like ordinary Features (needs changes in feature model). TODO Separate cycle check (for suppressXLinkOutput). TODO Use a more straight-forward approach to export DOM representations. TODO Handle multiple application schemas (in xsi:schemaLocation attribute). TODO Handle WFS-schema-binding in a subclass in the WFS package?
Constructor Summary | |
---|---|
GMLFeatureAdapter()
Creates a new GMLFeatureAdapter instance with enabled XLink output. |
|
GMLFeatureAdapter(boolean suppressXLinkOutput)
Creates a new instance GMLFeatureAdapter with configurable XLink output. |
|
GMLFeatureAdapter(boolean suppressXLinkOutput,
java.lang.String schemaURL)
Creates a new instance GMLFeatureAdapter with configurable XLink output. |
|
GMLFeatureAdapter(boolean suppressXLinkOutput,
java.lang.String schemaURL,
boolean printGeometryIds)
|
|
GMLFeatureAdapter(boolean suppressXLinkOutput,
java.lang.String schemaURL,
boolean printGeometryIds,
int depth)
|
|
GMLFeatureAdapter(boolean suppressXLinkOutput,
java.lang.String schemaURL,
java.lang.String wfsSchemaBinding,
boolean printGeometryIds)
Creates a new instance GMLFeatureAdapter with configurable XLink output. |
|
GMLFeatureAdapter(boolean suppressXLinkOutput,
java.lang.String schemaURL,
java.lang.String wfsSchemaBinding,
boolean printGeometryIds,
int depth)
|
|
GMLFeatureAdapter(int xlinkdepth)
|
|
GMLFeatureAdapter(java.lang.String schemaURL)
Creates a new GMLFeatureAdapter instance with enabled XLink output and schema reference. |
Method Summary | |
---|---|
void |
append(org.w3c.dom.Element root,
Feature feature)
Appends the DOM representation of the given feature to the also given Node . |
void |
append(org.w3c.dom.Element root,
FeatureCollection fc)
Appends the DOM representation of the given FeatureCollection to the also given Node . |
GMLFeatureDocument |
export(Feature feature)
Export a Feature to it's XML representation. |
GMLFeatureCollectionDocument |
export(FeatureCollection fc)
Export a FeatureCollection to it's XML representation. |
void |
export(FeatureCollection fc,
java.io.OutputStream os)
Exports an instance of a FeatureCollection to the passed OutputStream formatted as GML. |
void |
export(FeatureCollection fc,
java.io.OutputStream os,
java.lang.String charsetName)
Exports a FeatureCollection instance to the passed OutputStream formatted as GML. |
void |
export(Feature feature,
java.io.OutputStream os)
Exports an instance of a Feature to the passed OutputStream formatted as GML. |
void |
export(Feature feature,
java.io.OutputStream os,
java.lang.String charsetName)
Exports a Feature instance to the passed OutputStream formatted as GML. |
void |
setBaseURL(java.lang.String url)
|
void |
setPropertyPaths(java.util.Collection<PropertyPath[]> paths)
Sets the property paths for which special xlink traversal will be done. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GMLFeatureAdapter()
GMLFeatureAdapter
instance with enabled XLink output.
public GMLFeatureAdapter(int xlinkdepth)
xlinkdepth
- public GMLFeatureAdapter(java.lang.String schemaURL)
GMLFeatureAdapter
instance with enabled XLink output and schema reference.
schemaURL
- URL of schema document (used as xsi:schemaLocation attribute in XML output)public GMLFeatureAdapter(boolean suppressXLinkOutput, java.lang.String schemaURL, boolean printGeometryIds)
suppressXLinkOutput
- schemaURL
- printGeometryIds
- public GMLFeatureAdapter(boolean suppressXLinkOutput, java.lang.String schemaURL, boolean printGeometryIds, int depth)
suppressXLinkOutput
- schemaURL
- printGeometryIds
- depth
- the depth of xlinks to resolvepublic GMLFeatureAdapter(boolean suppressXLinkOutput)
GMLFeatureAdapter
with configurable XLink output.
suppressXLinkOutput
- set to true, if no XLinks shall be usedpublic GMLFeatureAdapter(boolean suppressXLinkOutput, java.lang.String schemaURL)
GMLFeatureAdapter
with configurable XLink output.
suppressXLinkOutput
- set to true, if no XLinks shall be usedschemaURL
- URL of schema document (used as xsi:schemaLocation attribute in XML output)public GMLFeatureAdapter(boolean suppressXLinkOutput, java.lang.String schemaURL, java.lang.String wfsSchemaBinding, boolean printGeometryIds)
GMLFeatureAdapter
with configurable XLink output.
suppressXLinkOutput
- set to true, if no XLinks shall be usedschemaURL
- URL of schema document (used for "xsi:schemaLocation" attribute in XML output)wfsSchemaBinding
- fragment for the "xsi:schemaLocation" attribute that binds the wfs namespaceprintGeometryIds
- public GMLFeatureAdapter(boolean suppressXLinkOutput, java.lang.String schemaURL, java.lang.String wfsSchemaBinding, boolean printGeometryIds, int depth)
suppressXLinkOutput
- schemaURL
- wfsSchemaBinding
- printGeometryIds
- depth
- Method Detail |
---|
public void setPropertyPaths(java.util.Collection<PropertyPath[]> paths)
paths
- public void setBaseURL(java.lang.String url)
url
- the base url to use for GetGmlObject referencespublic void append(org.w3c.dom.Element root, Feature feature) throws FeatureException, java.io.IOException, org.xml.sax.SAXException
Node
.
TODO do this a better way (append nodes directly without serializing to string and parsing it again)
root
- feature
-
FeatureException
java.io.IOException
org.xml.sax.SAXException
public GMLFeatureDocument export(Feature feature) throws java.io.IOException, FeatureException, XMLException, org.xml.sax.SAXException
Feature
to it's XML representation.
feature
- feature to export
java.io.IOException
FeatureException
XMLException
org.xml.sax.SAXException
public void append(org.w3c.dom.Element root, FeatureCollection fc) throws FeatureException, java.io.IOException, org.xml.sax.SAXException
FeatureCollection
to the also given Node
.
TODO do this a better way (append nodes directly without serializing to string and parsing it again)
root
- fc
-
FeatureException
java.io.IOException
org.xml.sax.SAXException
public GMLFeatureCollectionDocument export(FeatureCollection fc) throws java.io.IOException, FeatureException, XMLException, org.xml.sax.SAXException
FeatureCollection
to it's XML representation.
fc
- feature collection
java.io.IOException
FeatureException
XMLException
org.xml.sax.SAXException
public void export(FeatureCollection fc, java.io.OutputStream os) throws java.io.IOException, FeatureException
FeatureCollection
to the passed OutputStream
formatted as GML.
Uses the deegree system character set for the XML header encoding information.
fc
- feature collection to exportos
- output stream to write to
java.io.IOException
FeatureException
public void export(FeatureCollection fc, java.io.OutputStream os, java.lang.String charsetName) throws java.io.IOException, FeatureException
FeatureCollection
instance to the passed OutputStream
formatted as GML.
fc
- feature collection to exportos
- output stream to write tocharsetName
- name of the used charset/encoding (for the XML header)
java.io.IOException
FeatureException
public void export(Feature feature, java.io.OutputStream os) throws java.io.IOException, FeatureException
Feature
to the passed OutputStream
formatted as GML. Uses the
deegree system character set for the XML header encoding information.
feature
- feature to exportos
- output stream to write to
java.io.IOException
FeatureException
public void export(Feature feature, java.io.OutputStream os, java.lang.String charsetName) throws java.io.IOException, FeatureException
Feature
instance to the passed OutputStream
formatted as GML.
feature
- feature to exportos
- output stream to write tocharsetName
- name of the used charset/encoding (for the XML header)
java.io.IOException
FeatureException
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org