public class InvDatasetImpl extends InvDataset
InvDataset
Modifier and Type | Field and Description |
---|---|
protected java.lang.StringBuilder |
log |
protected boolean |
mark |
protected org.jdom2.Element |
ncmlElement |
protected ThreddsMetadata |
tm |
protected ThreddsMetadata |
tmi |
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, variableMapLink, variables
Constructor and Description |
---|
InvDatasetImpl(InvDatasetImpl from)
copy constructor
|
InvDatasetImpl(InvDatasetImpl parent,
java.lang.String name,
FeatureType 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,
FeatureType dataType,
ServiceType stype)
Construct an InvDatasetImpl which refers to a urlPath.
|
Modifier and Type | Method and Description |
---|---|
void |
addAccess(InvAccess a)
Add InvAccess element to this dataset.
|
void |
addAccess(java.util.List<InvAccess> 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.
add services only to catalog
|
protected void |
canonicalize()
Put metadata into canonical form.
|
java.lang.String |
dump() |
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<InvAccess> |
getAccessLocal() |
java.lang.String |
getAlias() |
double |
getDataSize() |
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.jdom2.Element |
getNcmlElement() |
InvDataset |
getParentReal()
Get real parent dataset, no proxies
|
java.lang.String |
getServiceName() |
java.util.List<InvService> |
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)
Look up the User property having the given key
|
int |
hashCode()
Override Object.hashCode() to implement equals.
|
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.List<ThreddsMetadata.Contributor> a) |
void |
setDataFormatType(DataFormatType dataFormatType) |
void |
setDataSize(double dataSize) |
void |
setDataType(FeatureType 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.List<ThreddsMetadata.Vocab> 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.jdom2.Element ncmlElement) |
void |
setParent(InvDatasetImpl parent)
Set the parent dataset.
|
void |
setProjects(java.util.List<ThreddsMetadata.Vocab> a) |
void |
setPublishers(java.util.List<ThreddsMetadata.Source> a) |
void |
setResourceControl(java.lang.String restrictAccess) |
void |
setServiceName(java.lang.String serviceName) |
void |
setServicesLocal(java.util.List<InvService> s)
Set the list of services attached specifically to this dataset.
|
void |
setTimeCoverage(CalendarDateRange tc) |
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,
boolean copyInheritedMetadataFromParents)
Transfer all inheritable metadata from fromDs to the local metadata of this dataset.
|
static void |
writeHtmlDescription(java.lang.StringBuilder buff,
InvDatasetImpl ds,
boolean complete,
boolean isServer,
boolean datasetEvents,
boolean catrefEvents)
|
static void |
writeHtmlDescription(java.lang.StringBuilder buff,
InvDatasetImpl ds,
boolean complete,
boolean isServer,
boolean datasetEvents,
boolean catrefEvents,
boolean resolveRelativeUrls)
Write an Html representation of the given dataset.
|
findAccess, findDatasetByName, findProperty, findService, getAccess, getAccess, getAuthority, getCalendarDateCoverage, getCatalogUrl, getCollectionType, getContributors, getCreators, getDataFormatType, getDatasets, getDataType, getDates, getDocumentation, getDocumentation, getFullName, getGeospatialCoverage, getHistory, getID, getKeywords, getMetadata, getMetadata, getName, getParent, getParentCatalog, getProcessing, getProjects, getProperties, getPublishers, getRestrictAccess, getRights, getServiceDefault, getSubsetUrl, getSummary, getTimeCoverage, getUniqueID, getVariableMapLink, getVariables, getVariables, hasAccess, hasNestedDatasets, isHarvest
protected ThreddsMetadata tm
protected ThreddsMetadata tmi
protected org.jdom2.Element ncmlElement
protected java.lang.StringBuilder log
protected boolean mark
public InvDatasetImpl(InvDatasetImpl parent, java.lang.String name, FeatureType 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() + urlPathpublic InvDatasetImpl(java.lang.String urlPath, FeatureType dataType, ServiceType stype)
urlPath
- : construct URL from this pathdataType
- : data typestype
- : ServiceTypepublic InvDatasetImpl(InvDataset parent, java.lang.String name)
public InvDatasetImpl(InvDatasetImpl from)
from
- copy from herepublic boolean finish()
public void transferMetadata(InvDatasetImpl fromDs, boolean copyInheritedMetadataFromParents)
fromDs
- transfer from hereprotected void canonicalize()
public java.lang.String getAlias()
public void setAlias(java.lang.String alias)
alias
- ID of another Datasetpublic void setCatalog(InvCatalog catalog)
catalog
- the containing catalog for the top level dataset.public InvDataset getParentReal()
public java.lang.String getUrlPath()
public void setUrlPath(java.lang.String urlPath)
urlPath
- the urlPath for this InvDatasetImplpublic void setAuthority(java.lang.String authorityName)
authorityName
- for this Datasetpublic void setCollectionType(CollectionType collectionType)
collectionType
- the collection typepublic void setHarvest(boolean harvest)
harvest
- true if this dataset should be harvested for Digital Librariespublic void setID(java.lang.String id)
id
- unique IDpublic void setName(java.lang.String name)
name
- of the datasetpublic void setParent(InvDatasetImpl parent)
parent
- parent datasetpublic void setGeospatialCoverage(ThreddsMetadata.GeospatialCoverage gc)
public void setTimeCoverage(CalendarDateRange tc)
public void setTimeCoverage(DateRange tc)
public void setDataFormatType(DataFormatType dataFormatType)
public void setDataType(FeatureType 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.List<ThreddsMetadata.Contributor> a)
public void setKeywords(java.util.List<ThreddsMetadata.Vocab> a)
public void setProjects(java.util.List<ThreddsMetadata.Vocab> a)
public void setPublishers(java.util.List<ThreddsMetadata.Source> a)
public void setResourceControl(java.lang.String restrictAccess)
public void addAccess(InvAccess a)
a
- add dthispublic void addAccess(java.util.List<InvAccess> a)
a
- add all of thesepublic java.util.List<InvAccess> getAccessLocal()
public org.jdom2.Element getNcmlElement()
public void setNcmlElement(org.jdom2.Element ncmlElement)
public void addDataset(InvDatasetImpl ds)
ds
- add thispublic void addDataset(int index, InvDatasetImpl ds)
index
- add at this positionds
- add thispublic boolean removeDataset(InvDatasetImpl ds)
ds
- - the dataset element to be removedpublic boolean replaceDataset(InvDatasetImpl remove, InvDatasetImpl add)
remove
- - the dataset element to be removedadd
- - the dataset element to be addedpublic void addDocumentation(InvDocumentation doc)
doc
- add thispublic void addProperty(InvProperty p)
p
- add thispublic void addService(InvService service)
service
- add this service to the datasetpublic void removeService(InvService service)
service
- remove thispublic java.util.List<InvService> getServicesLocal()
public void setServicesLocal(java.util.List<InvService> s)
s
- list of services.public ThreddsMetadata getLocalMetadata()
public void setLocalMetadata(ThreddsMetadata tm)
public ThreddsMetadata getLocalMetadataInheritable()
public boolean removeLocalMetadata(InvMetadata metadata)
metadata
- remove thispublic java.lang.String getServiceName()
protected boolean getMark()
protected void setMark(boolean mark)
public java.lang.Object getUserProperty(java.lang.Object key)
key
- property keypublic 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.StringBuilder buff, InvDatasetImpl ds, boolean complete, boolean isServer, boolean datasetEvents, boolean catrefEvents)
writeHtmlDescription(StringBuilder buff, InvDatasetImpl ds, boolean complete, boolean isServer, boolean datasetEvents, boolean catrefEvents, boolean resolveRelativeUrls)
buff
- ads
- acomplete
- aisServer
- adatasetEvents
- acatrefEvents
- apublic static void writeHtmlDescription(java.lang.StringBuilder buff, InvDatasetImpl ds, boolean complete, boolean isServer, boolean datasetEvents, boolean catrefEvents, boolean resolveRelativeUrls)
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 URLSpublic static java.lang.String resolve(InvDataset ds, java.lang.String href)
ds
- use ds parent catalog, if it existshref
- URL to resolvepublic java.lang.String dump()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object