org.vfny.geoserver.global
Class Service

java.lang.Object
  extended byorg.vfny.geoserver.global.GlobalLayerSupertype
      extended byorg.vfny.geoserver.global.Service
Direct Known Subclasses:
WFS, WMS

public abstract class Service
extends org.vfny.geoserver.global.GlobalLayerSupertype

Default configuration for services. This class represents all the commonalities to the WFS and WMS services.

WFS wfs = new WFS(dto); Service serv = (Service)WFS; System.out.println(serv.getName());

See Also:
WMS, WFS

Field Summary
protected  ServiceDTO config
          The DTO for this instance.
protected static java.util.logging.Logger LOGGER
          for debugging
 
Constructor Summary
Service(ServiceDTO config)
          Service constructor.
 
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 getAbstract()
          getAbstract purpose.
 java.lang.String getAccessConstraints()
          getAccessConstraints purpose.
 java.lang.String getFees()
          getFees purpose.
 java.util.List getKeywords()
          getKeywords purpose.
 java.lang.String getMaintainer()
          getMaintainer purpose.
 java.lang.String getName()
          getName purpose.
 java.net.URL getOnlineResource()
          getOnlineResource purpose.
 java.lang.String getTitle()
          getTitle purpose.
 boolean isEnabled()
          isEnabled 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

config

protected ServiceDTO config
The DTO for this instance. When Sub-classes are using config they should use Caution.


LOGGER

protected static final java.util.logging.Logger LOGGER
for debugging

Constructor Detail

Service

public Service(ServiceDTO config)
Service constructor.

Stores the new ServiceDTO data for this service.

Parameters:
config -
Throws:
java.lang.NullPointerException - when the param is null
Method Detail

isEnabled

public boolean isEnabled()
isEnabled purpose.

Returns whether is service is enabled.

Returns:
true when enabled.

getOnlineResource

public java.net.URL getOnlineResource()
getOnlineResource purpose.

Returns the Online Resource for this Service.

Returns:
URL The Online resource.

getAbstract

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

A description of this service.

Returns:
String This Service's abstract.

getAccessConstraints

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

A description of this service's access constraints.

Returns:
String This service's access constraints.

getFees

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

A description of the fees for this service.

Returns:
String the fees for this service.

getKeywords

public java.util.List getKeywords()
getKeywords purpose.

A list of the keywords for this service.

Returns:
List keywords for this service

getMaintainer

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

The name of the maintainer for this service.

Returns:
String maintainer for this service.

getName

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

The name for this service.

Returns:
String the service's name.

getTitle

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

The title for this service.

Returns:
String the service's title.

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.