Class WarcRecord<T extends WarcContentBlock>
java.lang.Object
com.github.bottomlessarchive.warc.service.record.domain.WarcRecord<T>
public class WarcRecord<T extends WarcContentBlock>
extends java.lang.Object
Basic constituent of a WARC file. Contains all information of a WARC record.
-
Constructor Summary
Constructors Constructor Description WarcRecord() -
Method Summary
Modifier and Type Method Description TgetContentBlock()Returns the WARC record'sWarcContentBlock.java.lang.StringgetHeader(java.lang.String headerName)java.util.Map<java.lang.String,java.lang.String>getHeaders()java.util.Optional<java.lang.String>getRecordId()Returns WARC-Record-ID of a WARC record.WarcRecordTypegetType()Returns the type of a WARC record.TgetWarcContentBlock()Deprecated, for removal: This API element is subject to removal in a future version.booleanisContinuation()booleanisConversion()booleanisMetadata()booleanisRequest()booleanisResource()booleanisResponse()booleanisRevisit()booleanisWarcinfo()Deprecated, for removal: This API element is subject to removal in a future version.booleanisWarcInfo()
-
Constructor Details
-
WarcRecord
public WarcRecord()
-
-
Method Details
-
getContentBlock
Returns the WARC record'sWarcContentBlock. The returned content block may refer to different classes based on the type of the WARC record.- Returns:
- the content block of a WARC record
-
getWarcContentBlock
Deprecated, for removal: This API element is subject to removal in a future version.Returns the WARC record'sWarcContentBlock. The returned content block may refer to different classes based on the type of the WARC record.- Returns:
- the content block of a WARC record
-
getType
Returns the type of a WARC record.- Returns:
- the type of the record
- See Also:
- https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/#warc-type-mandatory
-
getRecordId
public java.util.Optional<java.lang.String> getRecordId()Returns WARC-Record-ID of a WARC record. WARC-Record-ID is An identifier assigned to the current record that is globally unique for intended amount of time WARC-Record-ID is a mandatory field of record WARC header- Returns:
- WARC-Record-ID string if possible. Returns null when WARC headers does not contain WARC-Record-ID field
-
getHeader
public java.lang.String getHeader(java.lang.String headerName) -
getHeaders
public java.util.Map<java.lang.String,java.lang.String> getHeaders() -
isRequest
public boolean isRequest() -
isResponse
public boolean isResponse() -
isWarcInfo
public boolean isWarcInfo() -
isResource
public boolean isResource() -
isMetadata
public boolean isMetadata() -
isRevisit
public boolean isRevisit() -
isConversion
public boolean isConversion() -
isContinuation
public boolean isContinuation() -
isWarcinfo
@Deprecated(since="1.1.0", forRemoval=true) public boolean isWarcinfo()Deprecated, for removal: This API element is subject to removal in a future version.
-