thredds.catalog
Class ThreddsMetadata

java.lang.Object
  extended by thredds.catalog.ThreddsMetadata

public class ThreddsMetadata
extends java.lang.Object

Metadata for "enhanced catalogs", type THREDDS.

Version:
$Id: ThreddsMetadata.java,v 1.29 2006/04/20 22:13:15 caron Exp $
Author:
John Caron

Nested Class Summary
static class ThreddsMetadata.Contributor
          Implements Contributor type.
static class ThreddsMetadata.GeospatialCoverage
          Implements GeospatialCoverage type.
static class ThreddsMetadata.Range
          Implements spatialRange type.
static class ThreddsMetadata.Source
          Implements Source type, used by publisher and creator elements.
static class ThreddsMetadata.Variable
          Implements Variable type.
static class ThreddsMetadata.Variables
          Implements Variables type.
static class ThreddsMetadata.Vocab
          Implements Vocab type, just text with an optional "vocabulary" attribute.
 
Constructor Summary
ThreddsMetadata(boolean inherited)
           
 
Method Summary
 void add(ThreddsMetadata tmd, boolean includeInherited)
          Add all the content from another ThreddsMetadata
 void addContributor(ThreddsMetadata.Contributor c)
          Add a contributor
 void addCreator(ThreddsMetadata.Source c)
          Add a creator
 void addDate(thredds.datatype.DateType d)
          Add a date
 void addDocumentation(InvDocumentation d)
          Add a documentation
 void addDocumentation(java.lang.String type, java.lang.String s)
          set specified type of documentation
 void addKeyword(ThreddsMetadata.Vocab v)
          Add a keyword
 void addMetadata(InvMetadata m)
          Add InvMetadata
 void addProject(ThreddsMetadata.Vocab v)
          Add a project
 void addProperty(InvProperty p)
          Add a property
 void addPublisher(ThreddsMetadata.Source p)
          Add a publisher
 void addVariables(ThreddsMetadata.Variables vs)
          Add variables
 boolean equals(java.lang.Object o)
           
 java.lang.String getAuthority()
          Get authority
 java.util.ArrayList getContributors()
          Get list of contributors (type Contributor); may be empty, not null.
 java.util.ArrayList getCreators()
          Get list of creators (type Source); may be empty, not null.
 DataFormatType getDataFormatType()
          Get dataType
 double getDataSize()
          Get the data size in bytes.
 DataType getDataType()
          Get dataType
 java.util.List getDates()
          Get list of DateType; may be empty, not null.
 java.util.List getDocumentation()
          Get list of InvDocumentation; may be empty, not null.
 java.lang.String getDocumentation(java.lang.String type)
          get specific type of documentation
 java.util.List getDocumentationLinks()
          get Documentation that are xlinks
 ThreddsMetadata.GeospatialCoverage getGeospatialCoverage()
          get GeospatialCoverage element
 java.lang.String getHistory()
          get specific type of documentation = history
 java.util.ArrayList getKeywords()
          Get list of contributors; may be empty, not null.
 java.util.List getMetadata()
          Get list of InvMetadata; may be empty, not null.
 java.lang.String getProcessing()
          get specific type of documentation = processing_level
 java.util.ArrayList getProjects()
          Get list of projects (type Vocab); may be empty, not null.
 java.util.List getProperties()
          Get list of contributors; may be empty, not null.
 java.util.List getPublishers()
          Get list of publishers (type Source); may be empty, not null.
 java.lang.String getRights()
          get specific type of documentation = rights
 java.lang.String getServiceName()
          Get serviceName
 java.lang.String getSummary()
          get specific type of documentation = summary
 thredds.datatype.DateRange getTimeCoverage()
          get TimeCoverage element
 java.util.List getVariables()
          Get list of Variables; may be empty, not null.
 boolean hasDataSize()
           
 int hashCode()
           
 boolean isInherited()
          Get inherited
static void main(java.lang.String[] args)
           
 void removeDocumentation(java.lang.String type)
          remove all instances of specified type of documentation
 void removeMetadata(InvMetadata m)
          remove an InvMetadata element from list, using equals() to locate it.
 void setAuthority(java.lang.String authorityName)
          Set authority
 void setContributors(java.util.ArrayList contributors)
          Set list of contributors (type Contributor); may be empty, not null.
 void setCreators(java.util.ArrayList creators)
          Set list of creators (type Source); may be empty, not null.
 void setDataFormatType(DataFormatType dataFormat)
          Set dataType
 void setDataSize(double size)
          Set size (bytes)
 void setDataType(DataType dataType)
          Set dataType
 void setDocumentationLinks(java.util.List newdocs)
          set the list of Documentation that are xlinks
 void setGeospatialCoverage(ThreddsMetadata.GeospatialCoverage gc)
          set GeospatialCoverage element
 void setHistory(java.lang.String history)
          set specific type of documentation = history
 void setInherited(boolean inherited)
          Set inherited
 void setKeywords(java.util.ArrayList keywords)
          Set list of contributors; may be empty, not null.
 void setProcessing(java.lang.String processing)
          set specific type of documentation = processing_level
 void setProjects(java.util.ArrayList projects)
          Set list of projects (type Vocab); may be empty, not null.
 void setPublishers(java.util.ArrayList publishers)
          Set list of publishers (type Source); may be empty, not null.
 void setRights(java.lang.String rights)
          set specific type of documentation = rights
 void setServiceName(java.lang.String serviceName)
          Set serviceName
 void setSummary(java.lang.String summary)
          set specific type of documentation = summary
 void setTimeCoverage(thredds.datatype.DateRange tc)
          set TimeCoverage element
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreddsMetadata

public ThreddsMetadata(boolean inherited)
Method Detail

add

public void add(ThreddsMetadata tmd,
                boolean includeInherited)
Add all the content from another ThreddsMetadata

Parameters:
tmd - get content from here
includeInherited - if false, dontadd inherited InvMetdata

addCreator

public void addCreator(ThreddsMetadata.Source c)
Add a creator


getCreators

public java.util.ArrayList getCreators()
Get list of creators (type Source); may be empty, not null.


setCreators

public void setCreators(java.util.ArrayList creators)
Set list of creators (type Source); may be empty, not null.


addContributor

public void addContributor(ThreddsMetadata.Contributor c)
Add a contributor


getContributors

public java.util.ArrayList getContributors()
Get list of contributors (type Contributor); may be empty, not null.


setContributors

public void setContributors(java.util.ArrayList contributors)
Set list of contributors (type Contributor); may be empty, not null.


addDate

public void addDate(thredds.datatype.DateType d)
Add a date


getDates

public java.util.List getDates()
Get list of DateType; may be empty, not null.


addDocumentation

public void addDocumentation(InvDocumentation d)
Add a documentation


getDocumentation

public java.util.List getDocumentation()
Get list of InvDocumentation; may be empty, not null.


addKeyword

public void addKeyword(ThreddsMetadata.Vocab v)
Add a keyword


getKeywords

public java.util.ArrayList getKeywords()
Get list of contributors; may be empty, not null.


setKeywords

public void setKeywords(java.util.ArrayList keywords)
Set list of contributors; may be empty, not null.


addMetadata

public void addMetadata(InvMetadata m)
Add InvMetadata


removeMetadata

public void removeMetadata(InvMetadata m)
remove an InvMetadata element from list, using equals() to locate it.


getMetadata

public java.util.List getMetadata()
Get list of InvMetadata; may be empty, not null.


addProject

public void addProject(ThreddsMetadata.Vocab v)
Add a project


getProjects

public java.util.ArrayList getProjects()
Get list of projects (type Vocab); may be empty, not null.


setProjects

public void setProjects(java.util.ArrayList projects)
Set list of projects (type Vocab); may be empty, not null.


addProperty

public void addProperty(InvProperty p)
Add a property


getProperties

public java.util.List getProperties()
Get list of contributors; may be empty, not null.


addPublisher

public void addPublisher(ThreddsMetadata.Source p)
Add a publisher


getPublishers

public java.util.List getPublishers()
Get list of publishers (type Source); may be empty, not null.


setPublishers

public void setPublishers(java.util.ArrayList publishers)
Set list of publishers (type Source); may be empty, not null.


addVariables

public void addVariables(ThreddsMetadata.Variables vs)
Add variables


getVariables

public java.util.List getVariables()
Get list of Variables; may be empty, not null.


setGeospatialCoverage

public void setGeospatialCoverage(ThreddsMetadata.GeospatialCoverage gc)
set GeospatialCoverage element


getGeospatialCoverage

public ThreddsMetadata.GeospatialCoverage getGeospatialCoverage()
get GeospatialCoverage element


setTimeCoverage

public void setTimeCoverage(thredds.datatype.DateRange tc)
set TimeCoverage element


getTimeCoverage

public thredds.datatype.DateRange getTimeCoverage()
get TimeCoverage element


isInherited

public boolean isInherited()
Get inherited


setInherited

public void setInherited(boolean inherited)
Set inherited


getServiceName

public java.lang.String getServiceName()
Get serviceName


setServiceName

public void setServiceName(java.lang.String serviceName)
Set serviceName


getDataType

public DataType getDataType()
Get dataType


setDataType

public void setDataType(DataType dataType)
Set dataType


getDataFormatType

public DataFormatType getDataFormatType()
Get dataType


setDataFormatType

public void setDataFormatType(DataFormatType dataFormat)
Set dataType


getAuthority

public java.lang.String getAuthority()
Get authority


setAuthority

public void setAuthority(java.lang.String authorityName)
Set authority


getDocumentation

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


getDocumentationLinks

public java.util.List getDocumentationLinks()
get Documentation that are xlinks


setDocumentationLinks

public void setDocumentationLinks(java.util.List newdocs)
set the list of Documentation that are xlinks


getHistory

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


setHistory

public void setHistory(java.lang.String history)
set specific type of documentation = history


getProcessing

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


setProcessing

public void setProcessing(java.lang.String processing)
set specific type of documentation = processing_level


getRights

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


setRights

public void setRights(java.lang.String rights)
set specific type of documentation = rights


getSummary

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


setSummary

public void setSummary(java.lang.String summary)
set specific type of documentation = summary


getDataSize

public double getDataSize()
Get the data size in bytes. A value of 0.0 or NaN means not set.


setDataSize

public void setDataSize(double size)
Set size (bytes)


hasDataSize

public boolean hasDataSize()

addDocumentation

public void addDocumentation(java.lang.String type,
                             java.lang.String s)
set specified type of documentation


removeDocumentation

public void removeDocumentation(java.lang.String type)
remove all instances of specified type of documentation


equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException