dk.netarkivet.harvester.datamodel
Class HeritrixTemplate

java.lang.Object
  extended by dk.netarkivet.harvester.datamodel.HeritrixTemplate

public class HeritrixTemplate
extends java.lang.Object

Class encapsulating the Heritrix order.xml. Enables verification that dom4j Document obey the constraints required by our software, specifically the Job class.


Field Summary
static java.lang.String ExcludeFilterMapXpath
          Xpath needed by Job.editOrderXML_crawlerTraps().
static java.lang.String GroupMaxAllKbXpath
          Xpath needed by Job.editOrderXML_maxBytesPerDomain().
static java.lang.String QueueTotalBudgetXpath
          Xpath needed by Job.editOrderXML_maxObjectsPerDomain().
 
Constructor Summary
HeritrixTemplate(org.dom4j.Document doc)
          Alternate constructor, which always verifies the given document.
HeritrixTemplate(org.dom4j.Document doc, boolean verify)
          Constructor for HeritrixTemplate class.
 
Method Summary
 org.dom4j.Document getTemplate()
           
 java.lang.String getXML()
          Return HeritrixTemplate as XML.
 boolean isVerified()
          Has Template been verified?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QueueTotalBudgetXpath

public static final java.lang.String QueueTotalBudgetXpath
Xpath needed by Job.editOrderXML_maxObjectsPerDomain().

See Also:
Constant Field Values

GroupMaxAllKbXpath

public static final java.lang.String GroupMaxAllKbXpath
Xpath needed by Job.editOrderXML_maxBytesPerDomain().

See Also:
Constant Field Values

ExcludeFilterMapXpath

public static final java.lang.String ExcludeFilterMapXpath
Xpath needed by Job.editOrderXML_crawlerTraps().

See Also:
Constant Field Values
Constructor Detail

HeritrixTemplate

public HeritrixTemplate(org.dom4j.Document doc,
                        boolean verify)
Constructor for HeritrixTemplate class.

Parameters:
doc - the order.xml
verify - If true, verifies if the given dom4j Document contains the elements required by our software.
Throws:
ArgumentNotValid - if doc is null, or verify is true and doc does not obey the constraints required by our software.

HeritrixTemplate

public HeritrixTemplate(org.dom4j.Document doc)
Alternate constructor, which always verifies the given document.

Parameters:
doc -
Method Detail

getTemplate

public org.dom4j.Document getTemplate()
Returns:
the template

isVerified

public boolean isVerified()
Has Template been verified?

Returns:
true, if verified on construction, otherwise false

getXML

public java.lang.String getXML()
Return HeritrixTemplate as XML.

Returns:
HeritrixTemplate as XML