|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectthredds.catalog.InvDataset
thredds.catalog.InvDatasetImpl
public class InvDatasetImpl
Concrete implementation of a thredds Dataset, for reading and writing from XML.
InvDataset| Field Summary | |
|---|---|
protected java.lang.StringBuffer |
log
|
protected boolean |
mark
|
protected org.jdom.Element |
ncmlElement
|
protected ThreddsMetadata |
tm
|
protected ThreddsMetadata |
tmi
|
protected ThreddsMetadata |
tmi6
|
| Fields inherited from class thredds.catalog.InvDataset |
|---|
access, authorityName, catalog, collectionType, contributors, creators, dataFormatType, datasets, dataType, dates, defaultService, docs, gc, harvest, id, keywords, metadata, name, parent, projects, properties, publishers, restrictAccess, services, tc, variables |
| Constructor Summary | |
|---|---|
InvDatasetImpl(InvDatasetImpl from)
copy constructor |
|
InvDatasetImpl(InvDatasetImpl parent,
java.lang.String name,
DataType dataType,
java.lang.String serviceName,
java.lang.String urlPath)
Constructor from Catalog XML info. |
|
InvDatasetImpl(InvDataset parent,
java.lang.String name)
|
|
InvDatasetImpl(java.lang.String urlPath,
DataType dataType,
ServiceType stype)
Construct an InvDatasetImpl which refers to a urlPath. |
|
| Method Summary | |
|---|---|
void |
addAccess(InvAccess a)
Add InvAccess element to this dataset. |
void |
addAccess(java.util.List a)
Add a list of InvAccess elements to this dataset. |
void |
addDataset(int index,
InvDatasetImpl ds)
Add a nested dataset at the location indicated by index. |
void |
addDataset(InvDatasetImpl ds)
Add a nested dataset. |
void |
addDocumentation(InvDocumentation doc)
Add documentation element to this dataset. |
void |
addProperty(InvProperty p)
Add a property to this dataset |
void |
addService(InvService service)
Deprecated. put services in catalog |
protected void |
canonicalize()
Put metadata into canonical form. |
java.lang.String |
dump()
debugging info |
boolean |
equals(java.lang.Object o)
InvDatasetImpl elements with same values are equal. |
boolean |
finish()
Finish constructing after all elements have been added. |
java.util.List |
getAccessLocal()
Get the non-expanded access elements. |
java.lang.String |
getAlias()
Get alias for this Dataset, if it exists |
ThreddsMetadata |
getCat6Metadata()
local metadata that should be inherited by this dataset's children. |
double |
getDataSize()
|
java.util.List |
getDocumentationLinks()
get Documentation that are xlinks |
DateType |
getLastModifiedDate()
|
ThreddsMetadata |
getLocalMetadata()
Get the metadata stored in this dataset element. |
ThreddsMetadata |
getLocalMetadataInheritable()
local metadata that should be inherited by this dataset's children. |
protected boolean |
getMark()
Filtering |
org.jdom.Element |
getNcmlElement()
Get ncml element if it exists, else return null. |
InvDataset |
getParentReal()
Get real parent dataset, no proxies |
java.lang.String |
getServiceName()
|
java.util.List |
getServicesLocal()
Get services attached specifically to this dataset. |
java.lang.String |
getUrlPath()
Get urlPath for this Dataset |
java.lang.Object |
getUserProperty(java.lang.Object key)
User properties |
int |
hashCode()
Override Object.hashCode() to implement equals. |
static void |
main(java.lang.String[] args)
test |
boolean |
removeDataset(InvDatasetImpl ds)
Remove the given dataset element from this dataset if it is in the dataset. |
boolean |
removeLocalMetadata(InvMetadata metadata)
Remove the given InvMetadata from the set of metadata local to this dataset. |
void |
removeService(InvService service)
Deprecated. put services in catalog |
boolean |
replaceDataset(InvDatasetImpl remove,
InvDatasetImpl add)
Replace the given dataset if it is a nesetd dataset. |
static java.lang.String |
resolve(InvDataset ds,
java.lang.String href)
resolve reletive URLS against the catalog URL. |
void |
setAlias(java.lang.String alias)
Set alias for this Dataset |
void |
setAuthority(java.lang.String authorityName)
Set authorityName for this Dataset |
void |
setCatalog(InvCatalog catalog)
Set the containing catalog; use only for top level dataset. |
void |
setCollectionType(CollectionType collectionType)
Set collectionType |
void |
setContributors(java.util.ArrayList a)
|
void |
setDataFormatType(DataFormatType dataFormatType)
|
void |
setDataSize(double dataSize)
|
void |
setDataType(DataType dataType)
|
void |
setGeospatialCoverage(ThreddsMetadata.GeospatialCoverage gc)
|
void |
setHarvest(boolean harvest)
Set harvest |
void |
setID(java.lang.String id)
Set the ID for this Dataset |
void |
setKeywords(java.util.ArrayList a)
|
void |
setLastModifiedDate(java.util.Date lastModDate)
|
void |
setLastModifiedDate(DateType lastModDate)
|
void |
setLocalMetadata(ThreddsMetadata tm)
|
protected void |
setMark(boolean mark)
|
void |
setName(java.lang.String name)
Set name of this Dataset. |
void |
setNcmlElement(org.jdom.Element ncmlElement)
|
void |
setParent(InvDatasetImpl parent)
Set the parent dataset. |
void |
setProjects(java.util.ArrayList a)
|
void |
setPublishers(java.util.ArrayList a)
|
void |
setResourceControl(java.lang.String restrictAccess)
|
void |
setServiceName(java.lang.String serviceName)
|
void |
setServicesLocal(java.util.ArrayList s)
Set the list of services attached specifically to this dataset. |
void |
setTimeCoverage(DateRange tc)
|
void |
setUrlPath(java.lang.String urlPath)
Set the urlPath for this InvDatasetImpl |
void |
setUserProperty(java.lang.Object key,
java.lang.Object value)
|
java.lang.String |
toString()
|
void |
transferMetadata(InvDatasetImpl fromDs)
Transfer all inheritable metadata from fromDs to the local metadata of this dataset. |
static void |
writeHtmlDescription(java.lang.StringBuffer buff,
InvDatasetImpl ds,
boolean complete,
boolean isServer,
boolean datasetEvents,
boolean catrefEvents)
Write an Html representation of the given dataset. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected ThreddsMetadata tm
protected ThreddsMetadata tmi
protected ThreddsMetadata tmi6
protected org.jdom.Element ncmlElement
protected java.lang.StringBuffer log
protected boolean mark
| Constructor Detail |
|---|
public InvDatasetImpl(InvDatasetImpl parent,
java.lang.String name,
DataType dataType,
java.lang.String serviceName,
java.lang.String urlPath)
parent - : parent datasetname - : display name of datasetdataType - : DataType name (may be null)serviceName - : default service (may be null)urlPath - : URL = server.getURLbase() + urlPath
public InvDatasetImpl(java.lang.String urlPath,
DataType dataType,
ServiceType stype)
urlPath - : construct URL from this pathdataType - : data typestype - : ServiceType
public InvDatasetImpl(InvDataset parent,
java.lang.String name)
public InvDatasetImpl(InvDatasetImpl from)
| Method Detail |
|---|
public boolean finish()
public void transferMetadata(InvDatasetImpl fromDs)
fromDs - transfer from hereprotected void canonicalize()
public java.lang.String getAlias()
public void setAlias(java.lang.String alias)
public void setCatalog(InvCatalog catalog)
public InvDataset getParentReal()
public java.lang.String getUrlPath()
public void setUrlPath(java.lang.String urlPath)
public void setAuthority(java.lang.String authorityName)
public void setCollectionType(CollectionType collectionType)
public void setHarvest(boolean harvest)
public void setID(java.lang.String id)
public void setName(java.lang.String name)
public void setParent(InvDatasetImpl parent)
public void setGeospatialCoverage(ThreddsMetadata.GeospatialCoverage gc)
public void setTimeCoverage(DateRange tc)
public void setDataFormatType(DataFormatType dataFormatType)
public void setDataType(DataType dataType)
public double getDataSize()
public void setDataSize(double dataSize)
public DateType getLastModifiedDate()
public void setLastModifiedDate(DateType lastModDate)
public void setLastModifiedDate(java.util.Date lastModDate)
public void setServiceName(java.lang.String serviceName)
public void setContributors(java.util.ArrayList a)
public void setKeywords(java.util.ArrayList a)
public void setProjects(java.util.ArrayList a)
public void setPublishers(java.util.ArrayList a)
public void setResourceControl(java.lang.String restrictAccess)
public void addAccess(InvAccess a)
public void addAccess(java.util.List a)
public java.util.List getAccessLocal()
public org.jdom.Element getNcmlElement()
public void setNcmlElement(org.jdom.Element ncmlElement)
public void addDataset(InvDatasetImpl ds)
public void addDataset(int index,
InvDatasetImpl ds)
public boolean removeDataset(InvDatasetImpl ds)
ds - - the dataset element to be removed
public boolean replaceDataset(InvDatasetImpl remove,
InvDatasetImpl add)
remove - - the dataset element to be removedadd - - the dataset element to be added
public void addDocumentation(InvDocumentation doc)
public void addProperty(InvProperty p)
public void addService(InvService service)
public void removeService(InvService service)
public java.util.List getServicesLocal()
public void setServicesLocal(java.util.ArrayList s)
s - list of services.public ThreddsMetadata getLocalMetadata()
public void setLocalMetadata(ThreddsMetadata tm)
public ThreddsMetadata getLocalMetadataInheritable()
public ThreddsMetadata getCat6Metadata()
public boolean removeLocalMetadata(InvMetadata metadata)
metadata -
public java.lang.String getServiceName()
public java.util.List getDocumentationLinks()
protected boolean getMark()
protected void setMark(boolean mark)
public java.lang.Object getUserProperty(java.lang.Object key)
public void setUserProperty(java.lang.Object key,
java.lang.Object value)
public java.lang.String toString()
toString in class java.lang.Object
public static void writeHtmlDescription(java.lang.StringBuffer buff,
InvDatasetImpl ds,
boolean complete,
boolean isServer,
boolean datasetEvents,
boolean catrefEvents)
With datasetEvents, catrefEvents = true, this is used to construct an HTML page on the client (eg using HtmlPage); the client then detects URL clicks and processes.
With datasetEvents, catrefEvents = false, this is used to construct an HTML page on the server. (eg using HtmlPage); the client then detects URL clicks and processes.
buff - put HTML here.ds - the dataset.complete - if true, add HTML header and ender so its a complete, valid HTML page.isServer - if true, then we are in the thredds data server, so do the following: datasetEvents - if true, prepend "dataset:" to any dataset access URLScatrefEvents - if true, prepend "catref:" to any catref URLS
public static java.lang.String resolve(InvDataset ds,
java.lang.String href)
ds - use ds parent catalog, if it existshref - URL to resolve
public java.lang.String dump()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||