| |
|
| java.lang.Object org.geoserver.data.CatalogReader
CatalogReader | public class CatalogReader (Code) | | Reads the GeoServer catalog.xml file.
Usage:
File catalog = new File( ".../catalog.xml" );
CatalogReader reader = new CatalogReader();
reader.read( catalog );
List dataStores = reader.dataStores();
LIst nameSpaces = reader.nameSpaces();
author: Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org |
Method Summary | |
protected Map | dataStoreParams(Element dataStoreElement) Convenience method for reading connection parameters from a datastore
element.
Parameters: dataStoreElement - The "datastore" element. | public List | dataStores() Reads "datastore" elements from the catalog.xml file. | protected Map.Entry | namespaceTuple(Element namespaceElement) Convenience method for reading namespace prefix and uri from a namespace
element.
Parameters: namespaceElement - The "namespace" element. | public Map | namespaces() Reads "namespace" elements from the catalog.xml file.
For each namespace element read, an entry of is created
in a map. | public void | read(File file) Parses the catalog.xml file into a DOM. |
dataStoreParams | protected Map dataStoreParams(Element dataStoreElement) throws Exception(Code) | | Convenience method for reading connection parameters from a datastore
element.
Parameters: dataStoreElement - The "datastore" element. The map of connection paramters. throws: Exception - If problem parsing any parameters. |
dataStores | public List dataStores() throws Exception(Code) | | Reads "datastore" elements from the catalog.xml file.
For each datastore element read, a map of the connection parameters is
created.
A list of Map objects containg the datastore connection parameters. throws: Exception - If error processing "datastores" element. |
namespaceTuple | protected Map.Entry namespaceTuple(Element namespaceElement) throws Exception(Code) | | Convenience method for reading namespace prefix and uri from a namespace
element.
Parameters: namespaceElement - The "namespace" element. A tuple. throws: Exception - If problem parsing any parameters. |
namespaces | public Map namespaces() throws Exception(Code) | | Reads "namespace" elements from the catalog.xml file.
For each namespace element read, an entry of is created
in a map. The default uri is located under the empty string key.
A map containing tuples. throws: Exception - If error processing "namespaces" element. |
read | public void read(File file) throws IOException(Code) | | Parses the catalog.xml file into a DOM.
This method *must* be called before any other methods.
Parameters: file - The catalog.xml file. throws: IOException - In event of a parser error. |
|
|
|