|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.vfny.geoserver.global.xml.XMLConfigReader
XMLConfigReader purpose.
Description of XMLConfigReader Static class to load a configuration org.vfny.geoserver.global.dto
Example Use:
ModelConfig m = XMLConfigReader.load(new File("/conf/"));
Constructor Summary | |
protected |
XMLConfigReader()
XMLConfigReader constructor. |
|
XMLConfigReader(java.io.File root)
This method loads the config files from the specified directory into a ModelConfig. |
Method Summary | |
DataDTO |
getData()
getData purpose. |
GeoServerDTO |
getGeoServer()
getGeoServer purpose. |
protected java.util.List |
getKeyWords(org.w3c.dom.Element keywordsElem)
getKeyWords purpose. |
protected java.util.logging.Level |
getLoggingLevel(org.w3c.dom.Element globalConfigElem)
getLoggingLevel purpose. |
WFSDTO |
getWfs()
getWfs purpose. |
WMSDTO |
getWms()
getWms purpose. |
protected static boolean |
isInfoFile(java.io.File testFile)
isInfoFile purpose. |
boolean |
isInitialized()
|
protected void |
load()
load purpose. |
protected void |
loadCatalog(java.io.File catalogFile,
java.io.File featureTypeDir)
loadCatalog purpose. |
protected java.util.Map |
loadConnectionParams(org.w3c.dom.Element connElem)
loadConnectionParams purpose. |
protected ContactDTO |
loadContact(org.w3c.dom.Element contactInfoElement)
loadContact purpose. |
protected DataStoreInfoDTO |
loadDataStore(org.w3c.dom.Element dsElem)
loadDataStore purpose. |
protected java.util.Map |
loadDataStores(org.w3c.dom.Element dsRoot)
loadDataStores purpose. |
protected org.geotools.filter.Filter |
loadDefinitionQuery(org.w3c.dom.Element typeRoot)
loadDefinitionQuery purpose. |
protected FeatureTypeInfoDTO |
loadFeature(java.io.File infoFile)
Load FeatureTypeInfoDTO from a directory. |
protected FeatureTypeInfoDTO |
loadFeaturePt2(org.w3c.dom.Element fTypeRoot)
loadFeaturePt2 purpose. |
protected java.util.Map |
loadFeatureTypes(java.io.File featureTypeRoot)
Load map of FeatureTypeDTO instances from a directory. |
protected void |
loadGlobal(org.w3c.dom.Element globalElem)
loadGlobal purpose. |
protected com.vividsolutions.jts.geom.Envelope |
loadLatLongBBox(org.w3c.dom.Element bboxElem)
loadLatLongBBox purpose. |
protected java.util.Map |
loadNameSpaces(org.w3c.dom.Element nsRoot)
loadNameSpaces purpose. |
protected void |
loadSchema(java.io.File schemaFile,
FeatureTypeInfoDTO dto)
Process schema File for a list of AttributeTypeInfoDTO. |
protected ServiceDTO |
loadService(org.w3c.dom.Element serviceRoot)
loadService purpose. |
protected void |
loadServices(java.io.File configFile)
loadServices purpose. |
protected java.util.Map |
loadStyles(org.w3c.dom.Element stylesElem,
java.io.File baseDir)
loadStyles purpose. |
protected void |
loadWFS(org.w3c.dom.Element wfsElement)
loadWFS purpose. |
protected void |
loadWMS(org.w3c.dom.Element wmsElement)
loadWMS purpose. |
static void |
processSchema(org.w3c.dom.Element elem,
FeatureTypeInfoDTO featureTypeInfoDTO)
Process schema DOM for a list of AttributeTypeInfoDTO. |
protected void |
setDefaultNS()
setDefaultNS purpose. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected XMLConfigReader()
Should never be called.
public XMLConfigReader(java.io.File root) throws ConfigurationException
This method loads the config files from the specified directory into a
ModelConfig. If the path is incorrect, or the directory is formed
correctly, a ConfigException will be thrown and/or null returned.
The config directory is as follows:
root
- A directory which contains the config files.
ConfigurationException
- When an error occurs.Method Detail |
public boolean isInitialized()
protected void load() throws ConfigurationException
Main load routine, sets up file handles for various other portions of the load procedure.
ConfigurationException
protected void loadServices(java.io.File configFile) throws ConfigurationException
loads services.xml into memory with the assistance of other class methods.
configFile
- services.xml
ConfigurationException
- When an error occurs.protected void loadCatalog(java.io.File catalogFile, java.io.File featureTypeDir) throws ConfigurationException
loads catalog.xml into memory with the assistance of other class methods.
catalogFile
- catalog.xmlfeatureTypeDir
- the directory containing the info.xml files for
the featuretypes.
ConfigurationException
- When an error occurs.protected void setDefaultNS()
Finds and sets the default namespace. The namespaces in catalog must already be loaded.
protected java.util.logging.Level getLoggingLevel(org.w3c.dom.Element globalConfigElem) throws ConfigurationException
Parses the LoggingLevel from a DOM tree and converts the level into a Level Object.
globalConfigElem
-
ConfigurationException
- When an error occurs.protected void loadGlobal(org.w3c.dom.Element globalElem) throws ConfigurationException
Converts a DOM tree into a GlobalData configuration.
globalElem
- A DOM tree representing a complete global
configuration.
ConfigurationException
- When an error occurs.protected ContactDTO loadContact(org.w3c.dom.Element contactInfoElement) throws ConfigurationException
Converts a DOM tree into a ContactConfig
contactInfoElement
- a DOM tree to convert into a ContactConfig.
ConfigurationException
- When an error occurs.protected void loadWFS(org.w3c.dom.Element wfsElement) throws ConfigurationException
Converts a DOM tree into a WFS object.
wfsElement
- a DOM tree to convert into a WFS object.
ConfigurationException
- When an error occurs.GlobalData#getBaseUrl()
protected void loadWMS(org.w3c.dom.Element wmsElement) throws ConfigurationException
Converts a DOM tree into a WMS object.
wmsElement
- a DOM tree to convert into a WMS object.
ConfigurationException
- When an error occurs.GlobalData#getBaseUrl()
protected ServiceDTO loadService(org.w3c.dom.Element serviceRoot) throws ConfigurationException
Converts a DOM tree into a ServiceDTO object.
serviceRoot
- a DOM tree to convert into a ServiceDTO object.
ConfigurationException
- When an error occurs.protected java.util.Map loadNameSpaces(org.w3c.dom.Element nsRoot) throws ConfigurationException
Converts a DOM tree into a Map of NameSpaces.
nsRoot
- a DOM tree to convert into a Map of NameSpaces.
ConfigurationException
- When an error occurs.protected java.util.Map loadStyles(org.w3c.dom.Element stylesElem, java.io.File baseDir) throws ConfigurationException
Converts a DOM tree into a Map of Styles.
stylesElem
- a DOM tree to convert into a Map of Styles.baseDir
- DOCUMENT ME!
ConfigurationException
- When an error occurs.protected java.util.Map loadDataStores(org.w3c.dom.Element dsRoot) throws ConfigurationException
Converts a DOM tree into a Map of DataStores.
dsRoot
- a DOM tree to convert into a Map of DataStores.
ConfigurationException
- When an error occurs.protected DataStoreInfoDTO loadDataStore(org.w3c.dom.Element dsElem) throws ConfigurationException
Converts a DOM tree into a DataStoreInfo object.
dsElem
- a DOM tree to convert into a DataStoreInfo object.
ConfigurationException
- When an error occurs.protected java.util.Map loadConnectionParams(org.w3c.dom.Element connElem) throws ConfigurationException
Converts a DOM tree into a Map of Strings which represent connection parameters.
connElem
- a DOM tree to convert into a Map of Strings which
represent connection parameters.
ConfigurationException
- When an error occurs.protected java.util.Map loadFeatureTypes(java.io.File featureTypeRoot) throws ConfigurationException
Expected directory structure:
If a schema.xml file is not used, the information may be generated from a FeatureType using DataTransferObjectFactory.
featureTypeRoot
- Root FeatureType directory
dataStoreId:typeName
ConfigurationException
- When an error occurs.
java.lang.IllegalArgumentException
- DOCUMENT ME!protected FeatureTypeInfoDTO loadFeature(java.io.File infoFile) throws ConfigurationException
Expected directory structure:
If a schema.xml file is not used, the information may be generated from a FeatureType using DataTransferObjectFactory.
infoFile
- a File to convert into a FeatureTypeInfo object.
(info.xml)
ConfigurationException
- When an error occurs.
java.lang.IllegalArgumentException
- DOCUMENT ME!loadFeaturePt2(Element)
protected FeatureTypeInfoDTO loadFeaturePt2(org.w3c.dom.Element fTypeRoot) throws ConfigurationException
Converts a DOM tree into a FeatureTypeInfo object.
fTypeRoot
- a DOM tree to convert into a FeatureTypeInfo object.
ConfigurationException
- When an error occurs.protected java.util.List getKeyWords(org.w3c.dom.Element keywordsElem)
Converts a DOM tree into a List of Strings representing keywords.
keywordsElem
- a DOM tree to convert into a List of Strings
representing keywords.
protected com.vividsolutions.jts.geom.Envelope loadLatLongBBox(org.w3c.dom.Element bboxElem) throws ConfigurationException
Converts a DOM tree into a Envelope object.
bboxElem
- a DOM tree to convert into a Envelope object.
ConfigurationException
- When an error occurs.protected org.geotools.filter.Filter loadDefinitionQuery(org.w3c.dom.Element typeRoot) throws ConfigurationException
Converts a DOM tree into a Filter object.
typeRoot
- a DOM tree to convert into a Filter object.
ConfigurationException
- When an error occurs.protected static boolean isInfoFile(java.io.File testFile)
Used to perform safety checks on info.xml file handles.
testFile
- The file to test.
protected void loadSchema(java.io.File schemaFile, FeatureTypeInfoDTO dto) throws ConfigurationException
The provided FeatureTypeInfoDTO will be updated with the schemaBase.
schemaFile
- File containing schema definitiondto
- Schema DOM element
ConfigurationException
public static void processSchema(org.w3c.dom.Element elem, FeatureTypeInfoDTO featureTypeInfoDTO) throws ConfigurationException
The provided FeatureTypeInfoDTO will be updated with the schemaBase.
elem
- Schema DOM elementfeatureTypeInfoDTO
-
ConfigurationException
public DataDTO getData()
Description ...
public GeoServerDTO getGeoServer()
Description ...
public WFSDTO getWfs()
Description ...
public WMSDTO getWms()
Description ...
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |