org.deegree.cs.refs.components
Class PrimeMeridianRef

java.lang.Object
  extended by org.deegree.commons.tom.Reference<T>
      extended by org.deegree.cs.refs.CRSResourceRef<IPrimeMeridian>
          extended by org.deegree.cs.refs.components.PrimeMeridianRef
All Implemented Interfaces:
Serializable, Object, TypedObjectNode, IPrimeMeridian, CRSResource

public class PrimeMeridianRef
extends CRSResourceRef<IPrimeMeridian>
implements Serializable, IPrimeMeridian

CRSResourceRef to a IPrimeMeridian

Version:
$Revision: $, $Date: $
Author:
Lyn Buesching, last edited by: $Author: lyn $
See Also:
Serialized Form

Constructor Summary
PrimeMeridianRef(ReferenceResolver resolver, String uri, String baseURL)
          Creates a reference to a IPrimeMeridian
 
Method Summary
 boolean equals(Object obj)
           
 IUnit getAngularUnit()
           
 double getLongitude()
           
 double getLongitude(IUnit targetUnit)
           
 double getLongitudeAsRadian()
           
 void setAngularUnit(IUnit units)
           
 void setLongitude(double lon, IUnit degree)
           
 
Methods inherited from class org.deegree.cs.refs.CRSResourceRef
addAreaOfUse, addName, getAreaOfUse, getAreaOfUseBBox, getAreasOfUse, getCode, getCodeAndName, getCodes, getDescription, getDescriptions, getName, getNames, getOrignalCodeStrings, getVersion, getVersions, hasCode, hasId, hasIdOrName, setDefaultAreaOfUse, setDefaultDescription, setDefaultId, setDefaultName, setDefaultVersion
 
Methods inherited from class org.deegree.commons.tom.Reference
getId, getReferencedObject, getURI, isLocal, isResolved, resolve
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.deegree.cs.CRSResource
addAreaOfUse, addName, getAreaOfUse, getAreaOfUseBBox, getAreasOfUse, getCode, getCodeAndName, getCodes, getDescription, getDescriptions, getName, getNames, getOrignalCodeStrings, getVersion, getVersions, hasCode, hasId, hasIdOrName, setDefaultAreaOfUse, setDefaultDescription, setDefaultId, setDefaultName, setDefaultVersion
 
Methods inherited from interface org.deegree.commons.tom.Object
getId
 

Constructor Detail

PrimeMeridianRef

public PrimeMeridianRef(ReferenceResolver resolver,
                        String uri,
                        String baseURL)
Creates a reference to a IPrimeMeridian

Parameters:
resolver - used for resolving the reference, must not be null
uri - the object's uri, must not be null
baseURL - base URL for resolving the uri, may be null (no resolving of relative URLs)
Method Detail

getLongitude

public double getLongitude()
Specified by:
getLongitude in interface IPrimeMeridian
Returns:
the longitude value relative to the Greenwich Meridian. The longitude is expressed in this objects angular units.

getLongitude

public double getLongitude(IUnit targetUnit)
Specified by:
getLongitude in interface IPrimeMeridian
Parameters:
targetUnit - The unit in which to express longitude.
Returns:
the longitude value relative to the Greenwich Meridian, expressed in the specified units. This convenience method make easier to obtains longitude in degrees (getLongitude(Unit.DEGREE)), no matter the underlying angular unit of this prime meridian.

getLongitudeAsRadian

public double getLongitudeAsRadian()
Specified by:
getLongitudeAsRadian in interface IPrimeMeridian
Returns:
the longitude value relative to the Greenwich Meridian, expressed in the radians.

getAngularUnit

public IUnit getAngularUnit()
Specified by:
getAngularUnit in interface IPrimeMeridian
Returns:
the angular unit.

setAngularUnit

public void setAngularUnit(IUnit units)
Specified by:
setAngularUnit in interface IPrimeMeridian
Parameters:
units - to be used

setLongitude

public void setLongitude(double lon,
                         IUnit degree)
Specified by:
setLongitude in interface IPrimeMeridian

equals

public boolean equals(Object obj)
Overrides:
equals in class CRSResourceRef<IPrimeMeridian>


Copyright © 2011. All Rights Reserved.