|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectthredds.catalog.InvCatalog
thredds.catalog.InvCatalogImpl
public class InvCatalogImpl
Concrete implementation of a Thredds catalog object. Use this when you are constructing or modifying.
InvCatalog| Field Summary |
|---|
| Fields inherited from class thredds.catalog.InvCatalog |
|---|
baseURI, datasets, dsHash, expires, name, properties, serviceHash, services, topDataset, version |
| Constructor Summary | |
|---|---|
InvCatalogImpl(java.lang.String name,
java.lang.String version,
DateType expires,
java.net.URI baseURI)
Construct an InvCatalog. |
|
InvCatalogImpl(java.lang.String name,
java.lang.String version,
java.net.URI baseURI)
Construct an InvCatalog. |
|
| Method Summary | |
|---|---|
void |
addDataset(InvDatasetImpl ds)
Add Dataset (1.0) |
void |
addDatasetByID(InvDatasetImpl ds)
Add Dataset to internal hash. |
void |
addDatasetRoot(InvProperty root)
Add Dataset Root, key = path, value = location. |
void |
addProperty(InvProperty p)
Add Property (1.0) |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add a PropertyChangeEvent Listener. |
void |
addService(InvService s)
Add Service (1.0) |
void |
appendErrorMessage(java.lang.String message,
boolean isInvalid)
Append an error message to the message log. |
boolean |
check(java.lang.StringBuffer out,
boolean show)
Check internal data structures. |
java.lang.String |
dump()
Debugging: dump entire data structure. |
boolean |
equals(java.lang.Object o)
InvCatalogImpl elements with same values are equal. |
void |
filter(DatasetFilter filter)
Munge this catalog to remove any dataset that doesnt pass through the filter. |
boolean |
finish()
Finish constructing after all elements have been added or modified. |
java.net.URI |
getBaseURI()
Get the catalog base URI. |
java.lang.String |
getCreateFrom()
String describing how the catalog was created, for debugging. |
protected DatasetFilter |
getDatasetFilter()
|
java.util.List |
getDatasetRoots()
Get dataset roots. |
java.lang.String |
getDTDid()
get DTD string |
java.lang.String |
getLog()
|
boolean |
hasFatalError()
Check if there is a fatal error and catalog should not be used. |
int |
hashCode()
Override Object.hashCode() to implement equals. |
boolean |
removeDataset(InvDatasetImpl ds)
Remove the given dataset from this catalog if it is a direct child of this catalog. |
void |
removeDatasetByID(InvDatasetImpl ds)
Find the dataset in this catalog by its ID. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove a PropertyChangeEvent Listener. |
boolean |
replaceDataset(InvDatasetImpl remove,
InvDatasetImpl add)
Replace the given dataset if it is a nested dataset. |
void |
setBaseURI(java.net.URI baseURI)
Set the catalog base URI. |
void |
setCatalogConverterToVersion1()
Set the connverter to 1.0, typically to write a 0.6 out to a 1.0 |
void |
setCreateFrom(java.lang.String createFrom)
Set how the catalog was created, for debugging. |
void |
setDataset(InvDatasetImpl ds)
Deprecated. Use addDataset() instead; datamodel now allows multiple top level datasets. |
void |
setDTDid(java.lang.String dtdID)
set DTD |
void |
setExpires(DateType expiresDate)
Set the expires date after which the catalog is no longer valid. |
void |
subset(InvDataset ds)
Munge this catalog so the given dataset is the top catalog. |
void |
writeXML(java.io.OutputStream os)
Write the catalog as an XML document to the specified stream. |
void |
writeXML(java.io.OutputStream os,
boolean raw)
Write the catalog as an XML document to the specified stream. |
| Methods inherited from class thredds.catalog.InvCatalog |
|---|
check, findDatasetByID, findProperty, findService, getDataset, getDatasets, getExpires, getName, getProperties, getServices, getUriString, getVersion, resolveUri, setName |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InvCatalogImpl(java.lang.String name,
java.lang.String version,
java.net.URI baseURI)
name - : catalog name.version - : catalog version.baseURI - : catalog base URI (external).
public InvCatalogImpl(java.lang.String name,
java.lang.String version,
DateType expires,
java.net.URI baseURI)
name - : catalog name.version - : catalog version.expires - : date/time catalog expires.baseURI - : catalog base URI (external).| Method Detail |
|---|
public void subset(InvDataset ds)
subset in class InvCatalogds - make this top; must be existing dataset in this catalog.public void filter(DatasetFilter filter)
filter in class InvCatalogfilter - remove datasets that dont pass this filter.protected DatasetFilter getDatasetFilter()
public boolean finish()
public void addDatasetByID(InvDatasetImpl ds)
ds - : add this dataset if ds.getID() != nullInvCatalog.findDatasetByID(java.lang.String)public void removeDatasetByID(InvDatasetImpl ds)
ds - public void addDataset(InvDatasetImpl ds)
public boolean removeDataset(InvDatasetImpl ds)
public boolean replaceDataset(InvDatasetImpl remove,
InvDatasetImpl add)
remove - - the dataset element to be removedadd - - the dataset element to be added
public void addProperty(InvProperty p)
public void addService(InvService s)
public void setDataset(InvDatasetImpl ds)
public java.lang.String getCreateFrom()
public void setCreateFrom(java.lang.String createFrom)
public void setBaseURI(java.net.URI baseURI)
public java.net.URI getBaseURI()
public java.lang.String getDTDid()
public void setDTDid(java.lang.String dtdID)
public void setExpires(DateType expiresDate)
expiresDate - a DateType representing the date after which the catlog is no longer valid.public boolean hasFatalError()
public void appendErrorMessage(java.lang.String message,
boolean isInvalid)
message - append this message to logisInvalid - true if this is a fatal error.
public boolean check(java.lang.StringBuffer out,
boolean show)
check in class InvCatalogout - : print errors hereshow - : print messages for each object (debug)
public java.lang.String getLog()
public java.lang.String dump()
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
public void setCatalogConverterToVersion1()
public java.util.List getDatasetRoots()
public void addDatasetRoot(InvProperty root)
public void writeXML(java.io.OutputStream os)
throws java.io.IOException
os - write to this OutputStream
java.io.IOException - on an error.
public void writeXML(java.io.OutputStream os,
boolean raw)
throws java.io.IOException
os - write to this OutputStreamraw - if true, write original (server) version, else write client version
java.io.IOException - on an error.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||