Part of [HER-1603] Restletify: xml representations of all resources that also

offer html
* XmlMarshaller.java
    new class to write xml based on nested map structure
* BeanBrowseResource.java ScriptResource.java EngineResource.java
  JobResource.java JobRelatedResource.java
    support xml representation
* WorkQueueFrontier.java PrecedenceProvider.java WorkQueue.java ToeThread.java
  ToePool.java CrawlJob.java Engine.java Frontier.java CrawlController.java
  StatisticsTracker.java CrawledBytesHistotable.java FetchStats.java
  ProcessorChain.java CrawlURI.java Reporter.java
    offer same data that is returned in the single line reports in a map
    suitable for use with XmlMarshaller
* FileUtils.java
    new method tryToCanonicalize(File)
This commit is contained in:
nlevitt committed 2009-11-25 01:43:57 +00:00
1 parent a1022c8246
commit 8ba641ed4b
24 files changed
+971 -58

No files matched your search

@@ -551,7 +551,7 @@ public class ArchiveUtils {
/**
* Convert milliseconds value to a human-readable duration
* @param time
* @param toMs whether to print to the ms
* @param toMs ignored
* @return Human readable string version of passed <code>time</code>
*/
public static String formatMillisecondsToConventional(long time, boolean toMs) {
@@ -698,4 +698,12 @@ public class FileUtils {
return dir;
}
public static File tryToCanonicalize(File file) {
try {
return file.getCanonicalFile();
} catch (IOException e) {
return file;
}
}
}
@@ -21,6 +21,7 @@ package org.archive.util;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Map;
public interface Reporter {
/**
@@ -38,6 +39,13 @@ public interface Reporter {
*/
public void singleLineReportTo(PrintWriter pw) throws IOException;
/**
* @return Same data that's in the single line report, as key-value pairs
*/
public Map<String,Object> singleLineReportData();
/**
* Return a legend for the single-line summary report as a String.
*