|
||||||||||
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
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.StringBuilder 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()
|
java.lang.String |
getCreateFrom()
String describing how the catalog was created, for debugging. |
java.util.List<InvProperty> |
getDatasetRoots()
Get dataset roots. |
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 |
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 |
Methods inherited from class java.lang.Object |
---|
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 InvCatalog
ds
- make this top; must be existing dataset in this catalog.public void filter(DatasetFilter filter)
filter
in class InvCatalog
filter
- remove datasets that dont pass this filter.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 java.lang.String getCreateFrom()
public void setCreateFrom(java.lang.String createFrom)
createFrom
- how the catalog was created, for debuggingpublic void setBaseURI(java.net.URI baseURI)
baseURI
- set to thispublic java.net.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(java.lang.String message, boolean isInvalid)
message
- append this message to logisInvalid
- true if this is a fatal error.public boolean check(java.lang.StringBuilder out, boolean show)
check
in class InvCatalog
out
- : 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)
l
- the listenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
l
- the listenerpublic void setCatalogConverterToVersion1()
public java.util.List<InvProperty> getDatasetRoots()
public void addDatasetRoot(InvProperty root)
root
- add a dataset rootpublic 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.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |