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 enum
Map semantic definition to enumstatic enum
Semantic prefixes used in row definitions -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
protected Hashtable<Checkm.ColMap,
Integer> static final String
protected static final boolean
protected String
protected LoggerInf
protected String
protected static final String
static final String
protected static final String
protected static final String
protected Hashtable<Integer,
Checkm.ColMap> final String
static final String
protected Hashtable<String,
Checkm.Prefix> static final String
static final String
protected String[]
final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Encode leading and trailing blanks and pipeprotected void
dumpHeaders
(String msg, String[] headers) static String
simplied encoding that encodes a leading or trailing blank and any internal vertical barsprotected Integer
getCol
(Checkm.ColMap val) From column content type get column positionstatic String
getColumns
(String header) getLine
(FileComponent fileComponent) Build output manifest line from fileComponentstatic String
static String
getProfile
(String header) String[]
protected String
getVal
(Checkm.ColMap type, String[] items) Get content for this columnprotected String
getValNoDec
(Checkm.ColMap type, String[] items) Get value of column without decodingvoid
Raise error if #%eof not found as last entry in manifestvoid
handleHeaders
(String[] comments, String[] profiles) Validate Profile from external manifest headersprotected String[]
protected void
sequenceColumns
(String columnsS) Build tables with sequencing of known columnsprotected void
setCol
(String[] disp, Checkm.ColMap val, String value) Set col output display of content for column existsprotected void
setHeaders
(String[] comments) Process the local headers to define row organization and contentvoid
setLocalProfile
(String localProfile) protected void
Parse prefix linevoid
setRow
(FileComponent fileComponent, String line) From manifest line parse out fileComponent elements and set those values in fileComponentstatic String
squeezeHeader
(String name, String header) protected boolean
testVal
(Checkm.ColMap type, String[] items) Does content for this column existprotected String
trimBlanks
(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
-