|
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.Objectorg.deegree.framework.xml.XMLFragment
org.deegree.crs.configuration.resources.XMLFileResource
org.deegree.crs.configuration.deegree.CRSParser
public class CRSParser
The CRSParser
class TODO add class documentation here.
Field Summary |
---|
Fields inherited from class org.deegree.framework.xml.XMLFragment |
---|
DEFAULT_URL, nsContext, XLNNS |
Constructor Summary | |
---|---|
CRSParser(DeegreeCRSProvider provider,
org.w3c.dom.Element rootElement)
|
|
CRSParser(DeegreeCRSProvider provider,
java.util.Properties properties)
|
|
CRSParser(DeegreeCRSProvider provider,
java.util.Properties properties,
java.lang.String defaultRootElement,
java.lang.String namespace)
|
Method Summary | ||
---|---|---|
protected
|
checkForUniqueness(java.util.List<T> uniqueList,
java.util.Map<java.lang.String,java.lang.String> mapping,
T toBeChecked)
|
|
protected Helmert |
getConversionInfoFromID(java.lang.String infoID)
|
|
protected Ellipsoid |
getEllipsoidFromID(java.lang.String ellipsoidID)
Tries to find a cached ellipsoid, if not found, the config will be checked. |
|
protected GeodeticDatum |
getGeodeticDatumFromID(java.lang.String datumID)
|
|
protected PrimeMeridian |
getPrimeMeridianFromID(java.lang.String meridianID)
|
|
Transformation |
getTransformation(CoordinateSystem sourceCRS,
CoordinateSystem targetCRS)
Implementations should find a given transformation (chain) which transforms coordinates of the given coordinate system into coordinates of the target crs. |
|
protected PolynomialTransformation |
getTransformation(org.w3c.dom.Element transformationElement)
Parses the transformation variables from the given crs:coordinatesystem/crs:polynomialTransformation element. |
|
java.util.List<Transformation> |
getTransformations()
|
|
org.w3c.dom.Element |
getURIAsType(java.lang.String uri)
Opens a stream to a resource which is defined by the uri. |
|
java.lang.String |
getVersion()
|
|
Helmert |
getWGS84Transformation(GeographicCRS sourceCRS)
Implementations should find the helmert transformation which transforms coordinates of the geodetic datum into coordinates of the WGS84 datum. |
|
protected java.util.List<PolynomialTransformation> |
parseAlternativeTransformations(org.w3c.dom.Element crsElement)
Parse all polynomial transformations for a given crs. |
|
protected Axis[] |
parseAxisOrder(org.w3c.dom.Element crsElement)
Creates an axis array for the given crs element. |
|
protected CoordinateSystem |
parseCompoundCRS(org.w3c.dom.Element crsElement)
|
|
CoordinateSystem |
parseCoordinateSystem(org.w3c.dom.Element crsDefintion)
|
|
protected CoordinateSystem |
parseGeocentricCRS(org.w3c.dom.Element crsElement)
|
|
protected CoordinateSystem |
parseGeographicCRS(org.w3c.dom.Element crsElement)
|
|
protected Identifiable |
parseIdentifiable(org.w3c.dom.Element element)
Parses all elements of the identifiable object. |
|
Identifiable |
parseIdentifiableObject(java.lang.String id)
Gets the Element for the given id and heuristically check the localname of the resulting root Element. |
|
protected CoordinateSystem |
parseProjectedCRS(org.w3c.dom.Element crsElement)
|
|
protected Projection |
parseProjection(org.w3c.dom.Element projectionElement,
GeographicCRS underlyingCRS,
Unit units)
Parses and instantiates the projection from the given element. |
|
protected GeodeticDatum |
parseReferencedGeodeticDatum(org.w3c.dom.Element parentElement,
java.lang.String parentID)
Parses the required usedDatum element from the given parentElement (probably a crs element). |
|
Transformation |
parseTransformation(org.w3c.dom.Element transformationDefinition)
Retrieves a transformation from the resource. |
|
protected Unit |
parseUnit(org.w3c.dom.Element parent)
Parses a unit from the given xml-parent. |
Methods inherited from class org.deegree.crs.configuration.resources.XMLFileResource |
---|
getProvider |
Methods inherited from class org.deegree.framework.xml.XMLFragment |
---|
getAsPrettyString, getAsString, getAttachedSchemas, getQualifiedName, getRootElement, getSystemId, hasSchema, load, load, load, parseQualifiedName, parseSimpleLink, prettyPrint, prettyPrint, resolve, setRootElement, setSystemId, setSystemId, toString, write, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CRSParser(DeegreeCRSProvider provider, org.w3c.dom.Element rootElement)
provider
- to be used for callback.rootElement
- to be used for the configuration.public CRSParser(DeegreeCRSProvider provider, java.util.Properties properties)
provider
- properties
- public CRSParser(DeegreeCRSProvider provider, java.util.Properties properties, java.lang.String defaultRootElement, java.lang.String namespace)
provider
- properties
- defaultRootElement
- namespace
- Method Detail |
---|
public CoordinateSystem parseCoordinateSystem(org.w3c.dom.Element crsDefintion) throws CRSConfigurationException
crsDefintion
- to be parsed
null
if the crsDefinition is null
or could
not be mapped to a valid type.
CRSConfigurationException
- if something went wrong while constructing the crs.public org.w3c.dom.Element getURIAsType(java.lang.String uri) throws java.io.IOException
XLinkResolver
uri
- to locate
null
if no resource was found.
java.io.IOException
- If an error occurred while locating or opening the resource.public Helmert getWGS84Transformation(GeographicCRS sourceCRS)
CRSResource
null
sourceCRS
- to retrieve the transformation for.
Helmert
transformation or null
if no such transformation was defined.public java.lang.String getVersion() throws CRSConfigurationException
CRSConfigurationException
- if the root element is emptyprotected Identifiable parseIdentifiable(org.w3c.dom.Element element) throws CRSConfigurationException
element
- the xml-representation of the id-object
null
if no id was given.
CRSConfigurationException
protected Axis[] parseAxisOrder(org.w3c.dom.Element crsElement) throws CRSConfigurationException
crsElement
- to be parsed
CRSConfigurationException
- if a required element could not be found, or an xmlParsingException occurred, or the axisorder uses
names which were not defined in the axis elements.public Transformation parseTransformation(org.w3c.dom.Element transformationDefinition)
transformationDefinition
-
null
if no transformation could be parsed.protected java.util.List<PolynomialTransformation> parseAlternativeTransformations(org.w3c.dom.Element crsElement)
crsElement
- to parse the transformations for.
null
.protected PolynomialTransformation getTransformation(org.w3c.dom.Element transformationElement)
null
will be returned.
transformationElement
- to parse the values from.
null
if it could not be instantiated.protected Unit parseUnit(org.w3c.dom.Element parent) throws CRSConfigurationException
parent
- xml-node to parse the unit from.
CRSConfigurationException
- if the unit object could not be created.protected CoordinateSystem parseProjectedCRS(org.w3c.dom.Element crsElement) throws CRSConfigurationException
crsElement
- from which the crs is to be created (using chached datums, conversioninfos and projections).
CRSConfigurationException
- if a required element could not be found, or an xmlParsingException occurred.protected CoordinateSystem parseGeographicCRS(org.w3c.dom.Element crsElement) throws CRSConfigurationException
crsElement
- from which the crs is to be created (using cached datums, conversioninfos and projections).
CRSConfigurationException
- if a required element could not be found, or an xmlParsingException occurred.protected CoordinateSystem parseGeocentricCRS(org.w3c.dom.Element crsElement) throws CRSConfigurationException
crsElement
- from which the crs is to be created (using cached datums, conversioninfos and projections).
CRSConfigurationException
- if a required element could not be found, or an xmlParsingException occurred.protected CoordinateSystem parseCompoundCRS(org.w3c.dom.Element crsElement)
crsElement
- from which the crs is to be created.
CRSConfigurationException
- if a required element could not be found, or an xmlParsingException occurred.protected GeodeticDatum parseReferencedGeodeticDatum(org.w3c.dom.Element parentElement, java.lang.String parentID) throws CRSConfigurationException
parentElement
- to parse the required usedDatum element from.parentID
- optional for an appropriate error message.
CRSConfigurationException
- if a parsing error occurred, the node was not defined or an illegal id reference (not found) was
given.protected GeodeticDatum getGeodeticDatumFromID(java.lang.String datumID) throws CRSConfigurationException
datumID
-
CRSConfigurationException
protected PrimeMeridian getPrimeMeridianFromID(java.lang.String meridianID) throws CRSConfigurationException
meridianID
- the id to search for.
null
CRSConfigurationException
- if the longitude was not set or the units could not be parsed.protected Ellipsoid getEllipsoidFromID(java.lang.String ellipsoidID) throws CRSConfigurationException
ellipsoidID
-
null
if no ellipsoid with given id was found, or the id was
null
or empty.
CRSConfigurationException
- if something went wrong.protected Helmert getConversionInfoFromID(java.lang.String infoID) throws CRSConfigurationException
infoID
- to get the conversioninfo from.
CRSConfigurationException
protected Projection parseProjection(org.w3c.dom.Element projectionElement, GeographicCRS underlyingCRS, Unit units) throws CRSConfigurationException
projectionElement
- to create the projection from.underlyingCRS
- of the projected crsunits
- of the projected crs
null
if not defined or found.
CRSConfigurationException
protected <T extends Identifiable> T checkForUniqueness(java.util.List<T> uniqueList, java.util.Map<java.lang.String,java.lang.String> mapping, T toBeChecked)
T
- should be at least of Type Identifiable.uniqueList
- to check againstmapping
- to added the id of T to if it is found duplicate.toBeChecked
- to check.
public Transformation getTransformation(CoordinateSystem sourceCRS, CoordinateSystem targetCRS)
CRSResource
null
sourceCRS
- start point of the transformation.targetCRS
- end point of the transformations
Transformation
or null
if no such transformation was defined.public Identifiable parseIdentifiableObject(java.lang.String id)
- ellipsoid
- geodeticDatum
- projectedCRS
- geographicCRS
- compoundCRS
- geocentricCRS
- primeMeridian
- wgs84Transformation
id
- to look for.
Identifiable
or null
if it could not be parsed.public java.util.List<Transformation> getTransformations()
|
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