org.vfny.geoserver.global
Class GeoServer

java.lang.Object
  extended byorg.vfny.geoserver.global.GlobalLayerSupertype
      extended byorg.vfny.geoserver.global.GeoServer

public class GeoServer
extends org.vfny.geoserver.global.GlobalLayerSupertype

complete configuration ser for the whole server


Field Summary
static java.lang.String WEB_CONTAINER_KEY
          For finding the instance of this class to use from the web container
 
Constructor Summary
GeoServer()
           
 
Method Summary
static java.lang.String get(java.util.Map map, java.lang.String key)
          get purpose.
static boolean get(java.util.Map map, java.lang.String key, boolean defaultValue)
          get purpose.
static java.nio.charset.Charset get(java.util.Map map, java.lang.String key, java.nio.charset.Charset defaultCharSet)
          get purpose.
static java.lang.Class get(java.util.Map map, java.lang.String key, java.lang.Class defaultType)
          get purpose.
static java.io.File get(java.util.Map map, java.lang.String key, java.io.File defaultFile)
          get purpose.
static int get(java.util.Map map, java.lang.String key, int defaultValue)
          get purpose.
static java.util.logging.Level get(java.util.Map map, java.lang.String key, java.util.logging.Level defaultLevel)
          get purpose.
static java.util.List get(java.util.Map map, java.lang.String key, java.util.List defaultList)
          get purpose.
static java.util.Map get(java.util.Map map, java.lang.String key, java.util.Map defaultMap)
          get purpose.
static java.lang.String get(java.util.Map map, java.lang.String key, java.lang.String defaultValue)
          get purpose.
static java.net.URL get(java.util.Map map, java.lang.String key, java.net.URL defaultUrl)
          get purpose.
 java.lang.String getAddress()
          getAddress purpose.
 java.lang.String getAddressCity()
          getAddressCity purpose.
 java.lang.String getAddressCountry()
          getAddressCountry purpose.
 java.lang.String getAddressPostalCode()
          getAddressPostalCode purpose.
 java.lang.String getAddressState()
          getAddressState purpose.
 java.lang.String getAddressType()
          getAddressType purpose.
 java.nio.charset.Charset getCharSet()
          getCharSet purpose.
 java.lang.String getContactEmail()
          getContactEmail purpose.
 java.lang.String getContactFacsimile()
          getContactFacsimile purpose.
 java.lang.String getContactOrganization()
          getContactOrganization purpose.
 java.lang.String getContactPerson()
          getContactPerson purpose.
 java.lang.String getContactPosition()
          getContactPosition purpose.
 java.lang.String getContactVoice()
          getContactVoice purpose.
 Data getData()
          Gets the config for the Data.
static DataDTO getDTO(Data dt)
          getDTO purpose.
static GeoServerDTO getDTO(GeoServer gs)
          getDTO purpose.
static WFSDTO getDTO(WFS wfs)
          getDTO purpose.
static WMSDTO getDTO(WMS wms)
          getDTO purpose.
 java.util.logging.Level getLoggingLevel()
          getLoggingLevel purpose.
 int getMaxFeatures()
          getMaxFeatures purpose.
 java.lang.String getMimeType()
          getMimeType purpose.
 int getNumDecimals()
          getNumDecimals purpose.
 ValidationProcessor getProcessor()
          Access processor property.
 java.lang.String getSchemaBaseUrl()
          getSchemaBaseUrl purpose.
 WFS getWFS()
          Gets the config for the WFS.
 WMS getWMS()
          Gets the config for the WMS.
 boolean isVerbose()
          whether xml documents should be pretty formatted
 void load(DataDTO data, java.io.File baseDir)
          Loads the DataDTO into the current instance as a Data object
 void load(GeoServerDTO geoServer)
          load purpose.
 void load(java.util.Map testSuites, java.util.Map plugIns)
           
 void load(WFSDTO wfs)
          load purpose.
 void load(WMSDTO wms)
          load purpose.
 void load(WMSDTO wms, WFSDTO wfs)
          load purpose.
 void load(WMSDTO wms, WFSDTO wfs, GeoServerDTO geoServer, DataDTO data, java.io.File baseDir)
          load purpose.
protected  java.lang.String notNull(java.lang.String s)
          checks s for nullity and if so, returns an empty String, else just returns s
 DataDTO toDataDTO()
          toDataDTO purpose.
 GeoServerDTO toGeoServerDTO()
          toGeoServerDTO purpose.
 java.util.Map toPlugInDTO()
           
 java.util.Map toTestSuiteDTO()
           
 WFSDTO toWFSDTO()
          toWFSDTO purpose.
 WMSDTO toWMSDTO()
          toWMSDTO purpose.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WEB_CONTAINER_KEY

public static final java.lang.String WEB_CONTAINER_KEY
For finding the instance of this class to use from the web container

ServletContext sc = ... GeoServer gs = (GeoServer)sc.getAttribute(GeoServer.WEB_CONTAINER_KEY);

See Also:
Constant Field Values
Constructor Detail

GeoServer

public GeoServer()
Method Detail

getAddress

public java.lang.String getAddress()
getAddress purpose.

Returns the contact Address.

Returns:
String the contact Address.

getAddressCity

public java.lang.String getAddressCity()
getAddressCity purpose.

Returns the contact City.

Returns:
String the contact City.

getAddressCountry

public java.lang.String getAddressCountry()
getAddressCountry purpose.

Returns the contact Country.

Returns:
String the contact Country.

getAddressPostalCode

public java.lang.String getAddressPostalCode()
getAddressPostalCode purpose.

Returns the contact PostalCode.

Returns:
String the contact PostalCode.

getAddressState

public java.lang.String getAddressState()
getAddressState purpose.

Returns the contact State.

Returns:
String the contact State.

getAddressType

public java.lang.String getAddressType()
getAddressType purpose.

Returns the contact Address Type.

Returns:
String the contact Address Type.

getCharSet

public java.nio.charset.Charset getCharSet()
getCharSet purpose.

Returns the default charset for this server instance.

Returns:
Charset the default charset for this server instance.

getContactEmail

public java.lang.String getContactEmail()
getContactEmail purpose.

Returns the contact Email.

Returns:
String the contact Email.

getContactFacsimile

public java.lang.String getContactFacsimile()
getContactFacsimile purpose.

Returns the contact Facsimile.

Returns:
String the contact Facsimile.

getContactOrganization

public java.lang.String getContactOrganization()
getContactOrganization purpose.

Returns the contact Organization.

Returns:
String the contact Organization.

getContactPerson

public java.lang.String getContactPerson()
getContactPerson purpose.

Returns the contact Person.

Returns:
String the contact Person.

getContactPosition

public java.lang.String getContactPosition()
getContactPosition purpose.

Returns the contact Position.

Returns:
String the contact Position.

getContactVoice

public java.lang.String getContactVoice()
getContactVoice purpose.

Returns the contact Phone.

Returns:
String the contact Phone.

getLoggingLevel

public java.util.logging.Level getLoggingLevel()
getLoggingLevel purpose.

Returns the Logging Level.

Returns:
String the Logging Level.

getMaxFeatures

public int getMaxFeatures()
getMaxFeatures purpose.

Returns the max number of features supported.

Returns:
String the max number of features supported.

getMimeType

public java.lang.String getMimeType()
getMimeType purpose.

Returns the server default mimetype.

Returns:
String the server default mimetype.

getNumDecimals

public int getNumDecimals()
getNumDecimals purpose.

The default number of decimals allowed in the data.

Returns:
int the default number of decimals allowed in the data.

getSchemaBaseUrl

public java.lang.String getSchemaBaseUrl()
getSchemaBaseUrl purpose.

The Schema Base URL for this instance.

Returns:
String the Schema Base URL for this instance.

isVerbose

public boolean isVerbose()
whether xml documents should be pretty formatted

Returns:
true when verbose

getWMS

public WMS getWMS()
Gets the config for the WMS.

Returns:
WMS the wms object

getWFS

public WFS getWFS()
Gets the config for the WFS.

Returns:
WFS the wfs object

getData

public Data getData()
Gets the config for the Data.

Returns:
Data the data object

load

public void load(WMSDTO wms,
                 WFSDTO wfs,
                 GeoServerDTO geoServer,
                 DataDTO data,
                 java.io.File baseDir)
          throws ConfigurationException
load purpose.

Loads the specified DTOs.

Parameters:
wms - WMSDTO The wms data.
wfs - WFSDTO The wfs data
geoServer - GeoServerDTO The geo server data
data - DataDTO The data for a catalog.
Throws:
ConfigurationException - If an error occurs.

load

public void load(java.util.Map testSuites,
                 java.util.Map plugIns)

toPlugInDTO

public java.util.Map toPlugInDTO()

toTestSuiteDTO

public java.util.Map toTestSuiteDTO()

load

public void load(WMSDTO wms,
                 WFSDTO wfs)
          throws ConfigurationException
load purpose.

Loads the specified DTOs.

Parameters:
wms - WMSDTO The wms data.
wfs - WFSDTO The wfs data
Throws:
ConfigurationException - If an error occurs.

load

public void load(WMSDTO wms)
          throws ConfigurationException
load purpose.

Loads the WMSDTO into the current instance as a WMS object

Parameters:
wms - WMSDTO
Throws:
ConfigurationException - If an error occurs

load

public void load(WFSDTO wfs)
          throws ConfigurationException
load purpose.

Loads the WFSDTO into the current instance as a WFS object

Parameters:
wfs - WFSDTO
Throws:
ConfigurationException - If an error occurs

load

public void load(GeoServerDTO geoServer)
          throws ConfigurationException
load purpose.

Loads the GeoServerDTO into the current instance as a GeoServer object

Parameters:
geoServer - GeoServerDTO
Throws:
ConfigurationException - If an error occurs

load

public void load(DataDTO data,
                 java.io.File baseDir)
          throws ConfigurationException
Loads the DataDTO into the current instance as a Data object

Parameters:
data - DataDTO
Throws:
ConfigurationException - If an error occurs

getDTO

public static WMSDTO getDTO(WMS wms)
getDTO purpose.

Generates a WMSDTO for the WMS provided.

Parameters:
wms - WMS the object to generate from
Returns:
WMSDTO the generated object

getDTO

public static WFSDTO getDTO(WFS wfs)
getDTO purpose.

Generates a WFSDTO for the WFS provided.

Parameters:
wfs - WFS the object to generate from
Returns:
WFSDTO the generated object

getDTO

public static GeoServerDTO getDTO(GeoServer gs)
getDTO purpose.

Generates a GeoServerDTO for the GeoServer provided.

Parameters:
gs - GeoServer the object to generate from
Returns:
GeoServerDTO the generated object

getDTO

public static DataDTO getDTO(Data dt)
getDTO purpose.

Generates a DataDTO for the Data provided.

Parameters:
dt - Data the object to generate from
Returns:
DataDTO the generated object

toWMSDTO

public WMSDTO toWMSDTO()
toWMSDTO purpose.

Generates a WMSDTO object from the WMS object inside this instance.

Returns:
WMSDTO the generated object

toWFSDTO

public WFSDTO toWFSDTO()
toWFSDTO purpose.

Generates a WFSDTO object from the WFS object inside this instance.

Returns:
WFSDTO the generated object

toGeoServerDTO

public GeoServerDTO toGeoServerDTO()
toGeoServerDTO purpose.

Generates a GeoServerDTO object from the GeoServer object inside this instance.

Returns:
GeoServerDTO the generated object

toDataDTO

public DataDTO toDataDTO()
toDataDTO purpose.

Generates a DataDTO object from the Data object inside this instance.

Returns:
DataDTO the generated object

getProcessor

public ValidationProcessor getProcessor()
Access processor property.

Returns:
Returns the processor.

notNull

protected java.lang.String notNull(java.lang.String s)
checks s for nullity and if so, returns an empty String, else just returns s

Parameters:
s - String
Returns:
String non-null String (null -> "")

get

public static java.lang.String get(java.util.Map map,
                                   java.lang.String key)
get purpose.

Gets a String from a map of Strings

Parameters:
map - Map the map to extract the string from
key - String the key for the map.
Returns:
String the value in the map.
See Also:
Map

get

public static java.io.File get(java.util.Map map,
                               java.lang.String key,
                               java.io.File defaultFile)
get purpose.

Gets a File from a map given the specified key. If the file is not found the default file is returned.

Parameters:
map - Map the map to extract the file from
key - String the key to extract the value for
defaultFile - The default value should the key not exist.
Returns:
File a File as described above.

get

public static java.lang.String get(java.util.Map map,
                                   java.lang.String key,
                                   java.lang.String defaultValue)
get purpose.

Gets a String from a map of Strings, and returns the default if the string does not exist.

Parameters:
map - Map the map to extract the string from
key - String the key for the map.
defaultValue - The default value should the key not exist.
Returns:
String the value in the map.
See Also:
Map

get

public static java.util.List get(java.util.Map map,
                                 java.lang.String key,
                                 java.util.List defaultList)
get purpose.

Gets a List from a map given the specified key. If the list is not found the default list is returned.

Parameters:
map - Map the map to extract the file from
key - String the key to extract the value for
defaultList - The default value should the key not exist.
Returns:
List a List as described above.

get

public static java.util.Map get(java.util.Map map,
                                java.lang.String key,
                                java.util.Map defaultMap)
get purpose.

Gets a Map from a map given the specified key. If the map is not found the default map is returned.

Parameters:
map - Map the map to extract the file from
key - String the key to extract the value for
defaultMap - The default value should the key not exist.
Returns:
Map a Map as described above.

get

public static int get(java.util.Map map,
                      java.lang.String key,
                      int defaultValue)
get purpose.

Gets a int from a map given the specified key. If the int is not found the default int is returned.

Parameters:
map - Map the map to extract the file from
key - String the key to extract the value for
defaultValue - The default value should the key not exist.
Returns:
int an int as described above.

get

public static boolean get(java.util.Map map,
                          java.lang.String key,
                          boolean defaultValue)
get purpose.

Gets a boolean from a map given the specified key. If the boolean is not found the default boolean is returned.

Parameters:
map - Map the map to extract the file from
key - String the key to extract the value for
defaultValue - The default value should the key not exist.
Returns:
boolean an boolean as described above.

get

public static java.nio.charset.Charset get(java.util.Map map,
                                           java.lang.String key,
                                           java.nio.charset.Charset defaultCharSet)
get purpose.

Gets a Charset from a map given the specified key. If the Charset is not found the default Charset is returned.

Parameters:
map - Map the map to extract the file from
key - String the key to extract the value for
defaultCharSet - The default value should the key not exist.
Returns:
Charset an boolean as described above.

get

public static java.util.logging.Level get(java.util.Map map,
                                          java.lang.String key,
                                          java.util.logging.Level defaultLevel)
get purpose.

Gets a Level from a map given the specified key. If the Level is not found the default Level is returned.

Parameters:
map - Map the map to extract the file from
key - String the key to extract the value for
defaultLevel - The default value should the key not exist.
Returns:
Level an boolean as described above.

get

public static java.net.URL get(java.util.Map map,
                               java.lang.String key,
                               java.net.URL defaultUrl)
get purpose.

Gets a URL from a map given the specified key. If the URL is not found the default URL is returned.

Parameters:
map - Map the map to extract the file from
key - String the key to extract the value for
defaultUrl - The default value should the key not exist.
Returns:
URL an boolean as described above.

get

public static java.lang.Class get(java.util.Map map,
                                  java.lang.String key,
                                  java.lang.Class defaultType)
get purpose.

Gets a Class from a map given the specified key. If the Class is not found the default Class is returned.

Parameters:
map - Map the map to extract the file from
key - String the key to extract the value for
defaultType - The default value should the key not exist.
Returns:
Class an boolean as described above.