|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.gml.GMLStreamWriter
public class GMLStreamWriter
Stream-based writer for GML instance documents or GML document fragments. Currently supports GML 2/3.0/3.1/3.2.
Instances of this class are not thread-safe.
GMLObject
,
GMLOutputFactory
Method Summary | |
---|---|
void |
close()
Closes the underlying XML stream. |
GMLFeatureWriter |
getFeatureWriter()
|
XMLStreamWriter |
getXMLStream()
Returns the underlying XML stream. |
boolean |
isObjectExported(String gmlId)
Returns whether the specified gml object has already been exported. |
void |
setAdditionalObjectHandler(GMLForwardReferenceHandler handler)
Sets an GMLForwardReferenceHandler that copes with GMLReference s that are processed during
export. |
void |
setCoordinateFormatter(CoordinateFormatter formatter)
Controls the format (e.g. number of decimal places) for written coordinates. |
void |
setExportExtraProps(boolean exportExtraProps)
Controls whether ExtraProps associated with feature objects should be exported as property elements. |
void |
setNamespaceBindings(Map<String,String> prefixToNs)
Controls the namespace prefixes that are used whenever a qualified element or attribute is written (and no namespace prefix has been bound on the stream). |
void |
setOutputCRS(ICRS crs)
Controls the output CRS for written geometries. |
void |
setProjection(ProjectionClause[] projection)
Sets the feature properties to be included for exported Feature instances. |
void |
setRemoteXLinkTemplate(String remoteXLinkTemplate)
Controls the representation of xlinks that point to objects that are not included in the written GML document. |
void |
setXLinkDepth(int inlineXLinklevels)
Controls the number of xlink levels that will be expanded inside property elements. |
void |
setXLinkExpiry(int traverseXLinkExpiry)
Controls the number number of seconds to wait when remote xlinks are expanded inside property elements. |
void |
write(Definition definition)
Writes a GML representation of the given Definition to the stream. |
void |
write(Feature feature)
Writes a GML representation of the given Feature to the stream. |
void |
write(Geometry geometry)
Writes a GML representation of the given Geometry to the stream. |
void |
write(GMLObject object)
Writes a GML representation of the given GMLObject to the stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void setOutputCRS(ICRS crs)
crs
- crs to be used for the geometries, can be null
(keeps the original CRS)public void setCoordinateFormatter(CoordinateFormatter formatter)
formatter
- formatter to use, may be null
(don't do any formatting)public void setNamespaceBindings(Map<String,String> prefixToNs)
prefixToNs
- keys: prefix, value: namespace, may be null
public void setXLinkDepth(int inlineXLinklevels)
inlineXLinklevels
- number of xlink levels to be expanded, -1 expands to any depthpublic void setXLinkExpiry(int traverseXLinkExpiry)
traverseXLinkExpiry
- number of seconds to wait for the resolving of remote xlinks, -1 sets no timeoutpublic void setRemoteXLinkTemplate(String remoteXLinkTemplate)
remoteXLinkTemplate
- template used to create references to document-remote objects, e.g.
http://localhost:8080/d3_wfs_lab/services?SERVICE=WFS&REQUEST=GetGmlObject&VERSION=1.1.0&TRAVERSEXLINKDEPTH=1&GMLOBJECTID={}
, the substring {}
is replaced by the object idpublic void setProjection(ProjectionClause[] projection)
Feature
instances.
projection
- feature properties to be included, or null
(include all feature props)public void setAdditionalObjectHandler(GMLForwardReferenceHandler handler)
GMLForwardReferenceHandler
that copes with GMLReference
s that are processed during
export.
handler
- handler, may be null
public void setExportExtraProps(boolean exportExtraProps)
ExtraProps
associated with feature objects should be exported as property elements.
exportExtraProps
- true, if extra props should be exported, false otherwisepublic boolean isObjectExported(String gmlId)
gmlId
- id of the object, must not be null
public void write(GMLObject object) throws XMLStreamException, UnknownCRSException, TransformationException
GMLObject
to the stream.
object
- object to be written, must not be null
XMLStreamException
UnknownCRSException
TransformationException
public void write(Feature feature) throws XMLStreamException, UnknownCRSException, TransformationException
Feature
to the stream.
feature
- object to be written, must not be null
XMLStreamException
UnknownCRSException
TransformationException
public void write(Geometry geometry) throws XMLStreamException, UnknownCRSException, TransformationException
Geometry
to the stream.
geometry
- object to be written, must not be null
XMLStreamException
UnknownCRSException
TransformationException
public void write(Definition definition) throws XMLStreamException
Definition
to the stream.
definition
- object to be written, must not be null
XMLStreamException
public void close() throws XMLStreamException
XMLStreamException
public XMLStreamWriter getXMLStream()
null
public GMLFeatureWriter getFeatureWriter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |