Class ResourceInfo


  • public class ResourceInfo
    extends Object
    This class implements a resource info record, which provides supplementary information about a resource that is available at the endpoint.
    See Also:
    EndpointDescription
    • Constructor Detail

      • ResourceInfo

        public ResourceInfo​(String pid,
                            Map<String,​String> title,
                            Map<String,​String> description,
                            Map<String,​String> institution,
                            String landingPageURI,
                            List<String> languages,
                            List<DataView> availableDataViews,
                            List<Layer> availableLayers,
                            List<ResourceInfo> subResources)
        Constructor.
        Parameters:
        pid - the persistent identifier of the resource
        title - the title of the resource represented as a map with pairs of language code and title
        description - the description of the resource represented as a map with pairs of language code and description or null if not applicable
        institution - the institution of the resource represented as a map with pairs of language code and institution names or null if not applicable
        landingPageURI - a URI to the landing page of the resource or null if not applicable
        languages - the languages represented within this resource represented as a list of ISO-632-3 three letter language codes
        availableDataViews - the list of available data views for this resource
        availableLayers - the list if layers available for Advanced Search or null if not applicable
        subResources - a list of resource sub-ordinate to this resource or null if not applicable
    • Method Detail

      • getPid

        public String getPid()
        Get the persistent identifier of this resource.
        Returns:
        a string representing the persistent identifier of this resource
      • hasSubResources

        public boolean hasSubResources()
        Determine, if this resource has sub-resources.
        Returns:
        true if the resource has sub-resources, false otherwise
      • getTitle

        public Map<String,​String> getTitle()
        Get the title of this resource.
        Returns:
        a Map of titles keyed by language code
      • getTitle

        public String getTitle​(String language)
        Get the title of the resource for a specific language code.
        Parameters:
        language - the language code
        Returns:
        the title for the language code or null if no title for this language code exists
      • getDescription

        public Map<String,​String> getDescription()
        Get the description of this resource.
        Returns:
        a Map of descriptions keyed by language code
      • getDescription

        public String getDescription​(String language)
        Get the description of the resource for a specific language code.
        Parameters:
        language - the language code
        Returns:
        the description for the language code or null if no title for this language code exists
      • getInstitution

        public Map<String,​String> getInstitution()
        Get the institution of this resource. This is an optional attribute for endpoints that host resources from different institution but still want to bundle them in one endpoint. If not specified then it is the default institution that hosts the FCS endpoint.
        Returns:
        the institution of this resource or null if not applicable or specified
      • getInstitution

        public String getInstitution​(String language)
        Get the institution of this resource for a specific language code.
        Parameters:
        language - the language code
        Returns:
        the institution of this resource or null if not applicable or specified
      • getLandingPageURI

        public String getLandingPageURI()
        Get the landing page of this resource.
        Returns:
        the landing page of this resource or null if not applicable
      • getLanguages

        public List<String> getLanguages()
        Get the list of languages in this resource represented as ISO-632-3 three letter language code.
        Returns:
        the list of languages in this resource as a list of ISO-632-3 three letter language codes.
      • getAvailableDataViews

        public List<DataView> getAvailableDataViews()
        Get the list of data views that are available for this resource.
        Returns:
        the list of data views
      • getAvailableLayers

        public List<Layer> getAvailableLayers()
        Get the list of layers that are available in Advanced Search for this resource.
        Returns:
        the list of layers or null
      • hasAvailableLayers

        public boolean hasAvailableLayers()
        Check if any layers are available for Advanced Search
        Returns:
        true if any layer for Advanced Search is available, false otherwise
      • getSubResources

        public List<ResourceInfo> getSubResources()
        Get the direct sub-ordinate resources of this resource.
        Returns:
        a list of resources or null if this resource has no sub-ordinate resources