Esri Geoportal Server
1.0

com.esri.gpt.server.csw.client
Class CswCatalogs

java.lang.Object
  extended by com.esri.gpt.server.csw.client.CswCatalogs

public class CswCatalogs
extends Object

Collections class for catalogs. The collection support both sequential and random access objects based on key.


Constructor Summary
CswCatalogs()
           
 
Method Summary
 void addCatalog(CswCatalog catalog)
          Add a catalog using its id as a key.
 void addCatalog(String key, CswCatalog catalog)
          Add a key value pair to catalog collection.
 void addCatalogtoConfig(CswCatalog catalog, String filename)
          Add a new Catalog to the collection.
 void deleteCatalogfromConfig(CswCatalog catalog, String filename)
          Delete an existing Catalog from the configuration file.
 CswCatalog getCatalog(int index)
           
 CswCatalog getCatalog(String id)
           
 int getSize()
           
 void loadCatalogfromConfig(String filename, CswProfiles profileList)
          Loads the catalog details from configuration file.
 void updateCatalogNameinConfig(CswCatalog catalog, String displayname, String surl, CswProfile profile, String filename)
          Update the name of an existing Catalog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CswCatalogs

public CswCatalogs()
Method Detail

addCatalog

public void addCatalog(String key,
                       CswCatalog catalog)
Add a key value pair to catalog collection. Add to catalog collection.

Parameters:
key - The key which is the url hashcode for the catalog
catalog - the catalog object

addCatalog

public void addCatalog(CswCatalog catalog)
Add a catalog using its id as a key.

Parameters:
catalog -

addCatalogtoConfig

public void addCatalogtoConfig(CswCatalog catalog,
                               String filename)
Add a new Catalog to the collection. The catalog details are also added to the configuration to the file. The catalog details are added in the collection. The catalog details are also appended in the configuration file.

Parameters:
catalog - CswCatalog
filename - the catalog configuration file

deleteCatalogfromConfig

public void deleteCatalogfromConfig(CswCatalog catalog,
                                    String filename)
Delete an existing Catalog from the configuration file. The catalog details are deleted from the collection. The catalog details are also deleted from the configuration file.

Parameters:
catalog - CswCatalog
filename - the catalog configuration file

loadCatalogfromConfig

public void loadCatalogfromConfig(String filename,
                                  CswProfiles profileList)
                           throws ParserConfigurationException,
                                  SAXException,
                                  IOException,
                                  XPathExpressionException
Loads the catalog details from configuration file. The catalog details are loaded in the collection. Duplicate or invalid catalog are ignored. Invalid catalog includes catalogs with profiles information not present in profiles collection.

Parameters:
filename - the catalog configuration file
profileList - the profiles collection
Throws:
ParserConfigurationException
IOException
SAXException
XPathExpressionException

getCatalog

public CswCatalog getCatalog(String id)
Parameters:
id -

getCatalog

public CswCatalog getCatalog(int index)

getSize

public int getSize()

updateCatalogNameinConfig

public void updateCatalogNameinConfig(CswCatalog catalog,
                                      String displayname,
                                      String surl,
                                      CswProfile profile,
                                      String filename)
Update the name of an existing Catalog. The name is also updated in the configuration file. The catalog name is updated from the collection. The catalog name is also updated from the configuration file.

Parameters:
catalog - CswCatalog
displayname - The string name
surl - The string updated url
profile - The string name
filename - the catalog configuration file

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.