Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.makumba.providers.datadefinition.makumba
Class RecordParser

    java.lang.Object
      org.makumba.providers.datadefinition.makumba.RecordParser

    public class RecordParser

extends Object

Field Summary
`(package private) FieldCursor` | `currentRowCursor`
`(package private) RecordInfo` | `dd`
`(package private) Properties` | `definedTypes`
`(package private) OrderedProperties` | `fields`
`static String` | `funcDefParamRegExp` defines "int a" or "int 5".
`static String` | `funcDefParamRepeatRegExp` treats (int a, char b, ...)
`static String` | `funcDefParamTypeRegExp` defines all possible types.
`static String` | `funcDefParamValueRegExp`
`static Pattern` | `funcDefPattern`
`static String` | `funcDefRegExp` treats function(params) { queryFragment } errorMessage.
`(package private) HashMap<String,DataDefinition.QueryFragmentFunction>` | `funcNames`
`static Pattern` | `ident`
`(package private) DataDefinitionParseError` | `mpe`
`static Pattern` | `multiUniquePattern`
`static String` | `multiUniqueRegExp`
`static String` | `multiUniqueRegExpElement`
`static String` | `multiUniqueRegExpElementRepeatment`
`(package private) HashMap<String,RecordParser>` | `ptrOne_RecordParsers`
`(package private) HashMap<String,DataDefinition>` | `setParser_settbls`
`(package private) OrderedProperties` | `subfields`
`(package private) HashMap<String,RecordInfo>` | `subtableParser_here`
`(package private) HashMap<String,RecordInfo>` | `subtableParser_subtables`
`(package private) OrderedProperties` | `text`
`static String` | `VALIDATION_INDICATOR`
`static Pattern` | `validationDefinitionPattern`
`static String` | `validationDefinitionRegExp`
`static String` | `validationRuleErrorMessageSeparatorChar`

Constructor Summary
`RecordParser()`
`RecordParser(RecordInfo dd, RecordParser rp)`

Method Summary
`(package private) String` | `acceptTitle(String fieldName, String nm, String origNm, String val, Object o)`
`(package private) String` | `add_ptr_Text(String fieldName, String nm, String origNm, String val)`
`(package private) String` | `add_ptrOne_Text(String fieldName, String nm, String origNm, String val)`
`(package private) String` | `add_set_Text(String fieldName, String nm, String origNm, String val)`
`(package private) String` | `addPtr(String fieldName, String name, DataDefinition o)`
`(package private) String` | `addPtrHere(String fieldName)`
`(package private) String` | `addText(String fieldName, String nm, String origNm, String val)`
`(package private) String` | `base_addText(String fieldName, String nm, String origNm, String val)`
`void` | `char_parse1(String fieldName, FieldCursor fc)`
`void` | `charEnum_parse1(String fieldName, FieldCursor fc)`
`(package private) void` | `compileFunctions()`
`(package private) void` | `configSubfields()`
`(package private) String` | `enumSet(String fieldName, FieldCursor fc, String word)`
`(package private) DataDefinitionParseError` | `fail(IOException ioe)`
`(package private) DataDefinitionParseError` | `fail(String why, String where)`
`static URL` | `findDataDefinition(String s, String ext)`
`static URL` | `findDataDefinitionOrDirectory(String s, String ext)` Looks up a data definition.
`(package private) FieldInfo` | `getFieldInfo(String fieldName)`
`(package private) static URL` | `getResource(String s)`
`void` | `int_parse1(String fieldName, FieldCursor fc)`
`void` | `intEnum_parse1(String fieldName, FieldCursor fc)`
`static boolean` | `isFunction(String s)`
`static boolean` | `isValidationRule(String s)`
`static void` | `main(String[] args)`
`(package private) static String` | `makeLine(OrderedProperties p, String k)`
`(package private) static String` | `makeLine(String origKey, String value)`
`(package private) void` | `makeSubtable(String fieldName, FieldCursor fc)`
`(package private) boolean` | `matchFunction(String line)`
`void` | `parse_ptrOne_Subfields(String fieldName)`
`void` | `parse_set_Subfields(String fieldName)`
`(package private) void` | `parse()`
`(package private) void` | `parse(RecordInfo dd)`
`(package private) RecordInfo` | `parse(String txt)`
`(package private) void` | `parse(String fieldName, FieldCursor fc)`
`(package private) DataDefinition` | `parse(URL u, String path)`
`(package private) void` | `parse1(String fieldName, FieldCursor fc)` switch for the existing parse methods. set the field type to another value if we want to change it
`void` | `parseFile(String fieldName, FieldCursor fc)`
`void` | `parseSubfields(String fieldName)`
`void` | `parseValidationDefinition()`
`void` | `ptr_parse1(String fieldName, FieldCursor fc)`
`void` | `ptrOne_parse1(String fieldName, FieldCursor fc)`
`(package private) void` | `read(OrderedProperties op, BufferedReader rd)`
`(package private) void` | `read(OrderedProperties op, String txt)`
`(package private) void` | `read(OrderedProperties op, URL u)`
`(package private) void` | `readTypes()`
`(package private) void` | `separateFields()`
`void` | `set_parse1(String fieldName, FieldCursor fc)`
`void` | `setCharEnum_parse1(String fieldName, FieldCursor fc)`
`void` | `setComplex_parse1(String fieldName, FieldCursor fc)`
`void` | `setIntEnum_parse1(String fieldName, FieldCursor fc)`
`(package private) void` | `setTitle()`
`(package private) String` | `setType(String fieldName, String type, FieldCursor fc)`
`void` | `simple_parse1(String fieldName, FieldCursor fc)`
`(package private) void` | `solveIncludes()`
`void` | `text_parse1(String fieldName, FieldCursor fc)`
`(package private) void` | `treatMyFields()`
`(package private) void` | `treatSubfields()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### VALIDATION_INDICATOR

    public static final String VALIDATION_INDICATOR

See Also:
  Constant Field Values

### multiUniqueRegExpElement

    public static final String multiUniqueRegExpElement

See Also:
  Constant Field Values

### multiUniqueRegExpElementRepeatment

    public static final String multiUniqueRegExpElementRepeatment

See Also:
  Constant Field Values

### multiUniqueRegExp

    public static final String multiUniqueRegExp

See Also:
  Constant Field Values

### multiUniquePattern

    public static final Pattern multiUniquePattern

### validationRuleErrorMessageSeparatorChar

    public static final String validationRuleErrorMessageSeparatorChar

See Also:
  Constant Field Values

### validationDefinitionRegExp

    public static final String validationDefinitionRegExp

See Also:
  Constant Field Values

### validationDefinitionPattern

    public static final Pattern validationDefinitionPattern

### funcDefParamTypeRegExp

    public static final String funcDefParamTypeRegExp

  defines all possible types.
  FIXME: maybe this shall be move to `FieldDefinition`?

  See Also:
    Constant Field Values

### funcDefParamValueRegExp

    public static final String funcDefParamValueRegExp

See Also:
  Constant Field Values

### funcDefParamRegExp

    public static final String funcDefParamRegExp

  defines "int a" or "int 5".

  See Also:
    Constant Field Values

### funcDefParamRepeatRegExp

    public static final String funcDefParamRepeatRegExp

  treats (int a, char b, ...)

  See Also:
    Constant Field Values

### funcDefRegExp

    public static final String funcDefRegExp

  treats function(params) { queryFragment } errorMessage.

  See Also:
    Constant Field Values

### funcDefPattern

    public static final Pattern funcDefPattern

### ident

    public static final Pattern ident

### text

    OrderedProperties text

### fields

    OrderedProperties fields

### subfields

    OrderedProperties subfields

### mpe

    DataDefinitionParseError mpe

### definedTypes

    Properties definedTypes

### dd

    RecordInfo dd

### ptrOne_RecordParsers

    HashMap<String,RecordParser> ptrOne_RecordParsers

### setParser_settbls

    HashMap<String,DataDefinition> setParser_settbls

### subtableParser_subtables

    HashMap<String,RecordInfo> subtableParser_subtables

### subtableParser_here

    HashMap<String,RecordInfo> subtableParser_here

### currentRowCursor

    FieldCursor currentRowCursor

### funcNames

    HashMap<String,DataDefinition.QueryFragmentFunction> funcNames

Constructor Detail

### RecordParser

    RecordParser()

### RecordParser

    RecordParser(RecordInfo dd,
                 RecordParser rp)

Method Detail

### isValidationRule

    public static boolean isValidationRule(String s)

### isFunction

    public static boolean isFunction(String s)

### parse

    void parse(RecordInfo dd)

### parse

    DataDefinition parse(URL u,
                         String path)

### parse

    RecordInfo parse(String txt)

### parse

    void parse()

### separateFields

    void separateFields()

### setTitle

    void setTitle()

### getResource

    static URL getResource(String s)

### findDataDefinition

    public static URL findDataDefinition(String s,
                                         String ext)

### findDataDefinitionOrDirectory

    public static URL findDataDefinitionOrDirectory(String s,
                                                    String ext)

  Looks up a data definition. First tries to see if an arbitrary webapp root path was passed, if not uses the classpath

  Parameters:
    `s` - the name of the type
    `ext` - the extension (e.g. mdd)
  Returns:
    a URL to the MDD file, null if none was found

### solveIncludes

    void solveIncludes()

### readTypes

    void readTypes()

### getFieldInfo

    FieldInfo getFieldInfo(String fieldName)

### treatMyFields

    void treatMyFields()

### matchFunction

    boolean matchFunction(String line)

### compileFunctions

    void compileFunctions()

### configSubfields

    void configSubfields()

### treatSubfields

    void treatSubfields()

### makeLine

    static String makeLine(String origKey,
                           String value)

### makeLine

    static String makeLine(OrderedProperties p,
                           String k)

### fail

    DataDefinitionParseError fail(String why,
                                  String where)

### fail

    DataDefinitionParseError fail(IOException ioe)

### read

    void read(OrderedProperties op,
              String txt)
        throws IOException

  Throws:
    `IOException`

### read

    void read(OrderedProperties op,
              URL u)
        throws IOException

  Throws:
    `IOException`

### read

    void read(OrderedProperties op,
              BufferedReader rd)
        throws IOException

  Throws:
    `IOException`

### parseSubfields

    public void parseSubfields(String fieldName)

### parse_ptrOne_Subfields

    public void parse_ptrOne_Subfields(String fieldName)

### parse_set_Subfields

    public void parse_set_Subfields(String fieldName)

### acceptTitle

    String acceptTitle(String fieldName,
                       String nm,
                       String origNm,
                       String val,
                       Object o)

### addText

    String addText(String fieldName,
                   String nm,
                   String origNm,
                   String val)

### base_addText

    String base_addText(String fieldName,
                        String nm,
                        String origNm,
                        String val)

### add_ptr_Text

    String add_ptr_Text(String fieldName,
                        String nm,
                        String origNm,
                        String val)

### add_ptrOne_Text

    String add_ptrOne_Text(String fieldName,
                           String nm,
                           String origNm,
                           String val)

### add_set_Text

    String add_set_Text(String fieldName,
                        String nm,
                        String origNm,
                        String val)

### parse

    void parse(String fieldName,
               FieldCursor fc)
         throws DataDefinitionParseError

  Throws:
    `DataDefinitionParseError`

### setType

    String setType(String fieldName,
                   String type,
                   FieldCursor fc)
             throws DataDefinitionParseError

  Throws:
    `DataDefinitionParseError`

### parse1

    void parse1(String fieldName,
                FieldCursor fc)

  switch for the existing parse methods. set the field type to another value if we want to change it

### int_parse1

    public void int_parse1(String fieldName,
                           FieldCursor fc)

### intEnum_parse1

    public void intEnum_parse1(String fieldName,
                               FieldCursor fc)

### char_parse1

    public void char_parse1(String fieldName,
                            FieldCursor fc)

### charEnum_parse1

    public void charEnum_parse1(String fieldName,
                                FieldCursor fc)

### simple_parse1

    public void simple_parse1(String fieldName,
                              FieldCursor fc)

### text_parse1

    public void text_parse1(String fieldName,
                            FieldCursor fc)
                     throws DataDefinitionParseError

  Throws:
    `DataDefinitionParseError`

### setComplex_parse1

    public void setComplex_parse1(String fieldName,
                                  FieldCursor fc)

### ptrOne_parse1

    public void ptrOne_parse1(String fieldName,
                              FieldCursor fc)

### parseFile

    public void parseFile(String fieldName,
                          FieldCursor fc)

### setCharEnum_parse1

    public void setCharEnum_parse1(String fieldName,
                                   FieldCursor fc)

### setIntEnum_parse1

    public void setIntEnum_parse1(String fieldName,
                                  FieldCursor fc)

### ptr_parse1

    public void ptr_parse1(String fieldName,
                           FieldCursor fc)

### set_parse1

    public void set_parse1(String fieldName,
                           FieldCursor fc)

### enumSet

    String enumSet(String fieldName,
                   FieldCursor fc,
                   String word)

### makeSubtable

    void makeSubtable(String fieldName,
                      FieldCursor fc)

### addPtr

    String addPtr(String fieldName,
                  String name,
                  DataDefinition o)

### addPtrHere

    String addPtrHere(String fieldName)

### parseValidationDefinition

    public void parseValidationDefinition()
                                   throws ValidationDefinitionParseError

  Throws:
    `ValidationDefinitionParseError`

### main

    public static void main(String[] args)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Docs generated on 2009-02-25 14:20