Package org.duracloud.manifest.impl
Class ManifestFormatterBase
java.lang.Object
org.duracloud.manifest.impl.ManifestFormatterBase
- All Implemented Interfaces:
ManifestFormatter
- Direct Known Subclasses:
BagitManifestFormatter,TsvManifestFormatter
This class provides the common logic for all ManifestFormatters.
- Author:
- Andrew Woods Date: 3/29/12
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StringformatLine(String contentMd5, String spaceId, String contentId) formatLine(ContentMessage event) formatLine(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, waitMethods inherited from interface org.duracloud.manifest.ManifestFormatter
getHeader, parseLine
-
Constructor Details
-
ManifestFormatterBase
public ManifestFormatterBase()
-
-
Method Details
-
writeEventsToOutput
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
-
log
protected abstract org.slf4j.Logger log() -
formatLine
-
formatLine
Description copied from interface:ManifestFormatterFormats a manifest item into an appropriate line.- Specified by:
formatLinein interfaceManifestFormatter- Returns:
-
formatLine
-