T
- the geometry typepublic abstract class AbstractGeometryWriter<T extends com.vividsolutions.jts.geom.Geometry> extends AbstractPathMatcher implements GeometryWriter<T>
Constructor and Description |
---|
AbstractGeometryWriter(Class<T> geometryType)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addCompatibleType(QName typeName)
Add a compatible type.
|
protected static void |
descendAndWriteCoordinates(XMLStreamWriter writer,
Pattern descendPattern,
com.vividsolutions.jts.geom.Coordinate[] coordinates,
TypeDefinition elementType,
QName elementName,
String gmlNs,
boolean unique)
Write coordinates into a posList or coordinates property
|
Set<QName> |
getCompatibleTypes()
Get the compatible types' names for the geometry type that can be handled
by this writer.
|
Class<T> |
getGeometryType()
Get the geometry type represented by the writer
|
protected boolean |
verifyEndPoint(TypeDefinition endPoint)
Verify the verification end point.
|
protected static void |
writeCoordinates(XMLStreamWriter writer,
com.vividsolutions.jts.geom.Coordinate[] coordinates,
TypeDefinition elementType,
String gmlNs)
Write coordinates into a pos, posList or coordinates property
|
protected static boolean |
writePos(XMLStreamWriter writer,
com.vividsolutions.jts.geom.Coordinate[] coordinates,
TypeDefinition elementType,
String gmlNs,
String posName)
Write coordinates into a pos property
|
addBasePattern, addVerificationPattern, addVerificationPattern, descend, match
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
match, write
public Set<QName> getCompatibleTypes()
GeometryWriter
getCompatibleTypes
in interface GeometryWriter<T extends com.vividsolutions.jts.geom.Geometry>
null
namespace in a name
references the GML namespaceGeometryWriter.getCompatibleTypes()
public void addCompatibleType(QName typeName)
Pattern.GML_NAMESPACE_PLACEHOLDER
namespace references the GML namespace.typeName
- the type namepublic Class<T> getGeometryType()
GeometryWriter
getGeometryType
in interface GeometryWriter<T extends com.vividsolutions.jts.geom.Geometry>
GeometryWriter.getGeometryType()
protected boolean verifyEndPoint(TypeDefinition endPoint)
TypeDefinition
of the end-point to assure the needed structure is
present (e.g. a DirectPositionListType element). If no verification
pattern is present the end-point of the matched base pattern will be
verified. The default implementation checks for properties with any of
the types supported for writing coordinates.verifyEndPoint
in class AbstractPathMatcher
endPoint
- the end-point type definitionSUPPORTED_COORDINATES_TYPES
protected static void descendAndWriteCoordinates(XMLStreamWriter writer, Pattern descendPattern, com.vividsolutions.jts.geom.Coordinate[] coordinates, TypeDefinition elementType, QName elementName, String gmlNs, boolean unique) throws XMLStreamException
writer
- the XML stream writerdescendPattern
- the pattern to descendcoordinates
- the coordinates to writeelementType
- the type of the encompassing elementelementName
- the encompassing element namegmlNs
- the GML namespaceunique
- if the path's start element cannot be repeatedXMLStreamException
- if an error occurs writing the coordinatesprotected static void writeCoordinates(XMLStreamWriter writer, com.vividsolutions.jts.geom.Coordinate[] coordinates, TypeDefinition elementType, String gmlNs) throws XMLStreamException
writer
- the XML stream writercoordinates
- the coordinates to writeelementType
- the type of the encompassing elementgmlNs
- the GML namespaceXMLStreamException
- if an error occurs writing the coordinatesprotected static boolean writePos(XMLStreamWriter writer, com.vividsolutions.jts.geom.Coordinate[] coordinates, TypeDefinition elementType, String gmlNs, String posName) throws XMLStreamException
writer
- the XML stream writercoordinates
- the coordinates to writeelementType
- the type of the encompassing elementgmlNs
- the GML namespaceposName
- the name of the desired DirectPositionType property, or
null
if anyXMLStreamException
- if an error occurs writing the coordinatesBuild 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a