|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.harvester.harvesting.distribute.MetadataEntry
public class MetadataEntry
Class used to carry metadata in DoOneCrawl messages, including the URL and mimetype necessary to write the metadata to metadata ARC files.
Constructor Summary | |
---|---|
MetadataEntry(java.lang.String url,
java.lang.String mimeType,
java.lang.String data)
Constructor for this class. |
Method Summary | |
---|---|
byte[] |
getData()
|
java.lang.String |
getMimeType()
|
java.lang.String |
getURL()
|
boolean |
isDuplicateReductionMetadataEntry()
Checks, if this is a duplicate reduction MetadataEntry. |
static MetadataEntry |
makeAliasMetadataEntry(java.util.List<AliasInfo> aliases,
java.lang.Long origHarvestDefinitionID,
int harvestNum,
java.lang.Long jobId)
Generate a MetadataEntry from a list of AliasInfo objects (VERSION 2) Expired aliases is skipped by this method. |
static MetadataEntry |
makeDuplicateReductionMetadataEntry(java.util.List<java.lang.Long> jobIDsForDuplicateReduction,
java.lang.Long origHarvestDefinitionID,
int harvestNum,
java.lang.Long jobId)
Generate a MetadataEntry from a list of job ids for duplicate reduction. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MetadataEntry(java.lang.String url, java.lang.String mimeType, java.lang.String data)
url
- the URL assigned to this metadata (needed for it to be searchable)mimeType
- the mimeType for this metadata (normally text/plain or text/xml)data
- the metadata itself
ArgumentNotValid
- if arguments are null or empty strings,
or if argument url is not valid URL
or if argument mimeType is not valid MimeTypeMethod Detail |
---|
public static MetadataEntry makeAliasMetadataEntry(java.util.List<AliasInfo> aliases, java.lang.Long origHarvestDefinitionID, int harvestNum, java.lang.Long jobId)
aliases
- the list of aliases (possibly empty)origHarvestDefinitionID
- The harvestdefinition that is behind
the job with the given jobIdharvestNum
- The number of the harvest that the job with the given
jobid belongs tojobId
- The id of the Job, which this metadata belongs to
public static MetadataEntry makeDuplicateReductionMetadataEntry(java.util.List<java.lang.Long> jobIDsForDuplicateReduction, java.lang.Long origHarvestDefinitionID, int harvestNum, java.lang.Long jobId)
jobIDsForDuplicateReduction
- the list of jobids (possibly empty)origHarvestDefinitionID
- The harvestdefinition that is behind
the job with the given jobIdharvestNum
- The number of the harvest that the job with the given
jobid belongs tojobId
- The id of the Job, which this metadata belongs to
public byte[] getData()
public java.lang.String getMimeType()
public java.lang.String getURL()
public boolean isDuplicateReductionMetadataEntry()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |