ThinkUI SQL Client 1.1.3 API

thinkui.parser
Class ParserUtils

java.lang.Object
  extended bythinkui.parser.ParserUtils

public final class ParserUtils
extends java.lang.Object

Contains various parsing related utility methods.


Method Summary
static DataObjectParser createCSVParser(DataClass dataClass)
          Convenience method to create a comma separated values (CSV) parser for the given data class meta data.
static DataObjectParser createCustomParser(DataClass dataClass, java.lang.String parserClassName)
          Convenience method to create a custom data object parser for the given data class meta data and parser class name.
static ExcelFileParser createExcelFileParser(DataClass dataClass)
          Convenience method to create an Excel parser for the given data class meta data.
static DataObjectParser createFirstNameParser(char sex)
           
static FixedWidthDataObjectParser createFixedWidthParser(DataClass dataClass)
          Convenience method to create a fixed width parser for the given data class meta data.
static DataObjectParser createLastNameParser()
           
static DelimitedDataObjectParser createTabDelimitedParser(ColumnParseData[] parseData)
          Convenience method to create a tab delimited values parser configured with the given parse data.
static DelimitedDataObjectParser createTabDelimitedParser(DataClass dataClass)
          Convenience method to create a tab delimited values parser for the given data class meta data.
static thinkui.parser.FileParser createWebTldParser(char tldType)
           
static DataObjectParser createWordParser()
           
static void parseAttribute(java.lang.String stringValue, java.lang.String attrName, DataObject dataObject)
          Utility method to parse the given string value and populate the data object attribute value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createCSVParser

public static final DataObjectParser createCSVParser(DataClass dataClass)
Convenience method to create a comma separated values (CSV) parser for the given data class meta data.


createCustomParser

public static final DataObjectParser createCustomParser(DataClass dataClass,
                                                        java.lang.String parserClassName)
                                                 throws java.lang.Exception
Convenience method to create a custom data object parser for the given data class meta data and parser class name.

Throws:
java.lang.Exception

createExcelFileParser

public static final ExcelFileParser createExcelFileParser(DataClass dataClass)
Convenience method to create an Excel parser for the given data class meta data. The order of the attribute is used to determine the index in the spreadsheet.


createFirstNameParser

public static final DataObjectParser createFirstNameParser(char sex)

createFixedWidthParser

public static final FixedWidthDataObjectParser createFixedWidthParser(DataClass dataClass)
Convenience method to create a fixed width parser for the given data class meta data. The attribute constraints and type is used to determine the width of the field.


createLastNameParser

public static final DataObjectParser createLastNameParser()

createTabDelimitedParser

public static final DelimitedDataObjectParser createTabDelimitedParser(ColumnParseData[] parseData)
Convenience method to create a tab delimited values parser configured with the given parse data.


createTabDelimitedParser

public static final DelimitedDataObjectParser createTabDelimitedParser(DataClass dataClass)
Convenience method to create a tab delimited values parser for the given data class meta data.


createWebTldParser

public static final thinkui.parser.FileParser createWebTldParser(char tldType)

createWordParser

public static final DataObjectParser createWordParser()

parseAttribute

public static final void parseAttribute(java.lang.String stringValue,
                                        java.lang.String attrName,
                                        DataObject dataObject)
                                 throws java.lang.Exception
Utility method to parse the given string value and populate the data object attribute value.

Throws:
java.lang.Exception

ThinkUI SQL Client 1.1.3 API

Copyright © 2007-2009. ThinkUI Software Inc. All rights reserved.