Package thredds.catalog
Class ThreddsMetadata
- java.lang.Object
-
- thredds.catalog.ThreddsMetadata
-
public class ThreddsMetadata extends Object
Metadata for "enhanced catalogs", type THREDDS.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description 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.
-
Field Summary
Fields Modifier and Type Field Description protected String
authorityName
protected List<ThreddsMetadata.Contributor>
contributors
protected List<ThreddsMetadata.Source>
creators
protected DataFormatType
dataFormat
protected double
dataSize
protected FeatureType
dataType
protected List<DateType>
dates
protected List<InvDocumentation>
docs
protected ThreddsMetadata.GeospatialCoverage
gc
protected boolean
inherited
protected List<ThreddsMetadata.Vocab>
keywords
protected List<InvMetadata>
metadata
protected List<ThreddsMetadata.Vocab>
projects
protected List<InvProperty>
properties
protected List<ThreddsMetadata.Source>
publishers
protected String
serviceName
protected DateRange
timeCoverage
protected String
variableMapLink
protected List<ThreddsMetadata.Variables>
variables
-
Constructor Summary
Constructors Constructor Description ThreddsMetadata(boolean inherited)
ThreddsMetadata(ThreddsMetadata from)
Copy Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(ThreddsMetadata tmd, boolean includeInherited)
Add all the content from another ThreddsMetadatavoid
addContributor(ThreddsMetadata.Contributor c)
Add a contributorvoid
addCreator(ThreddsMetadata.Source c)
Add a creatorvoid
addDate(DateType d)
Add a datevoid
addDocumentation(String type, String content)
set specified type of documentationvoid
addDocumentation(InvDocumentation d)
Add a documentationvoid
addKeyword(ThreddsMetadata.Vocab keyword)
Add a keywordvoid
addMetadata(InvMetadata m)
Add InvMetadatavoid
addProject(ThreddsMetadata.Vocab project)
Add a projectvoid
addProperties(List<Attribute> atts)
void
addProperty(InvProperty p)
Add a propertyvoid
addPublisher(ThreddsMetadata.Source p)
Add a publishervoid
addVariableMapLink(String xlinkHref)
Add a variable Map linkvoid
addVariables(ThreddsMetadata.Variables vs)
Add variablesboolean
equals(Object o)
String
getAuthority()
CalendarDateRange
getCalendarDateCoverage()
List<ThreddsMetadata.Contributor>
getContributors()
List<ThreddsMetadata.Source>
getCreators()
DataFormatType
getDataFormatType()
double
getDataSize()
FeatureType
getDataType()
List<DateType>
getDates()
List<InvDocumentation>
getDocumentation()
String
getDocumentation(String type)
ThreddsMetadata.GeospatialCoverage
getGeospatialCoverage()
String
getHistory()
List<ThreddsMetadata.Vocab>
getKeywords()
List<InvMetadata>
getMetadata()
String
getProcessing()
List<ThreddsMetadata.Vocab>
getProjects()
List<InvProperty>
getProperties()
List<ThreddsMetadata.Source>
getPublishers()
String
getRights()
String
getServiceName()
String
getSummary()
DateRange
getTimeCoverage()
String
getVariableMap()
List<ThreddsMetadata.Variables>
getVariables()
boolean
hasDataSize()
int
hashCode()
boolean
isInherited()
static void
main(String[] args)
********************************************************************void
removeDocumentation(String type)
remove all instances of specified type of documentationvoid
removeMetadata(InvMetadata m)
remove an InvMetadata element from list, using equals() to locate it.void
setAuthority(String authorityName)
Set authorityvoid
setContributors(List<ThreddsMetadata.Contributor> contributors)
Set list of contributors (type Contributor); may be empty, not null.void
setCreators(List<ThreddsMetadata.Source> creators)
Set list of creators (type Source); may be empty, not null.void
setDataFormatType(DataFormatType dataFormat)
Set dataTypeFormatvoid
setDataSize(double size)
Set size (bytes)void
setDataType(FeatureType dataType)
Set dataTypevoid
setGeospatialCoverage(ThreddsMetadata.GeospatialCoverage gc)
set GeospatialCoverage elementvoid
setHistory(String history)
set specific type of documentation = historyvoid
setInherited(boolean inherited)
Set inheritedvoid
setKeywords(List<ThreddsMetadata.Vocab> keywords)
Set list of keywords; may be empty, not null.void
setProcessing(String processing)
set specific type of documentation = processing_levelvoid
setProjects(List<ThreddsMetadata.Vocab> projects)
Set list of projects (type Vocab); may be empty, not null.void
setPublishers(List<ThreddsMetadata.Source> publishers)
Set list of publishers (type Source); may be empty, not null.void
setRights(String rights)
set specific type of documentation = rightsvoid
setServiceName(String serviceName)
Set serviceNamevoid
setSummary(String summary)
set specific type of documentation = summaryvoid
setTimeCoverage(CalendarDateRange cdc)
set TimeCoverage from a CalendarDateRangevoid
setTimeCoverage(DateRange tc)
set TimeCoverage element
-
-
-
Field Detail
-
inherited
protected boolean inherited
-
creators
protected List<ThreddsMetadata.Source> creators
-
contributors
protected List<ThreddsMetadata.Contributor> contributors
-
docs
protected List<InvDocumentation> docs
-
keywords
protected List<ThreddsMetadata.Vocab> keywords
-
metadata
protected List<InvMetadata> metadata
-
projects
protected List<ThreddsMetadata.Vocab> projects
-
properties
protected List<InvProperty> properties
-
publishers
protected List<ThreddsMetadata.Source> publishers
-
variables
protected List<ThreddsMetadata.Variables> variables
-
variableMapLink
protected String variableMapLink
-
gc
protected ThreddsMetadata.GeospatialCoverage gc
-
timeCoverage
protected DateRange timeCoverage
-
authorityName
protected String authorityName
-
serviceName
protected String serviceName
-
dataType
protected FeatureType dataType
-
dataFormat
protected DataFormatType dataFormat
-
dataSize
protected double dataSize
-
-
Constructor Detail
-
ThreddsMetadata
public ThreddsMetadata(boolean inherited)
-
ThreddsMetadata
public ThreddsMetadata(ThreddsMetadata from)
Copy Constructor.- Parameters:
from
- copy from here
-
-
Method Detail
-
add
public void add(ThreddsMetadata tmd, boolean includeInherited)
Add all the content from another ThreddsMetadata- Parameters:
tmd
- get content from hereincludeInherited
- if false, dont add inherited InvMetadata
-
addCreator
public void addCreator(ThreddsMetadata.Source c)
Add a creator- Parameters:
c
- add this
-
getCreators
public List<ThreddsMetadata.Source> getCreators()
- Returns:
- list of creators (type Source); may be empty, not null.
-
setCreators
public void setCreators(List<ThreddsMetadata.Source> creators)
Set list of creators (type Source); may be empty, not null.- Parameters:
creators
- set creators to this list
-
addContributor
public void addContributor(ThreddsMetadata.Contributor c)
Add a contributor- Parameters:
c
- add this
-
getContributors
public List<ThreddsMetadata.Contributor> getContributors()
- Returns:
- list of contributors (type Contributor); may be empty, not null.
-
setContributors
public void setContributors(List<ThreddsMetadata.Contributor> contributors)
Set list of contributors (type Contributor); may be empty, not null.- Parameters:
contributors
- set contributers to this
-
addDate
public void addDate(DateType d)
Add a date- Parameters:
d
- add this dateType
-
addDocumentation
public void addDocumentation(InvDocumentation d)
Add a documentation- Parameters:
d
- add this
-
getDocumentation
public List<InvDocumentation> getDocumentation()
- Returns:
- list of InvDocumentation; may be empty, not null.
-
addKeyword
public void addKeyword(ThreddsMetadata.Vocab keyword)
Add a keyword- Parameters:
keyword
- add this
-
getKeywords
public List<ThreddsMetadata.Vocab> getKeywords()
- Returns:
- list of keywords; may be empty, not null.
-
setKeywords
public void setKeywords(List<ThreddsMetadata.Vocab> keywords)
Set list of keywords; may be empty, not null.- Parameters:
keywords
- set list of keywords to this
-
addMetadata
public void addMetadata(InvMetadata m)
Add InvMetadata- Parameters:
m
- add this
-
removeMetadata
public void removeMetadata(InvMetadata m)
remove an InvMetadata element from list, using equals() to locate it.- Parameters:
m
- remove this
-
getMetadata
public List<InvMetadata> getMetadata()
- Returns:
- list of InvMetadata; may be empty, not null.
-
addProject
public void addProject(ThreddsMetadata.Vocab project)
Add a project- Parameters:
project
- add this
-
getProjects
public List<ThreddsMetadata.Vocab> getProjects()
- Returns:
- list of projects (type Vocab); may be empty, not null.
-
setProjects
public void setProjects(List<ThreddsMetadata.Vocab> projects)
Set list of projects (type Vocab); may be empty, not null.- Parameters:
projects
- set list of projects to this
-
addProperty
public void addProperty(InvProperty p)
Add a property- Parameters:
p
- add this
-
getProperties
public List<InvProperty> getProperties()
- Returns:
- list of properties; may be empty, not null.
-
addPublisher
public void addPublisher(ThreddsMetadata.Source p)
Add a publisher- Parameters:
p
- add this
-
getPublishers
public List<ThreddsMetadata.Source> getPublishers()
- Returns:
- list of publishers (type Source); may be empty, not null.
-
setPublishers
public void setPublishers(List<ThreddsMetadata.Source> publishers)
Set list of publishers (type Source); may be empty, not null.- Parameters:
publishers
- set list of publishers to this
-
addVariables
public void addVariables(ThreddsMetadata.Variables vs)
Add variables- Parameters:
vs
- add this
-
getVariables
public List<ThreddsMetadata.Variables> getVariables()
- Returns:
- list of Variables; may be empty, not null.
-
addVariableMapLink
public void addVariableMapLink(String xlinkHref)
Add a variable Map link- Parameters:
xlinkHref
- : URI of xlink
-
getVariableMap
public String getVariableMap()
-
setGeospatialCoverage
public void setGeospatialCoverage(ThreddsMetadata.GeospatialCoverage gc)
set GeospatialCoverage element- Parameters:
gc
- set GeospatialCoverage to this
-
getGeospatialCoverage
public ThreddsMetadata.GeospatialCoverage getGeospatialCoverage()
- Returns:
- GeospatialCoverage element
-
setTimeCoverage
public void setTimeCoverage(DateRange tc)
set TimeCoverage element- Parameters:
tc
- set TimeCoverage to this
-
setTimeCoverage
public void setTimeCoverage(CalendarDateRange cdc)
set TimeCoverage from a CalendarDateRange- Parameters:
cdc
- set CalendarDateRange to this
-
getTimeCoverage
public DateRange getTimeCoverage()
- Returns:
- TimeCoverage element as DateRange
-
getCalendarDateCoverage
public CalendarDateRange getCalendarDateCoverage()
- Returns:
- TimeCoverage element as CalendarDateRange
-
isInherited
public boolean isInherited()
- Returns:
- true if this is inherited
-
setInherited
public void setInherited(boolean inherited)
Set inherited- Parameters:
inherited
- set true if inherited
-
getServiceName
public String getServiceName()
- Returns:
- serviceName
-
setServiceName
public void setServiceName(String serviceName)
Set serviceName- Parameters:
serviceName
- set service name to this, must be valid service
-
getDataType
public FeatureType getDataType()
- Returns:
- dataType
-
setDataType
public void setDataType(FeatureType dataType)
Set dataType- Parameters:
dataType
- set to this dataType
-
getDataFormatType
public DataFormatType getDataFormatType()
- Returns:
- dataType
-
setDataFormatType
public void setDataFormatType(DataFormatType dataFormat)
Set dataTypeFormat- Parameters:
dataFormat
- set to this dataTypeFormat
-
getAuthority
public String getAuthority()
- Returns:
- authority
-
setAuthority
public void setAuthority(String authorityName)
Set authority- Parameters:
authorityName
- set to this
-
getDocumentation
public String getDocumentation(String type)
- Parameters:
type
- match on doc.getType()- Returns:
- specific type of documentation
-
getHistory
public String getHistory()
- Returns:
- specific type of documentation = history
-
setHistory
public void setHistory(String history)
set specific type of documentation = history- Parameters:
history
- add (or replace) the history documentation element to this content
-
getProcessing
public String getProcessing()
- Returns:
- specific type of documentation = processing_level
-
setProcessing
public void setProcessing(String processing)
set specific type of documentation = processing_level- Parameters:
processing
- add (or replace) the history documentation element to this content
-
getRights
public String getRights()
- Returns:
- specific type of documentation = rights
-
setRights
public void setRights(String rights)
set specific type of documentation = rights- Parameters:
rights
- add (or replace) the history documentation element to this content
-
getSummary
public String getSummary()
- Returns:
- specific type of documentation = summary
-
setSummary
public void setSummary(String summary)
set specific type of documentation = summary- Parameters:
summary
- add (or replace) the history documentation element to this content
-
getDataSize
public double getDataSize()
- Returns:
- the data size in bytes. A value of 0.0 or NaN means not set.
-
setDataSize
public void setDataSize(double size)
Set size (bytes)- Parameters:
size
- the data size in bytes. A value of 0.0 or NaN means not set.
-
hasDataSize
public boolean hasDataSize()
-
addDocumentation
public void addDocumentation(String type, String content)
set specified type of documentation- Parameters:
type
- type of documentationcontent
- documentation contenet
-
removeDocumentation
public void removeDocumentation(String type)
remove all instances of specified type of documentation- Parameters:
type
- type of documentation
-
main
public static void main(String[] args) throws IOException
********************************************************************- Throws:
IOException
-
-