public class CatalogGen extends Object
String inFileName = "file:/home/edavis/testCatGenConfig.xml";
String outFileName = "/home/edavis/testCatGenConfig-results.xml";
StringBuffer log = new StringBuffer();
CatalogGen catGen = new CatalogGen( inFileName);
if ( catGen.isValid( log))
{
catGen.expand();
catGen.writeCatalog( outFileName);
}
| Modifier and Type | Field and Description |
|---|---|
protected InvCatalogFactory |
catFactory
The catalog factory that knows about CatalogGenConfig metadata.
|
| Constructor and Description |
|---|
CatalogGen(InputStream configDocInputStream,
URL configDocURL)
Constructs the CatalogGen for the given config document InputStream.
|
CatalogGen(URL configDocURL)
Constructs the CatalogGen for the given config document.
|
| Modifier and Type | Method and Description |
|---|---|
InvCatalog |
expand()
Expand the catalog.
|
List |
getCatalogRefInfoList() |
boolean |
isValid(StringBuilder out)
Checks the validity of the configuration file.
|
void |
setCatalogExpiresDate(DateType expiresDate) |
void |
writeCatalog(String outFileName)
Writes the catalog as XML.
|
protected InvCatalogFactory catFactory
public CatalogGen(URL configDocURL)
configDocURL - - the URL of the configuration documentpublic CatalogGen(InputStream configDocInputStream, URL configDocURL)
configDocInputStream - - the InputStream from which to read the config document.configDocURL - - the URL for the config document.public List getCatalogRefInfoList()
public boolean isValid(StringBuilder out)
out - - a StringBuffer with validity error and warning messages.public InvCatalog expand()
public void setCatalogExpiresDate(DateType expiresDate)
public void writeCatalog(String outFileName) throws IOException
outFileName - - the pathname of the output file.IOException - if can't write catalogCopyright © 1999–2015 UCAR/Unidata. All rights reserved.