Package org.duracloud.manifest.impl
Class ManifestFormatterBase
- java.lang.Object
-
- org.duracloud.manifest.impl.ManifestFormatterBase
-
- All Implemented Interfaces:
ManifestFormatter
- Direct Known Subclasses:
BagitManifestFormatter,TsvManifestFormatter
public abstract class ManifestFormatterBase extends Object implements ManifestFormatter
This class provides the common logic for all ManifestFormatters.- Author:
- Andrew Woods Date: 3/29/12
-
-
Constructor Summary
Constructors Constructor Description ManifestFormatterBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StringformatLine(String contentMd5, String spaceId, String contentId)StringformatLine(ContentMessage event)StringformatLine(org.duracloud.mill.db.model.ManifestItem item)Formats a manifest item into an appropriate line.protected abstract org.slf4j.Loggerlog()voidwriteEventsToOutput(Collection<ContentMessage> events, OutputStream output)This method writes the arg events to the arg output stream.protected voidwriteHeader(OutputStream output)voidwriteManifestItemToOutput(org.duracloud.mill.db.model.ManifestItem item, OutputStream output)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.duracloud.manifest.ManifestFormatter
getHeader, parseLine
-
-
-
-
Method Detail
-
writeEventsToOutput
public void writeEventsToOutput(Collection<ContentMessage> events, OutputStream output)
Description copied from interface:ManifestFormatterThis method writes the arg events to the arg output stream.- Specified by:
writeEventsToOutputin interfaceManifestFormatter- Parameters:
events- to writeoutput- destination of formatted events
-
writeManifestItemToOutput
public void writeManifestItemToOutput(org.duracloud.mill.db.model.ManifestItem item, OutputStream output)- Specified by:
writeManifestItemToOutputin interfaceManifestFormatter- Parameters:
item- to writeoutput- destination of formatted items. Null manifest items are ignored.
-
writeHeader
protected void writeHeader(OutputStream output)
-
log
protected abstract org.slf4j.Logger log()
-
formatLine
public String formatLine(ContentMessage event)
-
formatLine
public String formatLine(org.duracloud.mill.db.model.ManifestItem item)
Description copied from interface:ManifestFormatterFormats a manifest item into an appropriate line.- Specified by:
formatLinein interfaceManifestFormatter- Returns:
-
-