Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.io.gml.writer.internal.geometry
Interface GeometryWriter<T extends com.vividsolutions.jts.geom.Geometry>

Type Parameters:
T - the geometry type
All Known Implementing Classes:
AbstractGeometryWriter, CurveWriter, LegacyMultiPolygonWriter, LegacyPolygonWriter, LineStringWriter, MultiLineStringWriter, MultiPointWriter, MultiPolygonWriter, PointWriter, PolygonWriter

public interface GeometryWriter<T extends com.vividsolutions.jts.geom.Geometry>

Geometry writer interface. A geometry holds information about compatibility and encoding patterns for a certain geometry type.

Author:
Simon Templer
Partner:
01 / Fraunhofer Institute for Computer Graphics Research

Method Summary
 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
 DefinitionPath match(TypeDefinition type, DefinitionPath basePath, String gmlNs)
          Matches the type against the encoding patterns.
 void write(XMLStreamWriter writer, T geometry, TypeDefinition elementType, QName elementName, String gmlNs)
          Write a geometry.
 

Method Detail

getGeometryType

Class<T> getGeometryType()
Get the geometry type represented by the writer

Returns:
the geometry type

getCompatibleTypes

Set<QName> getCompatibleTypes()
Get the compatible types' names for the geometry type that can be handled by this writer. The compatible types serve as entry points for the matching.

Returns:
the type names, a null namespace in a name references the GML namespace

match

DefinitionPath match(TypeDefinition type,
                     DefinitionPath basePath,
                     String gmlNs)
Matches the type against the encoding patterns.

Parameters:
type - the type definition
basePath - the definition path
gmlNs - the GML namespace
Returns:
the new path if there is a match, null otherwise

write

void write(XMLStreamWriter writer,
           T geometry,
           TypeDefinition elementType,
           QName elementName,
           String gmlNs)
           throws XMLStreamException
Write a geometry. At this point we can assume that the wrapping element matches one of the base patterns. The corresponding element name and its type definition are given.

Parameters:
writer - the XML stream writer
geometry - the geometry to write
elementType - the last type definition in the matching path
elementName - the corresponding element name
gmlNs - the GML namespace
Throws:
XMLStreamException - if an error occurs writing the geometry

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d