|
|||||||||
| 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(String name,
String version,
DateType expires,
URI baseURI)
Construct an InvCatalog. |
|
InvCatalogImpl(String name,
String version,
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(DataRootConfig root)
Add Dataset Root, key = path, value = location. |
void |
addProperty(InvProperty p)
Add Property (1.0) |
void |
addPropertyChangeListener(PropertyChangeListener l)
Add a PropertyChangeEvent Listener. |
void |
addService(InvService s)
Add Service (1.0) |
void |
appendErrorMessage(String message,
boolean isInvalid)
Append an error message to the message log. |
boolean |
check(StringBuilder out,
boolean show)
Check internal data structures. |
String |
dump()
Debugging: dump entire data structure. |
boolean |
equals(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. |
URI |
getBaseURI()
|
String |
getCreateFrom()
String describing how the catalog was created, for debugging. |
protected DatasetFilter |
getDatasetFilter()
|
List<DataRootConfig> |
getDatasetRoots()
Get dataset roots. |
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 |
isStatic()
|
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(PropertyChangeListener l)
Remove a PropertyChangeEvent Listener. |
boolean |
replaceDataset(InvDatasetImpl remove,
InvDatasetImpl add)
Replace the given dataset if it is a nested dataset. |
void |
setBaseURI(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(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 |
setExpires(DateType expiresDate)
Set the expires date after which the catalog is no longer valid. |
void |
setStatic(boolean aStatic)
|
void |
subset(InvDataset ds)
Deprecated. in favor of thredds.catalog.util.DeepCopyUtils.subsetCatalogOnDataset |
void |
writeXML(OutputStream os)
Write the catalog as an XML document to the specified stream. |
void |
writeXML(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 |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InvCatalogImpl(String name,
String version,
URI baseURI)
name - : catalog name.version - : catalog version.baseURI - : catalog base URI (external).
public InvCatalogImpl(String name,
String version,
DateType expires,
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 - Remove this dataset from the hashpublic void addDataset(InvDatasetImpl ds)
ds - add this datasetpublic boolean removeDataset(InvDatasetImpl ds)
ds - remove this dataset
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)
p - add this propertypublic void addService(InvService s)
s - add this servicepublic void setDataset(InvDatasetImpl ds)
public String getCreateFrom()
public void setCreateFrom(String createFrom)
createFrom - how the catalog was created, for debuggingpublic void setBaseURI(URI baseURI)
baseURI - set to thispublic URI getBaseURI()
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(String message,
boolean isInvalid)
message - append this message to logisInvalid - true if this is a fatal error.
public boolean check(StringBuilder out,
boolean show)
check in class InvCatalogout - : print errors hereshow - : print messages for each object (debug)
public String getLog()
public String dump()
public void addPropertyChangeListener(PropertyChangeListener l)
l - the listenerpublic void removePropertyChangeListener(PropertyChangeListener l)
l - the listenerpublic void setCatalogConverterToVersion1()
public List<DataRootConfig> getDatasetRoots()
public void addDatasetRoot(DataRootConfig root)
root - add a dataset root
public void writeXML(OutputStream os)
throws IOException
os - write to this OutputStream
IOException - on an error.
public void writeXML(OutputStream os,
boolean raw)
throws IOException
os - write to this OutputStreamraw - if true, write original (server) version, else write client version
IOException - on an error.public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean isStatic()
public void setStatic(boolean aStatic)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||