deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.crs.configuration.deegree.xml
Class CRSExporter

java.lang.Object
  extended by org.deegree.crs.configuration.deegree.xml.CRSExporter
Direct Known Subclasses:
CRSExporter_0_2_0, CRSExporter_0_4_0

public class CRSExporter
extends Object

The CRSExporter exports to the old version format (no version attribute).

Version:
$Revision: 22662 $, $Date: 2010-02-19 14:51:52 +0100 (Fr, 19 Feb 2010) $
Author:
Rutger Bezema, last edited by: $Author: mschneider $

Constructor Summary
CRSExporter(Properties properties)
           
 
Method Summary
protected  void endDocument(XMLStreamWriter xmlWriter)
          Write the /crs:defintions and the end document and flush the writer.
protected  void export(Axis axis, String elName, XMLStreamWriter xmlWriter)
          Export an axis to xml in the crs-definitions schema layout.
protected  void export(CompoundCRS compoundCRS, XMLStreamWriter xmlWriter)
          Export the compoundCRS to it's appropriate deegree-crs-definitions form.
protected  void export(Ellipsoid ellipsoid, XMLStreamWriter xmlWriter)
          Export the ellipsoid to it's appropriate deegree-crs-definitions form.
protected  void export(GeocentricCRS geocentricCRS, XMLStreamWriter xmlWriter)
          Export the geocentric CRS to it's appropriate deegree-crs-definitions form.
protected  void export(GeodeticDatum datum, XMLStreamWriter xmlWriter)
          Export the datum to it's appropriate deegree-crs-definitions form.
protected  void export(GeographicCRS geoGraphicCRS, XMLStreamWriter xmlWriter)
          Export the geocentric/geographic CRS to it's appropriate deegree-crs-definitions form.
protected  void export(Helmert wgs84, XMLStreamWriter xmlWriter)
          Export the confInvo to it's appropriate deegree-crs-definitions form.
 void export(List<CoordinateSystem> crsToExport, XMLStreamWriter xmlWriter)
          Export the given list of CoordinateSystems into the crs-definition format.
protected  void export(PrimeMeridian pm, XMLStreamWriter xmlWriter)
          Export the PrimeMeridian to it's appropriate deegree-crs-definitions form.
protected  void export(ProjectedCRS projectedCRS, XMLStreamWriter xmlWriter)
          Export the projected CRS to it's appropriate deegree-crs-definitions form.
protected  void export(Projection projection, XMLStreamWriter xmlWriter)
          Export the projection to it's appropriate deegree-crs-definitions form.
protected  void export(Unit units, XMLStreamWriter xmlWriter)
          Export a unit to xml in the crs-definitions schema layout.
protected  void exportAbstractCRS(CoordinateSystem crs, XMLStreamWriter xmlWriter)
          Export toplevel crs features.
protected  void exportIdentifiable(CRSIdentifiable identifiable, XMLStreamWriter xmlWriter)
          Creates the basic nodes of the identifiable object.
protected  void exportTransformations(List<Transformation> transformations, XMLStreamWriter xmlWriter)
          Export a list of transformations from the crs element to xml with respect to the crs-definitions schema layout.
protected  void initDocument(XMLStreamWriter xmlWriter)
          Open an XML document from stream for exporting
static void main(String[] args)
          Simple main to test exportation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRSExporter

public CRSExporter(Properties properties)
Parameters:
properties - to read configuration from.
Method Detail

export

public void export(List<CoordinateSystem> crsToExport,
                   XMLStreamWriter xmlWriter)
            throws XMLStreamException
Export the given list of CoordinateSystems into the crs-definition format.

Parameters:
crsToExport -
xmlWriter - to write the definitions to.
Throws:
XMLStreamException - if an error occurred while exporting

initDocument

protected void initDocument(XMLStreamWriter xmlWriter)
Open an XML document from stream for exporting

Parameters:
xmlWriter -

endDocument

protected void endDocument(XMLStreamWriter xmlWriter)
                    throws XMLStreamException
Write the /crs:defintions and the end document and flush the writer.

Parameters:
xmlWriter -
Throws:
XMLStreamException

export

protected void export(Helmert wgs84,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the confInvo to it's appropriate deegree-crs-definitions form.

Parameters:
wgs84 - to be exported
xmlWriter - to export to.
Throws:
XMLStreamException

export

protected void export(PrimeMeridian pm,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the PrimeMeridian to it's appropriate deegree-crs-definitions form.

Parameters:
pm - PrimeMeridian to be exported
xmlWriter - to export to.
Throws:
XMLStreamException

export

protected void export(CompoundCRS compoundCRS,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the compoundCRS to it's appropriate deegree-crs-definitions form.

Parameters:
compoundCRS - to be exported
xmlWriter - to export the geographic CRS to.
Throws:
XMLStreamException

export

protected void export(ProjectedCRS projectedCRS,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the projected CRS to it's appropriate deegree-crs-definitions form.

Parameters:
projectedCRS - to be exported
xmlWriter - to export the projected CRS to.
Throws:
XMLStreamException

export

protected void export(Projection projection,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the projection to it's appropriate deegree-crs-definitions form.

Parameters:
projection - to be exported
xmlWriter - to export the projection to.
Throws:
XMLStreamException

export

protected void export(GeographicCRS geoGraphicCRS,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the geocentric/geographic CRS to it's appropriate deegree-crs-definitions form.

Parameters:
geoGraphicCRS - to be exported
xmlWriter - to export the geographic CRS to.
Throws:
XMLStreamException

export

protected void export(GeocentricCRS geocentricCRS,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the geocentric CRS to it's appropriate deegree-crs-definitions form.

Parameters:
geocentricCRS - to be exported
xmlWriter - to export the geocentric CRS to.
Throws:
XMLStreamException

exportAbstractCRS

protected void exportAbstractCRS(CoordinateSystem crs,
                                 XMLStreamWriter xmlWriter)
                          throws XMLStreamException
Export toplevel crs features.

Parameters:
crs - to be exported
xmlWriter - to export to
Throws:
XMLStreamException

exportTransformations

protected void exportTransformations(List<Transformation> transformations,
                                     XMLStreamWriter xmlWriter)
                              throws XMLStreamException
Export a list of transformations from the crs element to xml with respect to the crs-definitions schema layout.

Parameters:
transformations - to be exported.
xmlWriter - to export to.
Throws:
XMLStreamException

export

protected void export(Axis axis,
                      String elName,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export an axis to xml in the crs-definitions schema layout.

Parameters:
axis - to be exported.
elName - the name of the element, either 'Axis' or 'heightAxis'
xmlWriter - to export to.
Throws:
XMLStreamException

export

protected void export(Unit units,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export a unit to xml in the crs-definitions schema layout.

Parameters:
units - to be exported.
xmlWriter - to export to.
Throws:
XMLStreamException

export

protected void export(GeodeticDatum datum,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the datum to it's appropriate deegree-crs-definitions form.

Parameters:
datum - to be exported
xmlWriter - to export the datum to.
Throws:
XMLStreamException

export

protected void export(Ellipsoid ellipsoid,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the ellipsoid to it's appropriate deegree-crs-definitions form.

Parameters:
ellipsoid - to be exported
xmlWriter - to export the ellipsoid to.
Throws:
XMLStreamException

exportIdentifiable

protected void exportIdentifiable(CRSIdentifiable identifiable,
                                  XMLStreamWriter xmlWriter)
                           throws XMLStreamException
Creates the basic nodes of the identifiable object.

Parameters:
identifiable - object to be exported.
xmlWriter - to export to
Throws:
XMLStreamException

main

public static void main(String[] args)
                 throws XMLStreamException,
                        FileNotFoundException
Simple main to test exportation.

Parameters:
args -
Throws:
XMLStreamException
FileNotFoundException

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>