public class XML extends Object implements SiteCatalog
http://pegasus.isi.edu/schema/sc-3.0.xsd
Modifier and Type | Field and Description |
---|---|
private PegasusBag |
mBag
The bag of Pegasus Initialization objects
|
private String |
mFilename
The Site Catalog file to be parser.
|
private LogManager |
mLogger
The handle to the log manager.
|
private SiteCatalogXMLParser |
mParser
The handle to parser instance that will parse the site catalog.
|
private SiteStore |
mSiteStore
Stores sites in memory
|
c_prefix, VERSION
DB_ALL_PREFIX
Constructor and Description |
---|
XML()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the connection to backend file.
|
boolean |
connect(Properties props)
Establishes a connection to the file from the properties.
|
boolean |
connect(String filename)
Initializes the Site Catalog Parser instance for the file.
|
int |
insert(SiteCatalogEntry entry)
Not implemented as yet.
|
boolean |
isClosed()
Returns if the connection is closed or not.
|
Set<String> |
list()
Lists the site handles for all the sites in the Site Catalog.
|
int |
load(List<String> sites)
Loads up the Site Catalog implementation with the sites whose
site handles are specified.
|
SiteCatalogEntry |
lookup(String handle)
Retrieves the
SiteCatalogEntry for a site. |
int |
remove(String handle)
Not yet implemented as yet.
|
private SiteCatalogXMLParser mParser
private SiteStore mSiteStore
private String mFilename
private LogManager mLogger
private PegasusBag mBag
public boolean connect(Properties props) throws SiteCatalogException
connect
in interface Catalog
props
- is the property table with sufficient settings to
to connect to the implementation.SiteCatalogException
public boolean connect(String filename)
filename
- is the name of the file to read.public void close()
public boolean isClosed()
isClosed
in interface Catalog
Catalog.close()
public int load(List<String> sites) throws SiteCatalogException
load
in interface SiteCatalog
sites
- the list of sites to be loaded.SiteCatalogException
- in case of error.public int insert(SiteCatalogEntry entry) throws SiteCatalogException
insert
in interface SiteCatalog
entry
- SiteCatalogException
public Set<String> list() throws SiteCatalogException
list
in interface SiteCatalog
SiteCatalogException
- in case of error.public SiteCatalogEntry lookup(String handle) throws SiteCatalogException
SiteCatalogEntry
for a site.lookup
in interface SiteCatalog
handle
- the site handle / identifier.null
if no match is found.SiteCatalogException
- in case of error.public int remove(String handle) throws SiteCatalogException
remove
in interface SiteCatalog
handle
- SiteCatalogException