|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.semanticdesktop.aperture.crawler.base.CrawlReportBase
public class CrawlReportBase
A trivial implementation of the CrawlReport interface. This class provides additional support for writing the contents of the CrawlReport to a XML file.
Field Summary | |
---|---|
static String |
CHANGED_COUNT_TAG
tag containing the number of changed objects |
static String |
COMPLETED_VALUE
constant used to signify a successfully completed crawl |
static String |
CRAWL_REPORT_TAG
main CrawlReport XML tag |
static String |
CRAWL_STARTED_TAG
Crawl started tag - contains the date and time when the crawl has been started |
static String |
CRAWL_STOPPED_TAG
Crawl stopped tag - contains the date and time when the crawl has been stopped |
static String |
EXIT_CODE_TAG
Exit code tag - contains the exit code |
static String |
FATAL_ERROR_VALUE
constant used to signify a crawl interrupted due to a fatal error |
static String |
NEW_COUNT_TAG
tag containing the number of new objects |
static String |
REMOVED_COUNT_TAG
tag containing the number of removed objects |
static String |
STOP_REQUESTED_VALUE
constant used to signify a crawl that has been interrupted by the user |
static String |
UNCHANGED_COUNT_TAG
tag containing the number of unchanged objects |
static String |
VERSION_ATTR
crawl report version XML attribute |
Constructor Summary | |
---|---|
CrawlReportBase()
Default constructor |
Method Summary | |
---|---|
int |
getChangedCount()
Returns the number of changed data objects encountered so far. |
long |
getCrawlStarted()
Returns when the crawl was started, encoded in the typical milliseconds style. |
long |
getCrawlStopped()
Returns when the crawl stopped. |
ExitCode |
getExitCode()
Returns the status with which the crawl completed. |
Throwable |
getFatalErrorCause()
Returns the Throwable that caused the fatal error during crawl. |
int |
getNewCount()
Returns the number of new data objects encountered so far. |
int |
getRemovedCount()
Returns the number of removed data objects encountered so far. |
int |
getTotalCount()
Gets the total amount of items processed in the last crawl, i.e. the sum of the number of new, changed and unchanged items. |
int |
getUnchangedCount()
Returns the number of unchanged data objects encountered so far. |
void |
increaseChangedCount()
|
void |
increaseNewCount()
|
void |
increaseRemovedCount()
|
void |
increaseUnchangedCount()
|
void |
read(InputStream stream)
|
void |
setChangedCount(int changedCount)
|
void |
setCrawlStarted(long crawlStarted)
|
void |
setCrawlStopped(long crawlStopped)
|
void |
setExitCode(ExitCode exitCode)
|
void |
setFatalErrorCause(Throwable fatalErrorCause)
|
void |
setNewCount(int newCount)
|
void |
setRemovedCount(int removedCount)
|
void |
setUnchangedCount(int unchangedCount)
|
String |
toString()
|
void |
write(OutputStream stream)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String CRAWL_REPORT_TAG
public static final String VERSION_ATTR
public static final String CRAWL_STARTED_TAG
public static final String CRAWL_STOPPED_TAG
public static final String EXIT_CODE_TAG
public static final String COMPLETED_VALUE
public static final String STOP_REQUESTED_VALUE
public static final String FATAL_ERROR_VALUE
public static final String NEW_COUNT_TAG
public static final String CHANGED_COUNT_TAG
public static final String REMOVED_COUNT_TAG
public static final String UNCHANGED_COUNT_TAG
Constructor Detail |
---|
public CrawlReportBase()
Method Detail |
---|
public void setCrawlStarted(long crawlStarted)
public long getCrawlStarted()
CrawlReport
getCrawlStarted
in interface CrawlReport
public void setCrawlStopped(long crawlStopped)
public long getCrawlStopped()
CrawlReport
getCrawlStopped
in interface CrawlReport
public void setExitCode(ExitCode exitCode)
public ExitCode getExitCode()
CrawlReport
getExitCode
in interface CrawlReport
public void setNewCount(int newCount)
public void increaseNewCount()
public int getNewCount()
CrawlReport
getNewCount
in interface CrawlReport
public void setChangedCount(int changedCount)
public void increaseChangedCount()
public int getChangedCount()
CrawlReport
getChangedCount
in interface CrawlReport
public void setRemovedCount(int removedCount)
public void increaseRemovedCount()
public int getRemovedCount()
CrawlReport
getRemovedCount
in interface CrawlReport
public Throwable getFatalErrorCause()
CrawlReport
CrawlReport.getExitCode()
returns ExitCode.FATAL_ERROR
.
getFatalErrorCause
in interface CrawlReport
public void setFatalErrorCause(Throwable fatalErrorCause)
public void setUnchangedCount(int unchangedCount)
public void increaseUnchangedCount()
public int getUnchangedCount()
CrawlReport
getUnchangedCount
in interface CrawlReport
public int getTotalCount()
public String toString()
toString
in class Object
public void write(OutputStream stream) throws IOException
IOException
public void read(InputStream stream) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |