thredds.catalog
Class InvDataset

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

public abstract class InvDataset
extends Object

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

Author:
john caron

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

Field Detail

catalog

protected InvCatalog catalog

parent

protected InvDataset parent

name

protected String name

id

protected String id

datasets

protected List<InvDataset> datasets

harvest

protected boolean harvest

collectionType

protected CollectionType collectionType

access

protected List<InvAccess> access

services

protected List<InvService> services

authorityName

protected String authorityName

dataType

protected FeatureType dataType

defaultService

protected InvService defaultService

dataFormatType

protected DataFormatType dataFormatType

restrictAccess

protected String restrictAccess

docs

protected List<InvDocumentation> docs

metadata

protected List<InvMetadata> metadata

properties

protected List<InvProperty> properties

creators

protected List<ThreddsMetadata.Source> creators

contributors

protected List<ThreddsMetadata.Contributor> contributors

dates

protected List<DateType> dates

keywords

protected List<ThreddsMetadata.Vocab> keywords

projects

protected List<ThreddsMetadata.Vocab> projects

publishers

protected List<ThreddsMetadata.Source> publishers

variables

protected List<ThreddsMetadata.Variables> variables

gc

public ThreddsMetadata.GeospatialCoverage gc

tc

public DateRange tc
Constructor Detail

InvDataset

protected InvDataset(InvDataset parent,
                     String name)
Method Detail

getName

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

Returns:
"human readable" name of the dataset.

getFullName

public 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 String getID()
Get the id of the dataset, or null.

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

getUniqueID

public 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 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 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(String accessURL)
Get access element that matches the given access standard URL. Match on a.getStandardUrlName().

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

getSubsetUrl

public 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 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(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 String getCatalogUrl()
Get URL to this dataset. Dataset must have an ID. Form is catalogURL#DatasetID

Returns:
URL to this dataset.

getDocumentation

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

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

getProperties

public 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 String findProperty(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 List<InvMetadata> getMetadata()
Get the metadata elements for this InvDataset.

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

getMetadata

public 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(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 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 List<ThreddsMetadata.Source> getCreators()
get any Creator metadata

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

getContributors

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

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

getDates

public List<DateType> getDates()
get any DateType metadata

Returns:
List of type DateType, may be empty

getKeywords

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

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

getProjects

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

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

getPublishers

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

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

getHistory

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

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

getProcessing

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

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

getRights

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

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

getSummary

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

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

getVariables

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

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

getVariables

public ThreddsMetadata.Variables getVariables(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 String getDocumentation(String type)
get specific type of documentation

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


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.