|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.harvester.datamodel.TemplateDAO dk.netarkivet.harvester.datamodel.TemplateDBDAO
public class TemplateDBDAO
Implements the TemplateDAO with databases. The statements to create the tables are now in scripts/sql/createfullhddb.sql
Constructor Summary | |
---|---|
TemplateDBDAO()
Default constructor. |
Method Summary | |
---|---|
void |
create(java.lang.String orderXmlName,
HeritrixTemplate orderXml)
Create a template. |
boolean |
exists(java.lang.String orderXmlName)
Return true if the database contains a template with the given name. |
java.util.Iterator<java.lang.String> |
getAll()
Returns an iterator with all names of order.xml-templates. |
HeritrixTemplate |
read(java.lang.String orderXmlName)
Read an XML order file for the named order XML. |
void |
update(java.lang.String orderXmlName,
HeritrixTemplate orderXml)
Update a template. |
Methods inherited from class dk.netarkivet.harvester.datamodel.TemplateDAO |
---|
getInstance, iterator, resetSingleton |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
TemplateDBDAO()
Method Detail |
---|
public HeritrixTemplate read(java.lang.String orderXmlName)
read
in class TemplateDAO
orderXmlName
- The name of the order.xml document
public java.util.Iterator<java.lang.String> getAll()
getAll
in class TemplateDAO
public boolean exists(java.lang.String orderXmlName)
exists
in class TemplateDAO
orderXmlName
- Name of an order.xml template (without .xml).
ArgumentNotValid
- If the orderXmlName is null or an empty Stringpublic void create(java.lang.String orderXmlName, HeritrixTemplate orderXml)
create
in class TemplateDAO
orderXmlName
- Name of the template.orderXml
- XML documents that is a Heritrix order.xml template.
ArgumentNotValid
- If the orderXmlName is null or an empty String,
or the orderXml is null.public void update(java.lang.String orderXmlName, HeritrixTemplate orderXml)
update
in class TemplateDAO
orderXmlName
- Name of the template.orderXml
- XML document that is a Heritrix order.xml template.
PermissionDenied
- If the template does not exist
IOFailure
- If the template could not be
ArgumentNotValid
- If the orderXmlName is null or an empty String,
or the orderXml is null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |