Java Doc for Data.java in  » GIS » GeoServer » org » vfny » geoserver » global » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoServer » org.vfny.geoserver.global 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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 $


Field Summary
final public static  IntegerTYPE_RASTER
    
final public static  IntegerTYPE_VECTOR
    
final public static  StringWEB_CONTAINER_KEY
    

Constructor Summary
public  Data(DataDTO config, File dir, GeoServer g)
    
public  Data(File dir, GeoServer g)
    
public  Data(Config config, GeoServer g)
    

Method Summary
public  FilegetBaseDir()
     Returns the baseDir for use with relative paths.
public synchronized  intgetConnectionCount()
     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  CoverageInfogetCoverageInfo(String name)
    
public synchronized  CoverageInfogetCoverageInfo(String name, String uri)
    
public synchronized  MapgetCoverageInfos()
    
public  FilegetDataDirectory()
    
public synchronized  DataStoreInfogetDataStoreInfo(String id)
     Locate a DataStoreInfo by its id attribute.
public synchronized  SetgetDataStores()
    
public synchronized  NameSpaceInfogetDefaultNameSpace()
     getDefaultNameSpace purpose.
public synchronized  StringgetDefaultPrefix()
     Prefix of the defaultNamespace.
public synchronized  FeatureSourcegetFeatureSource(String prefix, String typeName)
     Convience method for Accessing FeatureSource by prefix:typeName.

This method is part of the public Catalog API.

public synchronized  FeatureTypeInfogetFeatureTypeInfo(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  FeatureTypeInfogetFeatureTypeInfo(QName name)
     Gets a FeatureTypeINfo from a qualified name.
public synchronized  FeatureTypeInfogetFeatureTypeInfo(String typename, String uri)
     Gets a FeatureTypeInfo from a local type name (ie unprefixed), and a uri.
public synchronized  MapgetFeatureTypeInfos()
     Retrieve map of FeatureTypeInfo by prefix:typeName.
public synchronized  CoverageStoreInfogetFormatInfo(String id)
     Locate a CoverageStoreInfo by its id attribute.
public synchronized  SetgetFormats()
    
public  GeoServergetGeoServer()
    
public  SetgetLayerNames()
    
public  IntegergetLayerType(String layerName)
    
public synchronized  intgetLockCount()
     Count locks currently held.
public  MapLayerInfogetMapLayerInfo(String layerName)
    
public synchronized  NameSpaceInfogetNameSpace(String prefix)
     getNameSpace purpose.
public synchronized  NameSpaceInfogetNameSpaceFromURI(String uri)
     Returns the NamespaceINfo object corresponding to a particular namespace uri.
public synchronized  NameSpaceInfo[]getNameSpaces()
     getNameSpaces purpose.
public synchronized  NameSpaceInfogetNamespaceMetaData(String prefix)
     Implement getNamespace.
public synchronized  SetgetPrefixes()
     Set of available Namespace prefixes.
public synchronized  StylegetStyle(String id)
    
public synchronized  MapgetStyles()
     getStyles purpose.
public synchronized  voidload(DataDTO config)
    
public  StyleloadStyle(String fileName, String base)
    
public  StyleloadStyle(File fileName)
    
public synchronized  booleanlockExists(String lockID)
     Implement lockExists.
public synchronized  voidlockRefresh(String lockID)
    
public synchronized  booleanlockRefresh(String lockID, Transaction t)
     Implement lockRefresh.
public synchronized  voidlockRelease(String lockID)
    
public synchronized  booleanlockRelease(String lockID, Transaction t)
     Implement lockRelease.
public synchronized  intlockReleaseAll()
     Release all feature locks currently held.
final static  voidoutputStatus(String title, Map status)
    
public synchronized  voidregisterDataStore(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  voidsetDataDirectory(File dataDirectory)
    
public synchronized  MapstatusDataStores()
     Dynamically tries to connect to every DataStore!

Returns a map of Exception by dataStoreId:typeName.

public synchronized  MapstatusNamespaces()
     Dynamically tries to connect to every Namespace!

Returns a map of Exception by prefix:typeName.

public synchronized  ObjecttoDTO()
     toDTO purpose.

This method is package visible only, and returns a reference to the GeoServerDTO.


Field Detail
TYPE_RASTER
final public static Integer TYPE_RASTER(Code)



TYPE_VECTOR
final public static Integer TYPE_VECTOR(Code)



WEB_CONTAINER_KEY
final public static String WEB_CONTAINER_KEY(Code)




Constructor Detail
Data
public Data(DataDTO config, File dir, GeoServer g) throws ConfigurationException(Code)



Data
public Data(File dir, GeoServer g) throws ConfigurationException(Code)



Data
public Data(Config config, GeoServer g) throws ConfigurationException(Code)




Method Detail
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.



getCoverageInfo
public synchronized CoverageInfo getCoverageInfo(String name) throws NoSuchElementException(Code)



getCoverageInfo
public synchronized CoverageInfo getCoverageInfo(String name, String uri)(Code)



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 idor 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 FeatureTypeInfo getFeatureTypeInfo(QName name)(Code)
Gets a FeatureTypeINfo from a qualified name.

This method calls through to Data.getFeatureTypeInfo(String,String) .


Parameters:
  name - The qualified name of the feature type.



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 idor null if there no exists



getFormats
public synchronized Set getFormats()(Code)



getGeoServer
public GeoServer getGeoServer()(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



getStyle
public synchronized Style getStyle(String id)(Code)



getStyles
public synchronized Map getStyles()(Code)
getStyles purpose.

A reference to the map of styles

Map A map containing the Styles.



load
public synchronized void load(DataDTO config)(Code)



loadStyle
public Style loadStyle(String fileName, String base) throws IOException(Code)



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)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.