Class ThreddsMetadata


  • public class ThreddsMetadata
    extends Object
    Metadata for "enhanced catalogs", type THREDDS.
    • 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 here
        includeInherited - if false, dont add inherited InvMetadata
      • 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
      • 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
      • getDates

        public List<DateType> getDates()
        Returns:
        list of DateType; may be empty, not null.
      • 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
      • 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
      • addProperties

        public void addProperties​(List<Attribute> atts)
      • 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
      • 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
      • 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 documentation
        content - documentation contenet
      • removeDocumentation

        public void removeDocumentation​(String type)
        remove all instances of specified type of documentation
        Parameters:
        type - type of documentation
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • main

        public static void main​(String[] args)
                         throws IOException
        ********************************************************************
        Throws:
        IOException