|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectthredds.cataloggen.CatalogGen
public class CatalogGen
CatalogGen crawls dataset sources given in a CatalogGenConfig file to produce THREDDS catalogs. To generate a catalog from a config file:
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); }
Field Summary | |
---|---|
protected InvCatalogFactory |
catFactory
The catalog factory that knows about CatalogGenConfig metadata. |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected InvCatalogFactory catFactory
Constructor Detail |
---|
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.Method Detail |
---|
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 catalog
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |