Package org.cdlib.mrt.core
Class Manifest
java.lang.Object
org.cdlib.mrt.core.Manifest
- All Implemented Interfaces:
 Enumeration
Generalized line based processor where each line is some
 functional unit.
 Routine supports the reading and writing of manifest files
- Author:
 - David Loy
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BufferedReaderprotected booleanprotected Stringprotected LoggerInfprotected OutputStreamWriterprotected static final Stringprotected static final Stringprotected static final Stringprotected Stringprotected Stringprotected ManifestRowInf - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidclose output streamstatic ManifestgetManifest(LoggerInf logger, String profile, ManifestRowAbs.ManifestType rowType) Manifest Factorystatic ManifestgetManifest(LoggerInf logger, ManifestRowAbs.ManifestType rowType) Manifest FactoryEnumeration handlinggetRows(InputStream inputStream) Enumeration handlingbooleanMore manifest lines to be processedstatic voidMain methodReturn manifest row handling objectvoidopenOutput(File outputManifestFile) Output file to write new manifestvoidopenOutput(OutputStream outputStream) Use output stream for writing out manifestprotected voidSet manifest file as saved buffered readerprotected voidsetInputStream(InputStream inStream) Convert input stream to buffered readerprotected static voidprotected static voidvoidWrite this line to outputvoidwrite(ManifestRowInf row) Write a line to output manifestvoidwriteEOF()voidvoidwriteLines(String[] lines) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Enumeration
asIterator 
- 
Field Details
- 
NAME
- See Also:
 
 - 
MESSAGE
- See Also:
 
 - 
MANIFESTEOF
- See Also:
 
 - 
prefix
 - 
rowFactory
 - 
br
 - 
m_ow
 - 
logger
 - 
line
 - 
prevLine
 - 
eof
protected boolean eof 
 - 
 - 
Constructor Details
- 
Manifest
Constructor- Parameters:
 logger- process loggerrowFactory- row handling object- Throws:
 TException- process exception
 
 - 
 - 
Method Details
- 
getManifest
public static Manifest getManifest(LoggerInf logger, ManifestRowAbs.ManifestType rowType) throws TException Manifest Factory- Parameters:
 logger- process loggerrowType- row handler- Returns:
 - Manifest object using specific row handler
 - Throws:
 TException
 - 
getManifest
public static Manifest getManifest(LoggerInf logger, String profile, ManifestRowAbs.ManifestType rowType) throws TException Manifest Factory- Parameters:
 logger- process loggerrowType- row handler- Returns:
 - Manifest object using specific row handler
 - Throws:
 TException
 - 
getRows
Enumeration handling- Parameters:
 inputManifestFile- line based manifest file- Returns:
 - Enumeration object
 - Throws:
 TException
 - 
getRows
Enumeration handling- Parameters:
 inputStream- input stream to line based manifest file- Returns:
 - Enumeration object
 - Throws:
 TException
 - 
hasMoreElements
public boolean hasMoreElements()More manifest lines to be processed- Specified by:
 hasMoreElementsin interfaceEnumeration- Returns:
 - true=more lines to process, false=no more lines to process
 
 - 
nextElement
Return manifest row handling object- Specified by:
 nextElementin interfaceEnumeration- Returns:
 - row handling object
 
 - 
setFile
Set manifest file as saved buffered reader- Parameters:
 manifestFile- manifest file used for manifest processing- Throws:
 TException- process exception
 - 
setInputStream
Convert input stream to buffered reader- Parameters:
 inStream- input stream for manifest processing- Throws:
 TException
 - 
openOutput
Output file to write new manifest- Parameters:
 outputManifestFile- write to this file- Throws:
 TException- process exception
 - 
openOutput
Use output stream for writing out manifest- Parameters:
 outputStream- output manifest stream- Throws:
 TException- process exception
 - 
write
Write a line to output manifest- Parameters:
 row- row handler for formatting line for output- Throws:
 TException- process exception
 - 
write
Write this line to output- Parameters:
 localLine- formatted line to write to manifest- Throws:
 TException
 - 
writeHeaders
- Throws:
 TException
 - 
writeEOF
- Throws:
 TException
 - 
writeLines
- Throws:
 TException
 - 
closeOutput
public void closeOutput()close output stream - 
main
Main method - 
testInput
- Throws:
 Exception
 - 
testCopy
- Throws:
 Exception
 
 -