org.geotools.openoffice
Class Nature

java.lang.Object
  extended bycom.sun.star.lib.uno.helper.WeakBase
      extended byorg.geotools.openoffice.Formulas
          extended byorg.geotools.openoffice.Nature
All Implemented Interfaces:
com.sun.star.sheet.XAddIn, com.sun.star.uno.XInterface, com.sun.star.lang.XLocalizable, XNature, com.sun.star.lang.XServiceInfo, com.sun.star.lang.XServiceName, com.sun.star.lang.XTypeProvider, com.sun.star.uno.XWeak

public final class Nature
extends Formulas
implements XNature

Exports methods from the org.geotools.nature package as OpenOffice add-ins.

Since:
2.2
Version:
$Id: Nature.java 17661 2006-01-18 07:55:11Z desruisseaux $
Author:
Martin Desruisseaux

Field Summary
 
Fields inherited from class org.geotools.openoffice.Formulas
methods
 
Fields inherited from class com.sun.star.lib.uno.helper.WeakBase
_mapImplementationIds, _mapTypes
 
Fields inherited from interface com.sun.star.sheet.XAddIn
UNOTYPEINFO
 
Fields inherited from interface com.sun.star.lang.XServiceName
UNOTYPEINFO
 
Fields inherited from interface com.sun.star.lang.XServiceInfo
UNOTYPEINFO
 
Fields inherited from interface com.sun.star.uno.XWeak
UNOTYPEINFO
 
Fields inherited from interface com.sun.star.lang.XTypeProvider
UNOTYPEINFO
 
Constructor Summary
Nature()
          Constructs a default implementation of interface.
 
Method Summary
static com.sun.star.lang.XSingleServiceFactory __getServiceFactory(java.lang.String implementation, com.sun.star.lang.XMultiServiceFactory factories, com.sun.star.registry.XRegistryKey registry)
          Returns a factory for creating the service.
static boolean __writeRegistryServiceInfo(com.sun.star.registry.XRegistryKey registry)
          Writes the service information into the given registry key.
 double getAzimuth(com.sun.star.beans.XPropertySet xOptions, double latitude, double longitude, double time)
          Returns the Sun's azimuth in degrees.
 double getElevation(com.sun.star.beans.XPropertySet xOptions, double latitude, double longitude, double time)
          Returns the Sun's elevation angle in degrees.
 double getNoonTime(com.sun.star.beans.XPropertySet xOptions, double latitude, double longitude, double time)
          Returns the noon time (in GMT) when the Sun reach its highest point.
 double getSeaWaterDensity(com.sun.star.beans.XPropertySet xOptions, double salinity, double temperature, double pressure)
          Computes sea water density as a function of salinity, temperature and pressure.
 double getSeaWaterMeltingPoint(com.sun.star.beans.XPropertySet xOptions, double salinity, double pressure)
          Computes the fusion temperature (melting point) as a function of salinity and pressure.
 double getSeaWaterSaturationO2(com.sun.star.beans.XPropertySet xOptions, double salinity, double temperature)
          Computes the saturation in disolved oxygen (?mol/kg) as a function of salinity and temperature.
 double getSeaWaterSoundVelocity(com.sun.star.beans.XPropertySet xOptions, double salinity, double temperature, double pressure)
          Computes the sound velocity in sea water as a function of salinity, temperature and pressure.
 java.lang.String getServiceName()
          The service name that can be used to create such an object by a factory.
 java.lang.String[] getSupportedServiceNames()
          Provides the supported service names of the implementation, including also indirect service names.
 double getSynodicMonthLength(com.sun.star.beans.XPropertySet xOptions, double time)
          Returns the synodic month length in days.
 double getTropicalYearLength(com.sun.star.beans.XPropertySet xOptions, double time)
          Returns the tropical year length in days.
 boolean supportsService(java.lang.String name)
          Tests whether the specified service is supported, i.e. implemented by the implementation.
 
Methods inherited from class org.geotools.openoffice.Formulas
getArgumentDescription, getDisplayArgumentName, getDisplayCategoryName, getDisplayFunctionName, getEpoch, getFunctionDescription, getImplementationName, getJavaLocale, getLocale, getLocalizedMessage, getLogger, getProgrammaticCategoryName, getProgrammaticFuntionName, reportException, setLocale, setTimeZone, toDate, toDouble
 
Methods inherited from class com.sun.star.lib.uno.helper.WeakBase
finalize, getImplementationId, getTypes, queryAdapter
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Nature

public Nature()
Constructs a default implementation of interface.

Method Detail

__getServiceFactory

public static com.sun.star.lang.XSingleServiceFactory __getServiceFactory(java.lang.String implementation,
                                                                          com.sun.star.lang.XMultiServiceFactory factories,
                                                                          com.sun.star.registry.XRegistryKey registry)
Returns a factory for creating the service. This method is called by the ; do not rename!

Parameters:
implementation - The name of the implementation for which a service is desired.
factories - The service manager to be used if needed.
registry - The registry key
Returns:
A factory for creating the component.

__writeRegistryServiceInfo

public static boolean __writeRegistryServiceInfo(com.sun.star.registry.XRegistryKey registry)
Writes the service information into the given registry key. This method is called by the ; do not rename!

Parameters:
registry - The registry key.
Returns:
if the operation succeeded.

getServiceName

public java.lang.String getServiceName()
The service name that can be used to create such an object by a factory.

Specified by:
getServiceName in interface com.sun.star.lang.XServiceName
Specified by:
getServiceName in class Formulas

getSupportedServiceNames

public java.lang.String[] getSupportedServiceNames()
Provides the supported service names of the implementation, including also indirect service names.

Specified by:
getSupportedServiceNames in interface com.sun.star.lang.XServiceInfo
Returns:
Sequence of service names that are supported.

supportsService

public boolean supportsService(java.lang.String name)
Tests whether the specified service is supported, i.e. implemented by the implementation.

Specified by:
supportsService in interface com.sun.star.lang.XServiceInfo
Parameters:
name - Name of service to be tested.
Returns:
if the service is supported, otherwise.

getNoonTime

public double getNoonTime(com.sun.star.beans.XPropertySet xOptions,
                          double latitude,
                          double longitude,
                          double time)
Returns the noon time (in GMT) when the Sun reach its highest point.

Specified by:
getNoonTime in interface XNature
Parameters:
xOptions - Provided by OpenOffice.
latitude - The latitude of observation point, in degrees.
longitude - The longitude of observation point, in degrees.
time - The observation date.

getElevation

public double getElevation(com.sun.star.beans.XPropertySet xOptions,
                           double latitude,
                           double longitude,
                           double time)
Returns the Sun's elevation angle in degrees.

Specified by:
getElevation in interface XNature
Parameters:
xOptions - Provided by OpenOffice.
latitude - The latitude of observation point, in degrees.
longitude - The longitude of observation point, in degrees.
time - The observation date and time, in GMT.

getAzimuth

public double getAzimuth(com.sun.star.beans.XPropertySet xOptions,
                         double latitude,
                         double longitude,
                         double time)
Returns the Sun's azimuth in degrees.

Specified by:
getAzimuth in interface XNature
Parameters:
xOptions - Provided by OpenOffice.
latitude - The latitude of observation point, in degrees.
longitude - The longitude of observation point, in degrees.
time - The observation date and time, in GMT.

getTropicalYearLength

public double getTropicalYearLength(com.sun.star.beans.XPropertySet xOptions,
                                    double time)
Returns the tropical year length in days.

Specified by:
getTropicalYearLength in interface XNature
Parameters:
xOptions - Provided by OpenOffice.
time - A date that contains the year.

getSynodicMonthLength

public double getSynodicMonthLength(com.sun.star.beans.XPropertySet xOptions,
                                    double time)
Returns the synodic month length in days.

Specified by:
getSynodicMonthLength in interface XNature
Parameters:
xOptions - Provided by OpenOffice.
time - A date that contains the month.

getSeaWaterDensity

public double getSeaWaterDensity(com.sun.star.beans.XPropertySet xOptions,
                                 double salinity,
                                 double temperature,
                                 double pressure)
Computes sea water density as a function of salinity, temperature and pressure.

Specified by:
getSeaWaterDensity in interface XNature
Parameters:
salinity - Salinity PSS-78 (0 to 42).
temperature - Temperature ITS-68 (-2 to 40?C).
pressure - Pressure in decibars (0 to 105 dbar), not including atmospheric pressure.
Returns:
Density (kg/m?).

getSeaWaterMeltingPoint

public double getSeaWaterMeltingPoint(com.sun.star.beans.XPropertySet xOptions,
                                      double salinity,
                                      double pressure)
Computes the fusion temperature (melting point) as a function of salinity and pressure.

Specified by:
getSeaWaterMeltingPoint in interface XNature
Parameters:
salinity - Salinity PSS-78.
pressure - Pressure in decibars, not including atmospheric pressure.

getSeaWaterSoundVelocity

public double getSeaWaterSoundVelocity(com.sun.star.beans.XPropertySet xOptions,
                                       double salinity,
                                       double temperature,
                                       double pressure)
Computes the sound velocity in sea water as a function of salinity, temperature and pressure.

Specified by:
getSeaWaterSoundVelocity in interface XNature
Parameters:
salinity - Salinity PSS-78.
temperature - Temperature ITS-68.
pressure - Pressure in decibars, not including atmospheric pressure.

getSeaWaterSaturationO2

public double getSeaWaterSaturationO2(com.sun.star.beans.XPropertySet xOptions,
                                      double salinity,
                                      double temperature)
Computes the saturation in disolved oxygen (?mol/kg) as a function of salinity and temperature.

Specified by:
getSeaWaterSaturationO2 in interface XNature
Parameters:
salinity - Salinity PSS-78.
temperature - Temperature ITS-68.


Copyright © GeoTools. All Rights Reserved.