Package org.lockss.laaws.rs.model
Class CdxRecord
java.lang.Object
org.lockss.laaws.rs.model.CdxRecord
An [Open|Py]Wayback CDX record.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longcomputeCollectiondate(String timestamp) Provides the artifact collection date that corresponds to a given text timestamp.static longcomputeNumericTimestamp(long collectionDate) Provides the numeric timestamp that corresponds to a given artifact collection date.static StringcomputeTextTimestamp(long collectionDate) Provides the text timestamp that corresponds to a given artifact collection date.booleanProvides the archive name.Provides the digest.intProvides the HTTP status code.longProvides the content length.Provides the MIME type.longProvides the content offset.Provides the redirect URL.Provides the robot flags.longProvides the timestamp.getUrl()Provides the URL.Provides the URL sort key.inthashCode()voidsetArchiveName(String archiveName) Saves the archive name.voidSaves the digest.voidsetHttpStatus(int httpStatus) Saves the HTTP status code.voidsetLength(long length) Saves the content length.voidsetMimeType(String mimeType) Saves the MIME type.voidsetOffset(long offset) Saves the content offset.voidsetRedirectUrl(String redirectUrl) Saves the redirect URL.voidsetRobotFlags(String robotFlags) Saves the robot flags.voidsetTimestamp(long timestamp) Saves the timestamp.voidSaves the URL.voidsetUrlSortKey(String urlSortKey) Saves the URL sort key.toIaText()Provides the representation of this object in Internet Archive format.toJson()Provides the representation of this object in JSON format.toString()voidtoXmlText(XMLStreamWriter writer) Writes the representation of this object in OpenWayback XML format.
-
Constructor Details
-
CdxRecord
public CdxRecord()
-
-
Method Details
-
getUrlSortKey
Provides the URL sort key.- Returns:
- a String with the URL sort key.
-
setUrlSortKey
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
Provides the URL.- Returns:
- a String with the URL.
-
setUrl
Saves the URL.- Parameters:
url- A String with the URL.
-
getMimeType
Provides the MIME type.- Returns:
- a String with the MIME type.
-
setMimeType
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
Provides the digest.- Returns:
- a String with the digest.
-
setDigest
Saves the digest.- Parameters:
digest- A String with the digest.
-
getRedirectUrl
Provides the redirect URL.- Returns:
- a String with the redirect URL.
-
setRedirectUrl
Saves the redirect URL.- Parameters:
redirectUrl- A String with the redirect URL.
-
getRobotFlags
Provides the robot flags.- Returns:
- a String with the robot flags.
-
setRobotFlags
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
Provides the archive name.- Returns:
- a String with the archive name.
-
setArchiveName
Saves the archive name.- Parameters:
archiveName- A long with the archive name.
-
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
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
Provides the representation of this object in JSON format.- Returns:
- a String with the representation of this object in JSON format.
-
computeCollectiondate
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
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
-
equals
-
hashCode
public int hashCode()
-