public class UniFormatParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CATALOG_TAG |
static java.lang.String |
ITEM_GROUP_TAG |
static int |
LEVEL_1 |
static int |
LEVEL_2 |
static int |
LEVEL_3 |
static int |
LEVEL_4 |
static java.lang.String |
NAME_TAG |
static java.lang.String |
SHEET_UNIFORMAT |
static java.lang.String |
TITLE_LEVEL_1 |
static java.lang.String |
TITLE_LEVEL_2 |
static java.lang.String |
TITLE_LEVEL_3 |
static java.lang.String |
TITLE_LEVEL_4 |
static java.lang.String |
TITLE_LEVEL_5 |
static java.lang.String |
TITLE_LEVEL_6 |
static java.lang.String |
TITLE_LEVEL_7 |
static java.lang.String |
WBS_TAG |
Constructor and Description |
---|
UniFormatParser(MessageLogger logger,
java.lang.String fileName) |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
buildLevelOneTree(UniFormat parentClass,
java.lang.String[] values,
int idx_level) |
java.lang.String[] |
buildLevelThreeTree(UniFormat parentClass,
java.lang.String[] values,
int idx_level) |
java.lang.String[] |
buildLevelTwoTree(UniFormat parentClass,
java.lang.String[] values,
int idx_level) |
UniFormat |
buildUniformatClass(int idx_level,
java.lang.String[] values,
int level)
Build Uniformat object for xls data
|
UniFormat |
buildUniformatXMLClass(XmlnputTokenizer _tokenizer,
int level,
java.util.HashMap<java.lang.Integer,java.lang.String> wbs)
Build Uniformat object for XML data
|
void |
execute() |
UniFormat |
getRootClass() |
static void |
main(java.lang.String[] args) |
java.lang.String[] |
parseHeaderRow(java.lang.String[] values)
set the column index for each level
|
java.lang.String[] |
parseUniFormat(UniFormat parentClass,
java.lang.String[] values)
Parse Uniformat Exel sheet and build Uniformat Tree object structure
|
java.lang.String[] |
validateHeaderRow(java.lang.String[] values)
This method will check for poorly formatted header row and
return the valid row for processing the header row index.
|
public static final java.lang.String TITLE_LEVEL_1
public static final java.lang.String TITLE_LEVEL_2
public static final java.lang.String TITLE_LEVEL_3
public static final java.lang.String TITLE_LEVEL_4
public static final java.lang.String TITLE_LEVEL_5
public static final java.lang.String TITLE_LEVEL_6
public static final java.lang.String TITLE_LEVEL_7
public static final int LEVEL_1
public static final int LEVEL_2
public static final int LEVEL_3
public static final int LEVEL_4
public static final java.lang.String SHEET_UNIFORMAT
public static final java.lang.String CATALOG_TAG
public static final java.lang.String ITEM_GROUP_TAG
public static final java.lang.String WBS_TAG
public static final java.lang.String NAME_TAG
public UniFormatParser(MessageLogger logger, java.lang.String fileName)
public void execute() throws java.lang.Exception
java.lang.Exception
public UniFormat getRootClass()
public java.lang.String[] parseUniFormat(UniFormat parentClass, java.lang.String[] values) throws java.io.IOException, ParseException
parentClass
- values
- java.io.IOException
ParseException
public java.lang.String[] buildLevelOneTree(UniFormat parentClass, java.lang.String[] values, int idx_level) throws java.io.IOException, ParseException
java.io.IOException
ParseException
public java.lang.String[] buildLevelTwoTree(UniFormat parentClass, java.lang.String[] values, int idx_level) throws java.io.IOException, ParseException
java.io.IOException
ParseException
public java.lang.String[] buildLevelThreeTree(UniFormat parentClass, java.lang.String[] values, int idx_level) throws java.io.IOException, ParseException
java.io.IOException
ParseException
public java.lang.String[] validateHeaderRow(java.lang.String[] values) throws java.io.IOException, ParseException
values
- java.io.IOException
ParseException
public java.lang.String[] parseHeaderRow(java.lang.String[] values) throws java.io.IOException, ParseException
ParseException
java.io.IOException
public UniFormat buildUniformatClass(int idx_level, java.lang.String[] values, int level)
idx_level
- values
- public UniFormat buildUniformatXMLClass(XmlnputTokenizer _tokenizer, int level, java.util.HashMap<java.lang.Integer,java.lang.String> wbs)
_tokenizer
- level
- public static void main(java.lang.String[] args) throws java.io.FileNotFoundException
java.io.FileNotFoundException