public class CatalogGen
extends java.lang.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(java.io.InputStream configDocInputStream,
java.net.URL configDocURL)
Constructs the CatalogGen for the given config document InputStream.
|
CatalogGen(java.net.URL configDocURL)
Constructs the CatalogGen for the given config document.
|
| Modifier and Type | Method and Description |
|---|---|
InvCatalog |
expand()
Expand the catalog.
|
java.util.List |
getCatalogRefInfoList() |
boolean |
isValid(java.lang.StringBuilder out)
Checks the validity of the configuration file.
|
void |
setCatalogExpiresDate(DateType expiresDate) |
void |
writeCatalog(java.lang.String outFileName)
Writes the catalog as XML.
|
protected InvCatalogFactory catFactory
public CatalogGen(java.net.URL configDocURL)
configDocURL - - the URL of the configuration documentpublic CatalogGen(java.io.InputStream configDocInputStream,
java.net.URL configDocURL)
configDocInputStream - - the InputStream from which to read the config document.configDocURL - - the URL for the config document.public java.util.List getCatalogRefInfoList()
public boolean isValid(java.lang.StringBuilder out)
out - - a StringBuffer with validity error and warning messages.public InvCatalog expand()
public void setCatalogExpiresDate(DateType expiresDate)
public void writeCatalog(java.lang.String outFileName)
throws java.io.IOException
outFileName - - the pathname of the output file.java.io.IOException - if can't write catalog