|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.harvester.harvesting.HeritrixFiles
public class HeritrixFiles
This class encapsulates all the files that Heritrix gets from our system, and all files we read from Heritrix.
Constructor Summary | |
---|---|
HeritrixFiles(java.io.File crawlDir,
long jobID,
long harvestID)
Alternate constructor that by default reads the jmxPasswordFile, and jmxAccessFile from the current settings. |
|
HeritrixFiles(java.io.File crawlDir,
long jobID,
long harvestID,
java.io.File jmxPasswordFile,
java.io.File jmxAccessFile)
Create a new HeritrixFiles object for a job. |
Method Summary | |
---|---|
void |
cleanUpAfterHarvest(java.io.File oldJobsDir)
Delete statefile etc. |
void |
deleteFinalLogs()
Helper method to delete the crawl.log and progress statistics log. |
java.lang.String |
getArcFilePrefix()
Returns the prefix used to generate ARC files. |
java.io.File |
getArcsDir()
Return the directory, where Heritrix writes its arcfiles. |
java.io.File |
getCrawlDir()
Returns the directory that crawls are performed inside. |
java.io.File |
getCrawlLog()
Retrieve the crawlLog as a File object. |
java.io.File[] |
getDisposableFiles()
Return a list of disposable heritrix-files. |
java.lang.Long |
getHarvestID()
Get the harvest ID. |
java.io.File |
getHeritrixOutput()
Get the file that contains output from Heritrix on stdout/stderr. |
java.io.File |
getIndexDir()
Returns the index directory, if one has been set. |
java.io.File |
getJmxAccessFile()
Method for retrieving the jmxremote.access file. |
java.io.File |
getJmxPasswordFile()
Method for retrieving the jmxremote.password file. |
java.lang.Long |
getJobID()
Get the job ID. |
java.io.File |
getOrderXmlFile()
Returns the order.xml file object. |
java.io.File |
getProgressStatisticsLog()
Retrieve the progress statistics log as a File object. |
java.io.File |
getSeedsTxtFile()
Returns the seeds.txt file object. |
void |
setIndexDir(java.io.File indexDir)
Set the deduplicate index dir. |
void |
writeOrderXml(org.dom4j.Document doc)
Writes the given order.xml content to the order.xml file. |
void |
writeSeedsTxt(java.lang.String seeds)
Writes the given content to the seeds.txt file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HeritrixFiles(java.io.File crawlDir, long jobID, long harvestID, java.io.File jmxPasswordFile, java.io.File jmxAccessFile)
crawlDir
- The dir, where the crawl-files are placed.
Assumes, that crawlDir exists already.jobID
- The JobID of this crawl.harvestID
- The harvestID of this crawl.jmxPasswordFile
- The jmx password file to be used by Heritrix.
The existence of this file is checked another place.jmxAccessFile
- The JMX access file to be used by Heritrix.
The existence of this file is checked another place.
ArgumentNotValid
- if null crawlDir,
or non-positive jobID and harvestID.public HeritrixFiles(java.io.File crawlDir, long jobID, long harvestID)
crawlDir
- The dir, where the crawl-files are placedjobID
- The JobID of this crawl.harvestID
- The harvestID of this crawl.Method Detail |
---|
public java.io.File getCrawlDir()
public java.lang.String getArcFilePrefix()
public java.io.File getOrderXmlFile()
public java.io.File getSeedsTxtFile()
public void writeSeedsTxt(java.lang.String seeds)
seeds
- The intended content of seeds.txt
ArgumentNotValid
- if seeds is null or emptypublic void writeOrderXml(org.dom4j.Document doc)
doc
- The intended content of order.xml
ArgumentNotValid,
- if doc is null or emptypublic java.io.File getHeritrixOutput()
public void setIndexDir(java.io.File indexDir)
indexDir
- the cache dir containing unzipped files
ArgumentNotValid
- if indexDir is not a directory or is nullpublic java.io.File getIndexDir()
public java.io.File[] getDisposableFiles()
public java.io.File getCrawlLog()
public java.io.File getProgressStatisticsLog()
public java.lang.Long getJobID()
public java.lang.Long getHarvestID()
public void cleanUpAfterHarvest(java.io.File oldJobsDir)
oldJobsDir
- Directory to move the rest of any existing files to.public void deleteFinalLogs()
public java.io.File getArcsDir()
public java.io.File getJmxPasswordFile()
public java.io.File getJmxAccessFile()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |