dk.netarkivet.common.utils
Class FileUtils.FilenameParser

java.lang.Object
  extended by dk.netarkivet.common.utils.FileUtils.FilenameParser
Enclosing class:
FileUtils

public static class FileUtils.FilenameParser
extends java.lang.Object

A class for parsing an ARC filename as generated by our runs of Heritrix and retrieving components like harvestID and jobID. See HeritrixLauncher.getCrawlID for where the format gets defined.


Constructor Summary
FileUtils.FilenameParser(java.io.File file)
          Parses the name of the given file.
 
Method Summary
 java.lang.String getFilename()
          Get the filename.
 java.lang.String getHarvestID()
          Get the harvestID.
 java.lang.String getJobID()
          Get the job ID.
 java.lang.String getSerialNo()
          Get the serial number.
 java.lang.String getTimeStamp()
          Get the timestamp.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtils.FilenameParser

public FileUtils.FilenameParser(java.io.File file)
                         throws UnknownID
Parses the name of the given file.

Parameters:
file - An ARC/CDX file named following the NetarchiveSuite convention.
Throws:
UnknownID - if the file was NOT named following NetarchiveSuite convention; or any other exception occurred
Method Detail

getHarvestID

public java.lang.String getHarvestID()
Get the harvestID.

Returns:
the harvestID.

getJobID

public java.lang.String getJobID()
Get the job ID.

Returns:
the Job ID.

getTimeStamp

public java.lang.String getTimeStamp()
Get the timestamp.

Returns:
the timestamp.

getSerialNo

public java.lang.String getSerialNo()
Get the serial number.

Returns:
the serial number.

getFilename

public java.lang.String getFilename()
Get the filename.

Returns:
the filename.