Package org.cdlib.mrt.core
Class Checkm
java.lang.Object
org.cdlib.mrt.core.Checkm
Dflat POST manifest row support This routine is used in conjunction with Manifest for parsing the manifest process line. This manifest is passed as part of a POST addVersion process. For this format this consists of: URL for accessing file checksum type checksum file size last modified date String (or -) if not spplied file name
- Author:
- David Loy
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumMap semantic definition to enumstatic enumSemantic prefixes used in row definitions -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected Hashtable<Checkm.ColMap, Integer> static final Stringprotected static final booleanprotected Stringprotected LoggerInfprotected Stringprotected static final Stringstatic final Stringprotected static final Stringprotected static final Stringprotected Hashtable<Integer, Checkm.ColMap> final Stringstatic final Stringprotected Hashtable<String, Checkm.Prefix> static final Stringstatic final Stringprotected String[]final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringEncode leading and trailing blanks and pipeprotected voiddumpHeaders(String msg, String[] headers) static Stringsimplied encoding that encodes a leading or trailing blank and any internal vertical barsprotected IntegergetCol(Checkm.ColMap val) From column content type get column positionstatic StringgetColumns(String header) getLine(FileComponent fileComponent) Build output manifest line from fileComponentstatic Stringstatic StringgetProfile(String header) String[]protected StringgetVal(Checkm.ColMap type, String[] items) Get content for this columnprotected StringgetValNoDec(Checkm.ColMap type, String[] items) Get value of column without decodingvoidRaise error if #%eof not found as last entry in manifestvoidhandleHeaders(String[] comments, String[] profiles) Validate Profile from external manifest headersprotected String[]protected voidsequenceColumns(String columnsS) Build tables with sequencing of known columnsprotected voidsetCol(String[] disp, Checkm.ColMap val, String value) Set col output display of content for column existsprotected voidsetHeaders(String[] comments) Process the local headers to define row organization and contentvoidsetLocalProfile(String localProfile) protected voidParse prefix linevoidsetRow(FileComponent fileComponent, String line) From manifest line parse out fileComponent elements and set those values in fileComponentstatic StringsqueezeHeader(String name, String header) protected booleantestVal(Checkm.ColMap type, String[] items) Does content for this column existprotected StringtrimBlanks(String val) trim leading and trailing blanks
-
Field Details
-
NAME
- See Also:
-
MESSAGE
- See Also:
-
OUTDELIM
- See Also:
-
SPLITDELIM
- See Also:
-
PREFIX
- See Also:
-
COLUMNS
- See Also:
-
PROFILE
- See Also:
-
NONE
- See Also:
-
DEBUG
protected static final boolean DEBUG- See Also:
-
REGISTRY
- See Also:
-
MOM
- See Also:
-
CHECKMHD
- See Also:
-
prefixTable
-
columnMap
-
orderMap
-
saveComments
-
manifestProfile
-
localProfile
-
logger
-
-
Constructor Details
-
Checkm
Constructor- Parameters:
logger- process loggermanifestComments- semantic checkm headers- Throws:
TException
-
-
Method Details
-
getSaveComments
-
handleHeaders
Validate Profile from external manifest headers- Parameters:
comments- #% comments preceding content- Throws:
TException- process exception
-
setHeaders
Process the local headers to define row organization and content- Parameters:
comments- local header- Throws:
TException
-
dumpHeaders
-
trimBlanks
trim leading and trailing blanks- Parameters:
val- item to be trimmed- Returns:
- trimmed data
-
sequenceColumns
Build tables with sequencing of known columns- Parameters:
columnsS- #%columns header- Throws:
TException- process exception
-
setPrefix
Parse prefix line- Parameters:
comment- comment line to be processed- Throws:
TException- porcess exception
-
matchPat
- Throws:
TException
-
setRow
From manifest line parse out fileComponent elements and set those values in fileComponent- Parameters:
fileComponent- target for setting valuesline- manifest line- Throws:
TException- process exception
-
testVal
Does content for this column exist- Parameters:
type- column content typeitems- parsed line content- Returns:
- true=column exists in parsed line content; false=content for column does not exist
-
getVal
Get content for this column- Parameters:
type- column content typeitems- parsed line content- Returns:
- true=column exists in parsed line content; false=content for column does not exist
-
getValNoDec
Get value of column without decoding- Parameters:
type- column type to decodeitems- manifest line columns- Returns:
- column value
-
getLine
Build output manifest line from fileComponent- Parameters:
fileComponent- file component to convert to manifest line- Returns:
- manifest line
- Throws:
TException- process exception
-
setCol
Set col output display of content for column exists- Parameters:
disp- columnsval- content typevalue- value to be set- Throws:
TException- process exception
-
getCol
From column content type get column position- Parameters:
val- column content type- Returns:
- position in manifest line for this content
- Throws:
TException- process exception
-
enc
simplied encoding that encodes a leading or trailing blank and any internal vertical bars- Parameters:
in- data to be encoded- Returns:
- encoded data
-
dec
Encode leading and trailing blanks and pipe- Parameters:
in- data to be decoded- Returns:
- decoded data
-
handleEOF
Raise error if #%eof not found as last entry in manifest- Parameters:
prevLine- last line of manifest- Throws:
TException
-
getLocalProfile
-
setLocalProfile
-
getProfile
- Throws:
TException
-
getColumns
- Throws:
TException
-
getPrefix
- Throws:
TException
-
squeezeHeader
- Throws:
TException
-