Class LinkInfo


  • public class LinkInfo
    extends java.lang.Object
    Stores information about the validity of an external link.
    • Constructor Detail

      • LinkInfo

        public LinkInfo​(java.lang.String url)
        Initializes a new instance.
        Parameters:
        url - The URL to store validity information about
      • LinkInfo

        public LinkInfo​(LinkInfo base)
        Initializes a new instance based on the given one.
        Parameters:
        base - info to copy from
    • Method Detail

      • getLastAccessed

        public java.util.Calendar getLastAccessed()
        Returns the date a check for validity of the URL has last been requested.
        Returns:
        The date the check for validity of the URL has last been requested
      • setLastAccessed

        public void setLastAccessed​(java.util.Calendar lastAccessed)
        Sets the date a check for validity of the URL has last been requested.
        Parameters:
        lastAccessed - The date the check for validity of the URL has last been requested
      • getLastChecked

        public java.util.Calendar getLastChecked()
        Returns the date the URL has last been checked by the asynchronous LinkCheckerTask.
        Returns:
        The date the URL has last been checked
      • setLastChecked

        public void setLastChecked​(java.util.Calendar lastChecked)
        Sets the date the URL has last been checked by the asynchronous LinkCheckerTask.
        Parameters:
        lastChecked - The date the URL has last been checked
      • getLastAvailable

        public java.util.Calendar getLastAvailable()
        Returns the date the resource described by the URL has last been available.
        Returns:
        The date the resource described by the URL has last been available.
      • setLastAvailable

        public void setLastAvailable​(java.util.Calendar lastAvailable)
        Sets the date the resource described by the URL has last been available.
        Parameters:
        lastAvailable - The date the resource described by the URL has last been available.
      • getUrl

        public java.lang.String getUrl()
        Returns the URL about which validity information is stored.
        Returns:
        The URL about which validity information is stored
      • isValid

        public boolean isValid()
        Returns whether the resource described by the URL is currently available.
        Returns:
        true, if the resource described by the URL is currently available
      • setValid

        public void setValid​(boolean valid)
        Sets whether the resource described by the URL is currently available.
        Parameters:
        valid - Whether the resource described by the URL is currently available
      • getLastStatus

        public int getLastStatus()
        Returns the last status
        Returns:
        the last status
      • getLastStatusAsString

        public java.lang.String getLastStatusAsString()
      • setLastStatus

        public void setLastStatus​(int lastStatus)
        Sets the last status
        Parameters:
        lastStatus - the last status
      • addReferrer

        public void addReferrer​(java.lang.String path)
        Adds (if not already present) a referrer to this link.
        Parameters:
        path - the path of the node referencing this link
      • getReferrer

        public java.lang.String[] getReferrer()
        Returns the paths referencing this link
        Returns:
        the paths referencing this link
      • equals

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

        public boolean isSame​(LinkInfo linkInfo)
      • hashCode

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