SMILA 1.0 API documentation

org.eclipse.smila.importing.crawler.web.utils
Class DeltaHash

java.lang.Object
  extended by org.eclipse.smila.importing.crawler.web.utils.DeltaHash

public final class DeltaHash
extends java.lang.Object

helper class for calculating the delta hash attribute for records produced by the web-crawler.


Method Summary
static void calculate(Record record)
          determine delta hash: if content is attached, calculate a digest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

calculate

public static void calculate(Record record)
determine delta hash: if content is attached, calculate a digest. Else use the lastModified date reported by the webserver. If none is present, use size (and content-type) reported by server. Finally, if size is not set, generate a UUID as deltahash to force updating.

Please note that the record's attributes must not have been mapped before calculating the hash!


SMILA 1.0 API documentation