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.

Version:
$Revision: 48 $ $Date: 2006-07-12 16:15:40Z $
Author:
john caron

Field Summary
protected  java.util.ArrayList access
           
protected  java.lang.String authorityName
           
protected  InvCatalog catalog
           
protected  CollectionType collectionType
           
protected  java.util.ArrayList contributors
           
protected  java.util.ArrayList creators
           
protected  DataFormatType dataFormatType
           
protected  java.util.ArrayList datasets
           
protected  DataType dataType
           
protected  java.util.ArrayList dates
           
protected  InvService defaultService
           
protected  java.util.ArrayList docs
           
 ThreddsMetadata.GeospatialCoverage gc
           
protected  boolean harvest
           
protected  java.lang.String id
           
protected  java.util.ArrayList keywords
           
protected  java.util.ArrayList metadata
           
protected  java.lang.String name
           
protected  InvDataset parent
           
protected  java.util.ArrayList projects
           
protected  java.util.ArrayList properties
           
protected  java.util.ArrayList publishers
           
protected  java.lang.String restrictAccess
           
protected  java.util.ArrayList services
           
 DateRange tc
           
protected  java.util.ArrayList variables
           
 
Constructor Summary
protected InvDataset(InvDataset parent, java.lang.String name)
           
 
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 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 getContributors()
          get List of type ThreddsMetadata.Contributors
 java.util.List getCreators()
          get List of type ThreddsMetadata.Source
 DataFormatType getDataFormatType()
          Get the DataFormatType (which may be inherited from parent), or null .
 java.util.List getDatasets()
          Get a list of all the nested datasets.
 DataType getDataType()
          Get the DataType (which may be inherited from parent), or null .
 java.util.List getDates()
          get List of type DateType
 java.util.List 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, or null if none
 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 getKeywords()
          get List of type ThreddsMetadata.Vocab
 java.util.List getMetadata()
          Get the metadata elements for this InvDataset.
 java.util.List 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 getProjects()
          get List of type ThreddsMetadata.Vocab
 java.util.List getProperties()
          Get all properties for this dataset.
 java.util.List getPublishers()
          get List of type ThreddsMetadata.Source
 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, or null if none
 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 getVariables()
          get List of type ThreddsMetadata.Variables
 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()
          Get harvest
 
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 java.lang.String name

id

protected java.lang.String id

datasets

protected java.util.ArrayList datasets

harvest

protected boolean harvest

collectionType

protected CollectionType collectionType

access

protected java.util.ArrayList access

services

protected java.util.ArrayList services

authorityName

protected java.lang.String authorityName

dataType

protected DataType dataType

defaultService

protected InvService defaultService

dataFormatType

protected DataFormatType dataFormatType

restrictAccess

protected java.lang.String restrictAccess

docs

protected java.util.ArrayList docs

metadata

protected java.util.ArrayList metadata

properties

protected java.util.ArrayList properties

creators

protected java.util.ArrayList creators

contributors

protected java.util.ArrayList contributors

dates

protected java.util.ArrayList dates

keywords

protected java.util.ArrayList keywords

projects

protected java.util.ArrayList projects

publishers

protected java.util.ArrayList publishers

variables

protected java.util.ArrayList variables

gc

public ThreddsMetadata.GeospatialCoverage gc

tc

public DateRange tc
Constructor Detail

InvDataset

protected InvDataset(InvDataset parent,
                     java.lang.String name)
Method Detail

getName

public java.lang.String getName()
Get the "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.


getCollectionType

public CollectionType getCollectionType()
Get collectionType


isHarvest

public boolean isHarvest()
Get harvest


getID

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


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.


getDataType

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


getDataFormatType

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


hasAccess

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

Returns:
true if has access elements.

getAccess

public java.util.List 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.

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.

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"


hasNestedDatasets

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

Returns:
true if has nested datasets.

getDatasets

public java.util.List 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.

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 getDocumentation()
Get list of documentation elements for this dataset.

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

getProperties

public java.util.List 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.

Returns:
string value of property or null if not exist.

getMetadata

public java.util.List 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 getMetadata(MetadataType want)
Get the metadata elements of the specified 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.

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.


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 getCreators()
get List of type ThreddsMetadata.Source


getContributors

public java.util.List getContributors()
get List of type ThreddsMetadata.Contributors


getDates

public java.util.List getDates()
get List of type DateType


getKeywords

public java.util.List getKeywords()
get List of type ThreddsMetadata.Vocab


getProjects

public java.util.List getProjects()
get List of type ThreddsMetadata.Vocab


getPublishers

public java.util.List getPublishers()
get List of type ThreddsMetadata.Source


getHistory

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


getProcessing

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


getRights

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


getSummary

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


getVariables

public java.util.List getVariables()
get List of type ThreddsMetadata.Variables


getVariables

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


getGeospatialCoverage

public ThreddsMetadata.GeospatialCoverage getGeospatialCoverage()
get geospatial coverage, or null if none


getTimeCoverage

public DateRange getTimeCoverage()
get time coverage, or null if none


getDocumentation

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