| java.lang.Object org.vfny.geoserver.global.GlobalLayerSupertype org.vfny.geoserver.global.Data
Data | public class Data extends GlobalLayerSupertype (Code) | | This class stores all the information that a catalog would (and CatalogConfig
used to).
All public methods besides constructors and stuff used for dependency injection
setters is synchronized to avoid response failures during the Geoserver reconfiguration
process (basically, each time you apply a new configuration set on the user interface).
A quick benchar did not show significant scalability loss. If one is to be encountered,
a more complex Reader/Write synchronization will be used, based on the java 5 concurrency
classes or their backport for java 1.4
author: Gabriel Roldan, Axios Engineering author: Chris Holmes author: dzwiers author: $Author: Alessio Fabiani (alessio.fabiani@gmail.com) $ (last author: modification) author: $Author: Simone Giannecchini (simboss1@gmail.com) $ (last author: modification) version: $Id: Data.java 8418 2008-02-18 14:47:17Z aaime $ |
Method Summary | |
public File | getBaseDir() Returns the baseDir for use with relative paths. | public synchronized int | getConnectionCount() The number of connections currently held.
We will need to modify DataStore to provide access to the current count
of its connection pool (if appropriate). | public synchronized CoverageInfo | getCoverageInfo(String name) | public synchronized CoverageInfo | getCoverageInfo(String name, String uri) | public synchronized Map | getCoverageInfos() | public File | getDataDirectory() | public synchronized DataStoreInfo | getDataStoreInfo(String id) Locate a DataStoreInfo by its id attribute. | public synchronized Set | getDataStores() | public synchronized NameSpaceInfo | getDefaultNameSpace() getDefaultNameSpace purpose. | public synchronized String | getDefaultPrefix() Prefix of the defaultNamespace. | public synchronized FeatureSource | getFeatureSource(String prefix, String typeName) Convience method for Accessing FeatureSource by prefix:typeName.
This method is part of the public Catalog API. | public synchronized FeatureTypeInfo | getFeatureTypeInfo(String name) Locate FeatureTypeInfo by name
The following searchness is used::
- search prefix:typeName for direct match with name
- search prefix:typeName for match with defaultnamespaceprefix:name
- linear search of typeName for direct match
Yes this is the magic method used by TransasctionResponse. | public FeatureTypeInfo | getFeatureTypeInfo(QName name) Gets a FeatureTypeINfo from a qualified name. | public synchronized FeatureTypeInfo | getFeatureTypeInfo(String typename, String uri) Gets a FeatureTypeInfo from a local type name (ie unprefixed), and a uri. | public synchronized Map | getFeatureTypeInfos() Retrieve map of FeatureTypeInfo by prefix:typeName. | public synchronized CoverageStoreInfo | getFormatInfo(String id) Locate a CoverageStoreInfo by its id attribute. | public synchronized Set | getFormats() | public GeoServer | getGeoServer() | public Set | getLayerNames() | public Integer | getLayerType(String layerName) | public synchronized int | getLockCount() Count locks currently held. | public MapLayerInfo | getMapLayerInfo(String layerName) | public synchronized NameSpaceInfo | getNameSpace(String prefix) getNameSpace purpose. | public synchronized NameSpaceInfo | getNameSpaceFromURI(String uri) Returns the NamespaceINfo object corresponding to a particular
namespace uri. | public synchronized NameSpaceInfo[] | getNameSpaces() getNameSpaces purpose. | public synchronized NameSpaceInfo | getNamespaceMetaData(String prefix) Implement getNamespace. | public synchronized Set | getPrefixes() Set of available Namespace prefixes. | public synchronized Style | getStyle(String id) | public synchronized Map | getStyles() getStyles purpose. | public synchronized void | load(DataDTO config) | public Style | loadStyle(String fileName, String base) | public Style | loadStyle(File fileName) | public synchronized boolean | lockExists(String lockID) Implement lockExists. | public synchronized void | lockRefresh(String lockID) | public synchronized boolean | lockRefresh(String lockID, Transaction t) Implement lockRefresh. | public synchronized void | lockRelease(String lockID) | public synchronized boolean | lockRelease(String lockID, Transaction t) Implement lockRelease. | public synchronized int | lockReleaseAll() Release all feature locks currently held. | final static void | outputStatus(String title, Map status) | public synchronized void | registerDataStore(DataStore dataStore) Register a DataStore with this Catalog.
This is part of the public CatalogAPI, the fact that we don't want to
support it here may be gounds for it's removal.
GeoSever and the global package would really like to have complete
control over the DataStores in use by the application. | public void | setDataDirectory(File dataDirectory) | public synchronized Map | statusDataStores() Dynamically tries to connect to every DataStore!
Returns a map of Exception by dataStoreId:typeName. | public synchronized Map | statusNamespaces() Dynamically tries to connect to every Namespace!
Returns a map of Exception by prefix:typeName. | public synchronized Object | toDTO() toDTO purpose.
This method is package visible only, and returns a reference to the
GeoServerDTO. |
WEB_CONTAINER_KEY | final public static String WEB_CONTAINER_KEY(Code) | | |
getBaseDir | public File getBaseDir()(Code) | | Returns the baseDir for use with relative paths.
Returns the baseDir. |
getConnectionCount | public synchronized int getConnectionCount()(Code) | | The number of connections currently held.
We will need to modify DataStore to provide access to the current count
of its connection pool (if appropriate). Right now we are asumming a one
DataStore equals One "Connection".
This is a good compromize since I just want to indicate the amount of
resources currently tied up by GeoServer.
Number of available connections. |
getCoverageInfos | public synchronized Map getCoverageInfos()(Code) | | |
getDataDirectory | public File getDataDirectory()(Code) | | |
getDataStoreInfo | public synchronized DataStoreInfo getDataStoreInfo(String id)(Code) | | Locate a DataStoreInfo by its id attribute.
Parameters: id - the DataStoreInfo id looked for the DataStoreInfo with id attribute equals to id or null if there no exists |
getDataStores | public synchronized Set getDataStores()(Code) | | |
getDefaultNameSpace | public synchronized NameSpaceInfo getDefaultNameSpace()(Code) | | getDefaultNameSpace purpose.
Returns the default NameSpaceInfo for this Data object.
NameSpaceInfo the default name space |
getDefaultPrefix | public synchronized String getDefaultPrefix()(Code) | | Prefix of the defaultNamespace.
prefix of the default namespace See Also: org.geotools.data.Catalog.getDefaultPrefix |
getFeatureSource | public synchronized FeatureSource getFeatureSource(String prefix, String typeName) throws IOException(Code) | | Convience method for Accessing FeatureSource by prefix:typeName.
This method is part of the public Catalog API. It allows the Validation
framework to be writen using only public Geotools2 interfaces.
Parameters: prefix - Namespace prefix in which the FeatureType available Parameters: typeName - typeNamed used to identify FeatureType throws: IOException - DOCUMENT ME! See Also: org.geotools.data.Catalog.getFeatureSource(java.lang.Stringjava.lang.String) |
getFeatureTypeInfo | public synchronized FeatureTypeInfo getFeatureTypeInfo(String name) throws NoSuchElementException(Code) | | Locate FeatureTypeInfo by name
The following searchness is used::
- search prefix:typeName for direct match with name
- search prefix:typeName for match with defaultnamespaceprefix:name
- linear search of typeName for direct match
Yes this is the magic method used by TransasctionResponse. If you
wondered what it was doing - this is it.
Parameters: name - String The FeatureTypeInfo Name FeatureTypeInfo throws: NoSuchElementException - |
getFeatureTypeInfo | public synchronized FeatureTypeInfo getFeatureTypeInfo(String typename, String uri)(Code) | | Gets a FeatureTypeInfo from a local type name (ie unprefixed), and a uri.
This method is slow, use getFeatureType(String typeName), where possible.
For not he only user should be TransactionFeatureHandler.
TODO: Jody here - David is this still correct?
Parameters: typename - Name NameSpaceInfo name Parameters: uri - NameSpaceInfo uri FeatureTypeInfo |
getFeatureTypeInfos | public synchronized Map getFeatureTypeInfos()(Code) | | Retrieve map of FeatureTypeInfo by prefix:typeName.
Returns all the featuretype information objects
Map of FetureTypeInfo by prefix:typeName |
getFormatInfo | public synchronized CoverageStoreInfo getFormatInfo(String id)(Code) | | Locate a CoverageStoreInfo by its id attribute.
Parameters: id - the CoverageStoreInfo id looked for the CoverageStoreInfo with id attribute equals to id or null if there no exists |
getFormats | public synchronized Set getFormats()(Code) | | |
getLayerNames | public Set getLayerNames()(Code) | | Returns an unmodifiable set of known layer names (feature type and coverages)
|
getLayerType | public Integer getLayerType(String layerName)(Code) | | Given a layer name will return its type, or null if the layer is not there
Parameters: layerName - the layer name, either fully qualified (namespace:name) orjust the name if the layers happens to be in the default namespace the layer type (see Data.TYPE_VECTOR and Data.TYPE_RASTER) |
getLockCount | public synchronized int getLockCount()(Code) | | Count locks currently held.
Not sure if this should be the number of features locked, or the number
of FeatureLocks in existence (a FeatureLock may lock several features.
number of locks currently held |
getMapLayerInfo | public MapLayerInfo getMapLayerInfo(String layerName)(Code) | | Returns the map layer info for the specified layer, or null if the layer
is not known
Parameters: layerName - |
getNameSpace | public synchronized NameSpaceInfo getNameSpace(String prefix)(Code) | | getNameSpace purpose.
The NameSpaceInfo from the specified prefix
Parameters: prefix - NameSpaceInfo resulting from the specified prefix |
getNameSpaceFromURI | public synchronized NameSpaceInfo getNameSpaceFromURI(String uri)(Code) | | Returns the NamespaceINfo object corresponding to a particular
namespace uri.
If a namespace info object could not be found with mathces uri
then null is returned.
Parameters: uri - A namespace uri, non-null NameSpaceInfo resulting from the specified uri. |
getNameSpaces | public synchronized NameSpaceInfo[] getNameSpaces()(Code) | | getNameSpaces purpose.
List of all relevant namespaces
NameSpaceInfo[] |
getNamespaceMetaData | public synchronized NameSpaceInfo getNamespaceMetaData(String prefix)(Code) | | Implement getNamespace.
Description ...
Parameters: prefix - See Also: org.geotools.data.Catalog.getNamespace(java.lang.String) |
getPrefixes | public synchronized Set getPrefixes()(Code) | | Set of available Namespace prefixes.
Set of namespace Prefixes See Also: org.geotools.data.Catalog.getPrefixes |
getStyles | public synchronized Map getStyles()(Code) | | getStyles purpose.
A reference to the map of styles
Map A map containing the Styles. |
loadStyle | public Style loadStyle(File fileName) throws IOException(Code) | | Load GeoTools2 Style from a fileName
Parameters: fileName - DOCUMENT ME! DOCUMENT ME! throws: IOException - DOCUMENT ME! |
lockExists | public synchronized boolean lockExists(String lockID)(Code) | | Implement lockExists.
Parameters: lockID - true if lockID exists See Also: org.geotools.data.Data.lockExists(java.lang.String) |
lockRefresh | public synchronized void lockRefresh(String lockID)(Code) | | Refresh lock by authorization
Should use your own transaction?
Parameters: lockID - |
lockRefresh | public synchronized boolean lockRefresh(String lockID, Transaction t) throws IOException(Code) | | Implement lockRefresh.
Parameters: lockID - Parameters: t - true if lock was found and refreshed throws: IOException - See Also: org.geotools.data.Data.lockRefresh(java.lang.Stringorg.geotools.data.Transaction) |
lockRelease | public synchronized void lockRelease(String lockID)(Code) | | Release lock by authorization
Parameters: lockID - |
lockRelease | public synchronized boolean lockRelease(String lockID, Transaction t) throws IOException(Code) | | Implement lockRelease.
Parameters: lockID - Parameters: t - true if the lock was found and released throws: IOException - See Also: org.geotools.data.Data.lockRelease(java.lang.Stringorg.geotools.data.Transaction) |
lockReleaseAll | public synchronized int lockReleaseAll()(Code) | | Release all feature locks currently held.
This is the implementation for the Admin "free lock" action, transaction
locks are not released.
Number of locks released |
outputStatus | final static void outputStatus(String title, Map status)(Code) | | Status output
Parameters: title - DOCUMENT ME! Parameters: status - DOCUMENT ME! |
registerDataStore | public synchronized void registerDataStore(DataStore dataStore) throws IOException(Code) | | Register a DataStore with this Catalog.
This is part of the public CatalogAPI, the fact that we don't want to
support it here may be gounds for it's removal.
GeoSever and the global package would really like to have complete
control over the DataStores in use by the application. It recognize that
this may not always be possible. As GeoServer is extend with additional
Modules (such as config) that wish to locate and talk to DataStores
independently of GeoServer the best we can do is ask them to register
with the this Catalog in global.
This reveals what may be a deisgn flaw in GeoTools2 DataStore. We have
know way of knowing if the dataStore has already been placed into our
care as DataStores are not good at identifying themselves. To complicate
matters most keep a static connectionPool around in their GDSFactory - it
could be that the Factories are supposed to be smart enough to prevent
duplication.
Parameters: dataStore - throws: IOException - See Also: org.geotools.data.Catalog.registerDataStore(org.geotools.data.DataStore) |
setDataDirectory | public void setDataDirectory(File dataDirectory)(Code) | | |
statusDataStores | public synchronized Map statusDataStores()(Code) | | Dynamically tries to connect to every DataStore!
Returns a map of Exception by dataStoreId:typeName. If by some marvel the
we could connect to a FeatureSource we will record Boolean.TRUE.
Map of Exception by dataStoreId:typeName |
statusNamespaces | public synchronized Map statusNamespaces()(Code) | | Dynamically tries to connect to every Namespace!
Returns a map of Exception by prefix:typeName. If by some marvel the we
could connect to a FeatureSource we will record Boolean.TRUE.
Map of Exception by prefix:typeName |
toDTO | public synchronized Object toDTO()(Code) | | toDTO purpose.
This method is package visible only, and returns a reference to the
GeoServerDTO. This method is unsafe, and should only be used with extreme
caution.
DataDTO the generated object |
Fields inherited from org.vfny.geoserver.global.GlobalLayerSupertype | final protected static Logger LOGGER(Code)(Java Doc)
|
Methods inherited from org.vfny.geoserver.global.GlobalLayerSupertype | public static String get(Map map, String key)(Code)(Java Doc) public static File get(Map map, String key, File defaultFile)(Code)(Java Doc) public static String get(Map map, String key, String defaultValue)(Code)(Java Doc) public static List get(Map map, String key, List defaultList)(Code)(Java Doc) public static Map get(Map map, String key, Map defaultMap)(Code)(Java Doc) public static int get(Map map, String key, int defaultValue)(Code)(Java Doc) public static boolean get(Map map, String key, boolean defaultValue)(Code)(Java Doc) public static Charset get(Map map, String key, Charset defaultCharSet)(Code)(Java Doc) public static Level get(Map map, String key, Level defaultLevel)(Code)(Java Doc) public static URL get(Map map, String key, URL defaultUrl)(Code)(Java Doc) public static Class get(Map map, String key, Class defaultType)(Code)(Java Doc) protected String notNull(String s)(Code)(Java Doc) abstract Object toDTO()(Code)(Java Doc)
|
|
|