Class CdxRecord

java.lang.Object
org.lockss.laaws.rs.model.CdxRecord

public class CdxRecord extends Object
An [Open|Py]Wayback CDX record.
  • Constructor Details

    • CdxRecord

      public CdxRecord()
  • Method Details

    • getUrlSortKey

      public String getUrlSortKey()
      Provides the URL sort key.
      Returns:
      a String with the URL sort key.
    • setUrlSortKey

      public void setUrlSortKey(String urlSortKey)
      Saves the URL sort key.
      Parameters:
      urlSortKey - A String with the URL sort key.
    • getTimestamp

      public long getTimestamp()
      Provides the timestamp.
      Returns:
      a long with the timestamp.
    • setTimestamp

      public void setTimestamp(long timestamp)
      Saves the timestamp.
      Parameters:
      timestamp - A long with the timestamp.
    • getUrl

      public String getUrl()
      Provides the URL.
      Returns:
      a String with the URL.
    • setUrl

      public void setUrl(String url)
      Saves the URL.
      Parameters:
      url - A String with the URL.
    • getMimeType

      public String getMimeType()
      Provides the MIME type.
      Returns:
      a String with the MIME type.
    • setMimeType

      public void setMimeType(String mimeType)
      Saves the MIME type.
      Parameters:
      mimeType - A String with the MIME type.
    • getHttpStatus

      public int getHttpStatus()
      Provides the HTTP status code.
      Returns:
      an int with the HTTP status code.
    • setHttpStatus

      public void setHttpStatus(int httpStatus)
      Saves the HTTP status code.
      Parameters:
      httpStatus - An int with the HTTP status code.
    • getDigest

      public String getDigest()
      Provides the digest.
      Returns:
      a String with the digest.
    • setDigest

      public void setDigest(String digest)
      Saves the digest.
      Parameters:
      digest - A String with the digest.
    • getRedirectUrl

      public String getRedirectUrl()
      Provides the redirect URL.
      Returns:
      a String with the redirect URL.
    • setRedirectUrl

      public void setRedirectUrl(String redirectUrl)
      Saves the redirect URL.
      Parameters:
      redirectUrl - A String with the redirect URL.
    • getRobotFlags

      public String getRobotFlags()
      Provides the robot flags.
      Returns:
      a String with the robot flags.
    • setRobotFlags

      public void setRobotFlags(String robotFlags)
      Saves the robot flags.
      Parameters:
      robotFlags - A String with the robot flags.
    • getLength

      public long getLength()
      Provides the content length.
      Returns:
      a long with the content length.
    • setLength

      public void setLength(long length)
      Saves the content length.
      Parameters:
      length - A long with the content length.
    • getOffset

      public long getOffset()
      Provides the content offset.
      Returns:
      a long with the content offset.
    • setOffset

      public void setOffset(long offset)
      Saves the content offset.
      Parameters:
      offset - A long with the content offset.
    • getArchiveName

      public String getArchiveName()
      Provides the archive name.
      Returns:
      a String with the archive name.
    • setArchiveName

      public void setArchiveName(String archiveName)
      Saves the archive name.
      Parameters:
      archiveName - A long with the archive name.
    • toIaText

      public String toIaText()
      Provides the representation of this object in Internet Archive format.
      Returns:
      a String with the representation of this object in Internet Archive format.
    • toXmlText

      public void toXmlText(XMLStreamWriter writer) throws XMLStreamException
      Writes the representation of this object in OpenWayback XML format.
      Parameters:
      writer - An XMLStreamWriter where to output the XML representation of this object.
      Throws:
      XMLStreamException - if there are problems writing the XML element.
    • toJson

      public String toJson()
      Provides the representation of this object in JSON format.
      Returns:
      a String with the representation of this object in JSON format.
    • computeCollectiondate

      public static long computeCollectiondate(String timestamp)
      Provides the artifact collection date that corresponds to a given text timestamp.
      Parameters:
      timestamp - A String with the timestamp.
      Returns:
      a long with the artifact collection date.
    • computeTextTimestamp

      public static String computeTextTimestamp(long collectionDate)
      Provides the text timestamp that corresponds to a given artifact collection date.
      Parameters:
      collectionDate - A long with the artifact collection date.
      Returns:
      a String with the timestamp.
    • computeNumericTimestamp

      public static long computeNumericTimestamp(long collectionDate)
      Provides the numeric timestamp that corresponds to a given artifact collection date.
      Parameters:
      collectionDate - A long with the artifact collection date.
      Returns:
      a long with the numeric timestamp.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object