thredds.catalog
Class InvDataset

java.lang.Object
  extended by thredds.catalog.InvDataset
Direct Known Subclasses:
InvDatasetImpl

public abstract class InvDataset
extends java.lang.Object

Public interface to a thredds dataset, basic abstraction for data.

Author:
john caron

Field Summary
 ThreddsMetadata.GeospatialCoverage gc
           
 DateRange tc
           
 
Method Summary
 InvAccess findAccess(java.lang.String accessURL)
          Get access element that matches the given access standard URL.
 InvDatasetImpl findDatasetByName(java.lang.String name)
          Find an immediate child dataset by its name.
 java.lang.String findProperty(java.lang.String name)
          Find named property.
 InvService findService(java.lang.String name)
          Find the named service declared in this dataset or one of its parents.
 java.util.List<InvAccess> getAccess()
          Get all access elements for this dataset.
 InvAccess getAccess(ServiceType type)
          Get access element of the specified service type for this dataset.
 java.lang.String getAuthority()
          Get authority for this Dataset, may be null.
 java.lang.String getCatalogUrl()
          Get URL to this dataset.
 CollectionType getCollectionType()
          Get collectionType
 java.util.List<ThreddsMetadata.Contributor> getContributors()
          get Contributor metadata
 java.util.List<ThreddsMetadata.Source> getCreators()
          get any Creator metadata
 DataFormatType getDataFormatType()
          Get the DataFormatType (which may be inherited from parent), or null .
 java.util.List<InvDataset> getDatasets()
          Get a list of all the nested datasets.
 FeatureType getDataType()
          Get the DataType (which may be inherited from parent), or null .
 java.util.List<DateType> getDates()
          get any DateType metadata
 java.util.List<InvDocumentation> getDocumentation()
          Get list of documentation elements for this dataset.
 java.lang.String getDocumentation(java.lang.String type)
          get specific type of documentation
 java.lang.String getFullName()
          Get the full, heirarchical name of the dataset, which has all parent collection names.
 ThreddsMetadata.GeospatialCoverage getGeospatialCoverage()
          get geospatial coverage
 java.lang.String getHistory()
          get specific type of documentation = history
 java.lang.String getID()
          Get the id of the dataset, or null.
 java.util.List<ThreddsMetadata.Vocab> getKeywords()
          get any Keyword metadata
 java.util.List<InvMetadata> getMetadata()
          Get the metadata elements for this InvDataset.
 java.util.List<InvMetadata> getMetadata(MetadataType want)
          Get the metadata elements of the specified type.
 java.lang.String getName()
          Get the "human readable" name of the dataset.
 InvDataset getParent()
          Get parent dataset.
 InvCatalog getParentCatalog()
          Get containing catalog.
 java.lang.String getProcessing()
          get specific type of documentation = processing_level
 java.util.List<ThreddsMetadata.Vocab> getProjects()
          get Projects metadata
 java.util.List<InvProperty> getProperties()
          Get all properties for this dataset.
 java.util.List<ThreddsMetadata.Source> getPublishers()
          get Publisher metadata
 java.lang.String getRestrictAccess()
          Return the resource control value which indicates that only users with proper permission can access this resource.
 java.lang.String getRights()
          get specific type of documentation = rights
 InvService getServiceDefault()
          Find the default service for this dataset and its children.
 java.lang.String getSubsetUrl()
          Return the query fragment referencing this dataset, ie "catalog=catalog.xml&dataset=datasetID"
 java.lang.String getSummary()
          get specific type of documentation = summary
 DateRange getTimeCoverage()
          get time coverage
 java.lang.String getUniqueID()
          If this dataset has an authority and an ID, then the concatenation of them is the globally unique ID.
 java.util.List<ThreddsMetadata.Variables> getVariables()
          get Variable metadata
 ThreddsMetadata.Variables getVariables(java.lang.String vocab)
          get Variables from the specified vocabulary
 boolean hasAccess()
          If this dataset has access elements.
 boolean hasNestedDatasets()
          If this dataset has nested datasets.
 boolean isHarvest()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gc

public ThreddsMetadata.GeospatialCoverage gc

tc

public DateRange tc
Method Detail

getName

public java.lang.String getName()
Get the "human readable" name of the dataset.

Returns:
"human readable" name of the dataset.

getFullName

public java.lang.String getFullName()
Get the full, heirarchical name of the dataset, which has all parent collection names.

Returns:
full, heirarchical name of the dataset, which has all parent collection names.

getCollectionType

public CollectionType getCollectionType()
Get collectionType

Returns:
collectionType, or null

isHarvest

public boolean isHarvest()
Returns:
if harvest is true

getID

public java.lang.String getID()
Get the id of the dataset, or null.

Returns:
the id of the dataset, or null if none.

getUniqueID

public java.lang.String getUniqueID()
If this dataset has an authority and an ID, then the concatenation of them is the globally unique ID.

Returns:
globally unique ID, or null if missing authority or ID.

getAuthority

public java.lang.String getAuthority()
Get authority for this Dataset, may be null.

Returns:
authority for this Dataset, or null.

getDataType

public FeatureType getDataType()
Get the DataType (which may be inherited from parent), or null .

Returns:
the DataType or null

getDataFormatType

public DataFormatType getDataFormatType()
Get the DataFormatType (which may be inherited from parent), or null .

Returns:
the DataFormatType or null .

hasAccess

public boolean hasAccess()
If this dataset has access elements.

Returns:
true if has access elements.

getAccess

public java.util.List<InvAccess> getAccess()
Get all access elements for this dataset. This list will expand any compound services.

Returns:
List of InvAccess objects. List may not be null, may be empty.

getAccess

public InvAccess getAccess(ServiceType type)
Get access element of the specified service type for this dataset. If more than one, get the first one.

Parameters:
type - find this ServiceType
Returns:
InvAccess or null if there is not one.

findAccess

public InvAccess findAccess(java.lang.String accessURL)
Get access element that matches the given access standard URL. Mathc on a.getStandardUrlName().

Parameters:
accessURL - find theis access URL string
Returns:
InvAccess or null if no match.

getSubsetUrl

public java.lang.String getSubsetUrl()
Return the query fragment referencing this dataset, ie "catalog=catalog.xml&dataset=datasetID"

Returns:
the query fragment for this dataset

hasNestedDatasets

public boolean hasNestedDatasets()
If this dataset has nested datasets.

Returns:
true if has nested datasets.

getDatasets

public java.util.List<InvDataset> getDatasets()
Get a list of all the nested datasets.

Returns:
list of objects of type InvDataset. May be empty, not null.

findDatasetByName

public InvDatasetImpl findDatasetByName(java.lang.String name)
Find an immediate child dataset by its name.

Parameters:
name - match on this name
Returns:
dataset if found or null if not exist.

getParent

public InvDataset getParent()
Get parent dataset.

Returns:
parent dataset. If top dataset, return null.

getParentCatalog

public InvCatalog getParentCatalog()
Get containing catalog.

Returns:
containing catalog.

getCatalogUrl

public java.lang.String getCatalogUrl()
Get URL to this dataset. Dataset must have an ID. Form is catalogURL#DatasetID

Returns:
URL to this dataset.

getDocumentation

public java.util.List<InvDocumentation> getDocumentation()
Get list of documentation elements for this dataset.

Returns:
list of InvDocumentation objects. May be empty, not null.

getProperties

public java.util.List<InvProperty> getProperties()
Get all properties for this dataset. These may have been specified in the dataset or an enclosing parent element.

Returns:
List of type InvProperty. May be empty, not null.

findProperty

public java.lang.String findProperty(java.lang.String name)
Find named property. This may have been specified in the dataset or an enclosing parent element.

Parameters:
name - match on this name
Returns:
string value of property or null if not exist.

getMetadata

public java.util.List<InvMetadata> getMetadata()
Get the metadata elements for this InvDataset.

Returns:
List of InvMetadata objects. List may be empty but not null.

getMetadata

public java.util.List<InvMetadata> getMetadata(MetadataType want)
Get the metadata elements of the specified type.

Parameters:
want - find this metadata type
Returns:
List of InvMetadata objects. List may be empty but not null.

findService

public InvService findService(java.lang.String name)
Find the named service declared in this dataset or one of its parents.

Parameters:
name - match this name
Returns:
first service that matches the given name, or null if none found.

getServiceDefault

public InvService getServiceDefault()
Find the default service for this dataset and its children. If not declared in this dataset, search in parents. This is the default for any nested datasets or access elements.

Returns:
default service, or null

getRestrictAccess

public java.lang.String getRestrictAccess()
Return the resource control value which indicates that only users with proper permission can access this resource.

??? Not sure if the value indicates anything or just set or not set.

Returns:
the resource control value for this dataset (inherited from ancestor datasets).

getCreators

public java.util.List<ThreddsMetadata.Source> getCreators()
get any Creator metadata

Returns:
List of type ThreddsMetadata.Source, may be empty

getContributors

public java.util.List<ThreddsMetadata.Contributor> getContributors()
get Contributor metadata

Returns:
List of type ThreddsMetadata.Contributor, may be empty

getDates

public java.util.List<DateType> getDates()
get any DateType metadata

Returns:
List of type DateType, may be empty

getKeywords

public java.util.List<ThreddsMetadata.Vocab> getKeywords()
get any Keyword metadata

Returns:
List of type ThreddsMetadata.Vocab, may be empty

getProjects

public java.util.List<ThreddsMetadata.Vocab> getProjects()
get Projects metadata

Returns:
List of type ThreddsMetadata.Vocab, may be empty

getPublishers

public java.util.List<ThreddsMetadata.Source> getPublishers()
get Publisher metadata

Returns:
List of type ThreddsMetadata.Source, may be empty

getHistory

public java.lang.String getHistory()
get specific type of documentation = history

Returns:
contents of the "history" documentation, or null

getProcessing

public java.lang.String getProcessing()
get specific type of documentation = processing_level

Returns:
contents of the "processing_level" documentation, or null

getRights

public java.lang.String getRights()
get specific type of documentation = rights

Returns:
contents of the "rights" documentation, or null

getSummary

public java.lang.String getSummary()
get specific type of documentation = summary

Returns:
contents of the "summary" documentation, or null

getVariables

public java.util.List<ThreddsMetadata.Variables> getVariables()
get Variable metadata

Returns:
List of type ThreddsMetadata.Variables, may be empty

getVariables

public ThreddsMetadata.Variables getVariables(java.lang.String vocab)
get Variables from the specified vocabulary

Parameters:
vocab - look for this vocabulary
Returns:
Variables from the specified vocabulary, may be null

getGeospatialCoverage

public ThreddsMetadata.GeospatialCoverage getGeospatialCoverage()
get geospatial coverage

Returns:
geospatial coverage, or null if none

getTimeCoverage

public DateRange getTimeCoverage()
get time coverage

Returns:
time coverage, or null if none

getDocumentation

public java.lang.String getDocumentation(java.lang.String type)
get specific type of documentation

Parameters:
type - find this type of documentation
Returns:
contents of documentation of specified type