Class SiteMapURL

    • Method Detail

      • getUrl

        public URL getUrl()
        Return the URL.
        Returns:
        URL
      • setUrl

        public void setUrl​(URL url)
        Set the URL.
        Parameters:
        url - of the sitemap
      • setUrl

        public void setUrl​(String url)
        Set the URL.
        Parameters:
        url - In case of Malformed URL, the current url in this instance will be set to NULL
      • getLastModified

        public Date getLastModified()
        Return when this URL was last modified.
        Returns:
        last modified date
      • setLastModified

        public void setLastModified​(String lastModified)
        Set when this URL was last modified.
        Parameters:
        lastModified - lastmod specified for the URL
      • setLastModified

        public void setLastModified​(Date lastModified)
        Set when this URL was last modified.
        Parameters:
        lastModified - lastmod specified for the URL
      • setLastModified

        public void setLastModified​(ZonedDateTime lastModified)
        Set when this URL was last modified.
        Parameters:
        lastModified - lastmod specified for the URL
      • getPriority

        public double getPriority()
        Return this URL's priority (a value between [0.0 - 1.0]).
        Returns:
        URL's priority (a value between [0.0 - 1.0])
      • setPriority

        public void setPriority​(double priority)
        Set the URL's priority to a value between [0.0 - 1.0] (Default Priority is used if the given priority is out of range).
        Parameters:
        priority - a value between [0.0 - 1.0]
      • setPriority

        public void setPriority​(String priorityStr)
        Set the URL's priority to a value between [0.0 - 1.0] (Default Priority is used if the given priority missing or is out of range).
        Parameters:
        priorityStr - a value between [0.0 - 1.0]
      • getChangeFrequency

        public SiteMapURL.ChangeFrequency getChangeFrequency()
        Return the URL's change frequency
        Returns:
        the URL's change frequency
      • setChangeFrequency

        public void setChangeFrequency​(String changeFreq)
        Set the URL's change frequency In case of a bad ChangeFrequency, the current frequency in this instance will be set to NULL
        Parameters:
        changeFreq - a string representing a SiteMapURL.ChangeFrequency for this sitemap
      • setValid

        public void setValid​(boolean valid)
        Valid means that it follows the official guidelines that the siteMapURL must be under the base url
        Parameters:
        valid - whether the Sitemap is valid syntax or not
      • isValid

        public boolean isValid()
        Is the siteMapURL under the base url ?
        Returns:
        true if the syntax is valid, false otherwise
      • addAttributesForExtension

        public void addAttributesForExtension​(Extension extension,
                                              ExtensionMetadata[] attributes)
        Add attributes of a specific sitemap extension
        Parameters:
        extension - sitemap extension (news, images, videos, etc.)
        attributes - array of attributes
      • getAttributes

        public Map<Extension,​ExtensionMetadata[]> getAttributes()
        Get attributes of sitemap extensions (news, images, videos, etc.)
        Returns:
        attribute map or null if no extensions are used
      • getAttributesForExtension

        public ExtensionMetadata[] getAttributesForExtension​(Extension extension)
        Get attributes of a specific sitemap extension
        Parameters:
        extension - sitemap extension (news, images, videos, etc.)
        Returns:
        array of attributes or null if there are no attributes for the given extension
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object