|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.commons.xml.XMLAdapter
org.deegree.crs.configuration.resources.XMLFileResource
org.deegree.crs.configuration.deegree.xml.om.Parser
public class Parser
The CRSParser class TODO add class documentation here.
| Field Summary |
|---|
| Fields inherited from class org.deegree.commons.xml.XMLAdapter |
|---|
DEFAULT_URL, nsContext, rootElement, XLN_NS |
| Constructor Summary | |
|---|---|
Parser(DeegreeCRSProvider<org.apache.axiom.om.OMElement> provider,
org.apache.axiom.om.OMElement rootElement)
|
|
Parser(DeegreeCRSProvider<org.apache.axiom.om.OMElement> provider,
Properties properties)
|
|
Parser(DeegreeCRSProvider<org.apache.axiom.om.OMElement> provider,
Properties properties,
String defaultRootElement,
String namespace)
|
|
| Method Summary | |
|---|---|
List<CRSCodeType[]> |
getAvailableCRSCodes()
|
protected Helmert |
getConversionInfoFromID(String infoID)
|
Ellipsoid |
getEllipsoidForId(String ellipsoidID)
Tries to find a cached ellipsoid, if not found, the config will be checked. |
GeodeticDatum |
getGeodeticDatumForId(String datumID)
|
PrimeMeridian |
getPrimeMeridianForId(String meridianID)
|
Projection |
getProjectionForId(String usedProjection,
GeographicCRS underlyingCRS)
|
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.apache.axiom.om.OMElement transformationElement)
Parses the transformation variables from the given crs:coordinatesystem/crs:polynomialTransformation element. |
org.apache.axiom.om.OMElement |
getURIAsType(String uri)
Opens a stream to a resource which is defined by the uri. |
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 List<Transformation> |
parseAlternativeTransformations(org.apache.axiom.om.OMElement crsElement)
Parse all polynomial transformations for a given crs. |
protected Axis[] |
parseAxisOrder(org.apache.axiom.om.OMElement crsElement)
Creates an axis array for the given crs element. |
protected CoordinateSystem |
parseCompoundCRS(org.apache.axiom.om.OMElement crsElement)
|
CoordinateSystem |
parseCoordinateSystem(org.apache.axiom.om.OMElement crsDefintion)
|
protected CoordinateSystem |
parseGeocentricCRS(org.apache.axiom.om.OMElement crsElement)
|
protected CoordinateSystem |
parseGeographicCRS(org.apache.axiom.om.OMElement crsElement)
|
protected CRSIdentifiable |
parseIdentifiable(org.apache.axiom.om.OMElement element)
Parses all elements of the identifiable object. |
CRSIdentifiable |
parseIdentifiableObject(String id)
Gets the Element for the given id and heuristically check the localname of the resulting root Element. |
protected CoordinateSystem |
parseProjectedCRS(org.apache.axiom.om.OMElement crsElement)
|
protected Projection |
parseProjection(org.apache.axiom.om.OMElement projectionElement,
GeographicCRS underlyingCRS,
Unit units)
Parses and instantiates the projection from the given element. |
protected GeodeticDatum |
parseReferencedGeodeticDatum(org.apache.axiom.om.OMElement parentElement,
String parentID)
Parses the required usedDatum element from the given parentElement (probably a crs element). |
Transformation |
parseTransformation(org.apache.axiom.om.OMElement transformationDefinition)
Retrieves a transformation from the resource. |
protected Unit |
parseUnit(org.apache.axiom.om.OMElement parent)
Parses a unit from the given xml-parent. |
| Methods inherited from class org.deegree.crs.configuration.resources.XMLFileResource |
|---|
getProvider |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Parser(DeegreeCRSProvider<org.apache.axiom.om.OMElement> provider,
org.apache.axiom.om.OMElement rootElement)
provider - to be used for callback.rootElement - to be used for the configuration.
public Parser(DeegreeCRSProvider<org.apache.axiom.om.OMElement> provider,
Properties properties)
provider - properties -
public Parser(DeegreeCRSProvider<org.apache.axiom.om.OMElement> provider,
Properties properties,
String defaultRootElement,
String namespace)
provider - properties - defaultRootElement - namespace - | Method Detail |
|---|
public CoordinateSystem parseCoordinateSystem(org.apache.axiom.om.OMElement crsDefintion)
throws CRSConfigurationException
parseCoordinateSystem in interface CRSParser<org.apache.axiom.om.OMElement>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.apache.axiom.om.OMElement getURIAsType(String uri)
throws IOException
XLinkResolver
getURIAsType in interface XLinkResolver<org.apache.axiom.om.OMElement>uri - to locate
null if no resource was found.
IOException - If an error occurred while locating or opening the resource.public Helmert getWGS84Transformation(GeographicCRS sourceCRS)
CRSResourcenull
getWGS84Transformation in interface CRSResource<org.apache.axiom.om.OMElement>sourceCRS - to retrieve the transformation for.
Helmert transformation or null if no such transformation was defined.
public String getVersion()
throws CRSConfigurationException
getVersion in interface CRSParser<org.apache.axiom.om.OMElement>CRSConfigurationException - if the root element is empty
protected CRSIdentifiable parseIdentifiable(org.apache.axiom.om.OMElement element)
throws CRSConfigurationException
element - the xml-representation of the id-object
null if no id was given.
CRSConfigurationException
protected Axis[] parseAxisOrder(org.apache.axiom.om.OMElement 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.apache.axiom.om.OMElement transformationDefinition)
parseTransformation in interface CRSParser<org.apache.axiom.om.OMElement>transformationDefinition -
null if no transformation could be parsed.protected List<Transformation> parseAlternativeTransformations(org.apache.axiom.om.OMElement crsElement)
crsElement - to parse the transformations for.
null.protected PolynomialTransformation getTransformation(org.apache.axiom.om.OMElement transformationElement)
null will be returned.
transformationElement - to parse the values from.
null if it could not be instantiated.
protected Unit parseUnit(org.apache.axiom.om.OMElement parent)
throws CRSConfigurationException
parent - xml-node to parse the unit from.
CRSConfigurationException - if the unit object could not be created.
protected CoordinateSystem parseProjectedCRS(org.apache.axiom.om.OMElement 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.apache.axiom.om.OMElement 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.apache.axiom.om.OMElement 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.apache.axiom.om.OMElement 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.apache.axiom.om.OMElement parentElement,
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.
public GeodeticDatum getGeodeticDatumForId(String datumID)
throws CRSConfigurationException
getGeodeticDatumForId in interface CRSParser<org.apache.axiom.om.OMElement>datumID -
CRSConfigurationException
public PrimeMeridian getPrimeMeridianForId(String meridianID)
throws CRSConfigurationException
getPrimeMeridianForId in interface CRSParser<org.apache.axiom.om.OMElement>meridianID - the id to search for.
null
CRSConfigurationException - if the longitude was not set or the units could not be parsed.
public Ellipsoid getEllipsoidForId(String ellipsoidID)
throws CRSConfigurationException
getEllipsoidForId in interface CRSParser<org.apache.axiom.om.OMElement>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(String infoID)
throws CRSConfigurationException
infoID - to get the conversioninfo from.
CRSConfigurationException
protected Projection parseProjection(org.apache.axiom.om.OMElement 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
public Transformation getTransformation(CoordinateSystem sourceCRS,
CoordinateSystem targetCRS)
CRSResourcenull
getTransformation in interface CRSResource<org.apache.axiom.om.OMElement>sourceCRS - start point of the transformation.targetCRS - end point of the transformations
Transformation or null if no such transformation was defined.public CRSIdentifiable parseIdentifiableObject(String id)
- ellipsoid
- geodeticDatum
- projectedCRS
- geographicCRS
- compoundCRS
- geocentricCRS
- primeMeridian
- wgs84Transformation
parseIdentifiableObject in interface CRSParser<org.apache.axiom.om.OMElement>id - to look for.
CRSIdentifiable or null if it could not be parsed.
public List<CRSCodeType[]> getAvailableCRSCodes()
throws CRSConfigurationException
getAvailableCRSCodes in interface CRSParser<org.apache.axiom.om.OMElement>CRSConfigurationException
public Projection getProjectionForId(String usedProjection,
GeographicCRS underlyingCRS)
getProjectionForId in interface CRSParser<org.apache.axiom.om.OMElement>usedProjection - of the projectionunderlyingCRS - of the projection
null if no such projection could be loaded.
|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||