Sun Message Library for SWIFT API

com.stc.swift.builder
Class SwiftEntryField

java.lang.Object
  extended by com.stc.swift.builder.SwiftOTDBuilderObjAdapter
      extended by com.stc.swift.builder.SwiftEntryField
All Implemented Interfaces:
SwiftBuilderConstants, SwiftOTDBuilderObject

public class SwiftEntryField
extends SwiftOTDBuilderObjAdapter
implements SwiftBuilderConstants

this class represents either a Mandatory entry field or an Optional entry field in a MT description; Update history: 05/24/2006 : QAI 100008 - implement SWIFT HRF parser Added setters in case the information is parsed using another parser (such as HRF reader) and the entry is set from other objects;

Version:
$Revision: 1.11 $

Field Summary
 
Fields inherited from interface com.stc.swift.builder.SwiftBuilderConstants
END_OF_CTRL_POINT, MSG_ABNORM_ADDING_ENTRY_TO_NON_CONTAINER, MSG_ABNORM_ADDING_FIELD_TO_NON_CONTAINER, MSG_ABNORM_ALTRN_FLD_HAS_NO_OPTS, MSG_ABNORM_NO_OPT_ENTRY_FOR_NON_LITERAL, MSG_ABNORM_NON_LITERAL_FLD_HAS_NO_OPTS, MSG_ABNORM_SEQU_INSIDE_ANONYM_SEQU, MSG_ABNORM_SIMPLE_FLD_HAS_MULTI_OPTS, MSG_ERROR_ADDING_ENTRY, MSG_EXPECT_DESCS_IN_FMT, MSG_EXPECT_LINE_START_WITH, MSG_EXPECT_OPT_IN_FMT, MSG_EXPECT_PATTS_IN_FMT, MSG_HREF_NOT_FOUND, MSG_INVALID_FLD_SPEC_PATTERN, MSG_INVALID_FMT_SPEC_WRONG_FLD_CNT, MSG_INVALID_HRF_SPEC_ENTRY, MSG_INVALID_QUALIFIER_ENTRY_7_FLD_EXPECTED, MSG_INVALID_QUALIFIER_ENTRY_FLD_VAL_EXPECTED, MSG_NO_EXPECTED_TAG_FOUND, MSG_NO_FORMAT_ENTRIES_FOUND, MSG_NO_FORMAT_SEC_FOUND, MSG_NOT_HTML_ERROR, MSG_PATTS_DESCS_NOT_MATCH, MSG_SEQU_STACK_UNDERFLOW, MSG_TABLE_CLOSE_NOT_FOUND, MSG_TABLE_HEADER_NOT_FOUND, MSG_TABLE_OPEN_NOT_FOUND, NAME_FLD_SPEC_PAGE, NAME_FMT_SPEC_PAGE, START_OF_CTRL_POINT, STF_ALTRN_CTRL_ATTRIBUTE, STF_ALTRN_ENTRY_ID, STF_ALTRN_IS_OPTIONAL, STF_ALTRN_OPTION_CHOICE, STF_DIFF_LEFT_MARK, STF_DIFF_RIGHT_MARK, STF_DIFF_SEPARATOR, STF_ENTRY_ALTRN, STF_ENTRY_FIELD, STF_ENTRY_LOOP, STF_ENTRY_OPTION, STF_ENTRY_SEQU, STF_FIELD_ENTRY_ID, STF_FIELD_EXPANSION, STF_FIELD_IS_OPTIONAL, STF_FIELD_PATT_ID, STF_FIELD_TAG, STF_FIOPT_ENTRY_ID, STF_FIOPT_FIELD_TAG, STF_FIOPT_IS_OPTIONAL, STF_FIOPT_OPTION_CHOICE, STF_FIOPT_OPTION_EXPANSION, STF_FIOPT_PATT_ID, STF_LOOP_CTRL_ATTRIBUTE, STF_LOOP_ENTRY_ID, STF_LOOP_MAX_OCC, STF_LOOP_MIN_OCC, STF_PATS_DEFAULT_VALUE, STF_PATS_EXISTENCE_CONDITION, STF_PATS_IS_EDITABLE, STF_PATS_IS_OPTIONAL, STF_PATS_IS_VERIFIABLE, STF_PATS_IS_VISIBLE, STF_PATS_MAX_CHAR, STF_PATS_MIN_CHAR, STF_PATS_NB_ROWS, STF_PATS_PROMPT, STF_PATS_ROW_SEPARATOR, STF_PATS_TYPE, STF_PATT_ID_PATS_ID, STF_SEQU_CTRL_ATTRIBUTE, STF_SEQU_ENTRY_ID, STF_SEQU_EXPANSION, STF_SEQU_IS_OPTIONAL, STF_SPACER
 
Constructor Summary
SwiftEntryField(SwiftOTDBuilderObject parent)
          Creates a new SwiftEntryField object.
SwiftEntryField(SwiftOTDBuilderObject parent, java.util.Hashtable mapping)
           
 
Method Summary
 void addPattern(java.lang.Object o)
           
 void addPatterns(java.lang.Object[] l)
           
 void buildOtd(com.stc.otd.forest.OtdSerial otdSerial, com.stc.otd.forest.OtdWood otdWood, java.util.Hashtable hash)
          Otd builder for Swift.
 void buildOtd(com.stc.otd.forest.OtdSerial otdSerial, com.stc.otd.forest.OtdWood otdWood, java.util.Hashtable hash, int minRep, int maxRep)
          Otd builder for Swift.
 void buildOtd(com.stc.otd.forest.OtdSerial otdSerial, com.stc.otd.forest.OtdWood otdWood, java.util.Hashtable hash, java.lang.String baseName, java.lang.String tag)
          Otd builder for Swift.
 void diff(SwiftOTDBuilderObject obj, java.io.PrintWriter writer, boolean coreAttrOnly)
           
 void genMap(SwiftOTDBuilderObject obj, java.io.PrintWriter writer)
          compare the expansion attribute of this and obj - if there is one, and output the extractfile's expan if there is a diff
 int genSubField(com.stc.otd.forest.OtdSerial otdSerial, com.stc.otd.forest.OtdWood otdWood, java.util.Hashtable hash, SwiftPattern[] pats, int patCur)
           
 java.lang.String getFieldEntryId()
           
 java.lang.String getFieldExpan()
           
 java.lang.String getFieldPattId()
           
 java.lang.String getFieldTag()
           
 java.lang.String getID()
           
 SwiftOTDBuilderObject getParent()
           
 SwiftPattern getPattern(int index)
           
 void parse(java.io.LineNumberReader lnr)
          Parser for the Swift Description file.
 void parse(java.io.LineNumberReader lnr, boolean belowAltrn)
          Parser for the Swift Description file.
 void print(java.io.PrintWriter writer)
           
 void printPatterns(java.io.PrintWriter writer)
           
 void setFieldEntryId(java.lang.String id)
           
 void setFieldExpan(java.lang.String s)
           
 void setFieldPattId(java.lang.String s)
           
 void setFieldTag(java.lang.String s)
           
 void setIsOpt(java.lang.String s)
           
 void setMinRep(int i)
           
 void setParent(SwiftOTDBuilderObject parent)
           
 
Methods inherited from class com.stc.swift.builder.SwiftOTDBuilderObjAdapter
calculateRepetitiveInfo, getHRFEntry, getMTType, mapName, print, setHRFEntry
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwiftEntryField

public SwiftEntryField(SwiftOTDBuilderObject parent)
Creates a new SwiftEntryField object.


SwiftEntryField

public SwiftEntryField(SwiftOTDBuilderObject parent,
                       java.util.Hashtable mapping)
Method Detail

getFieldEntryId

public java.lang.String getFieldEntryId()

setFieldEntryId

public void setFieldEntryId(java.lang.String id)

getFieldExpan

public java.lang.String getFieldExpan()

setFieldExpan

public void setFieldExpan(java.lang.String s)

getPattern

public SwiftPattern getPattern(int index)

parse

public void parse(java.io.LineNumberReader lnr,
                  boolean belowAltrn)
           throws SwiftParsingException,
                  java.io.IOException
Parser for the Swift Description file.

Parameters:
: - A buffered character-input stream that keeps track of line numbers of the Swift description.
: - If SwiftEntryField is under SwiftAltrnEntry or SwiftOptEntry we default to "TRUE".
Throws:
SwiftParsingException: - Parsing of the Swift Description file has failed.
IOException: - Failed or interrupted I/O operation.
SwiftParsingException
java.io.IOException

parse

public void parse(java.io.LineNumberReader lnr)
           throws SwiftParsingException,
                  java.io.IOException
Parser for the Swift Description file.

Parameters:
: - A buffered character-input stream that keeps track of line numbers of the Swift description.
Throws:
SwiftParsingException: - Parsing of the Swift Description file has failed.
IOException: - Failed or interrupted I/O operation.
SwiftParsingException
java.io.IOException

buildOtd

public void buildOtd(com.stc.otd.forest.OtdSerial otdSerial,
                     com.stc.otd.forest.OtdWood otdWood,
                     java.util.Hashtable hash,
                     java.lang.String baseName,
                     java.lang.String tag)
              throws com.stc.otd.builder.OtdBuilderException
Otd builder for Swift.

Type Parameters:
otdSerial - - Where the OtdBark is placed??.
otdWood - - A piece of Wood to add branches to.
hash - - Hashtable of previously used node names.
baseName - - Optional name used to strip redundant info.
tag - - Additional info for naming.
Throws:
com.stc.otd.builder.OtdBuilderException

buildOtd

public void buildOtd(com.stc.otd.forest.OtdSerial otdSerial,
                     com.stc.otd.forest.OtdWood otdWood,
                     java.util.Hashtable hash,
                     int minRep,
                     int maxRep)
              throws com.stc.otd.builder.OtdBuilderException
Otd builder for Swift.

Type Parameters:
otdSerial - - Where the OtdBark is placed??.
otdWood - - A piece of Wood to add branches to.
hash - - Hashtable of previously used node names.
minRep - - Minimum repitions to be used.
maxRep - - Maximum repitions to be used.
Throws:
com.stc.otd.builder.OtdBuilderException

buildOtd

public void buildOtd(com.stc.otd.forest.OtdSerial otdSerial,
                     com.stc.otd.forest.OtdWood otdWood,
                     java.util.Hashtable hash)
              throws com.stc.otd.builder.OtdBuilderException
Otd builder for Swift.

Type Parameters:
otdSerial - - Where the OtdBark is placed??.
otdWood - - A piece of Wood to add branches to.
hash - - Hashtable of previously used node names.
Throws:
com.stc.otd.builder.OtdBuilderException

genSubField

public int genSubField(com.stc.otd.forest.OtdSerial otdSerial,
                       com.stc.otd.forest.OtdWood otdWood,
                       java.util.Hashtable hash,
                       SwiftPattern[] pats,
                       int patCur)
                throws com.stc.otd.builder.OtdBuilderException
Throws:
com.stc.otd.builder.OtdBuilderException

setFieldTag

public void setFieldTag(java.lang.String s)

setIsOpt

public void setIsOpt(java.lang.String s)

setMinRep

public void setMinRep(int i)

setFieldPattId

public void setFieldPattId(java.lang.String s)

getFieldPattId

public java.lang.String getFieldPattId()

getFieldTag

public java.lang.String getFieldTag()

addPattern

public void addPattern(java.lang.Object o)

addPatterns

public void addPatterns(java.lang.Object[] l)

getParent

public SwiftOTDBuilderObject getParent()
Specified by:
getParent in interface SwiftOTDBuilderObject
Overrides:
getParent in class SwiftOTDBuilderObjAdapter

setParent

public void setParent(SwiftOTDBuilderObject parent)
Specified by:
setParent in interface SwiftOTDBuilderObject
Overrides:
setParent in class SwiftOTDBuilderObjAdapter

getID

public java.lang.String getID()
Specified by:
getID in interface SwiftOTDBuilderObject
Overrides:
getID in class SwiftOTDBuilderObjAdapter

printPatterns

public void printPatterns(java.io.PrintWriter writer)
                   throws java.lang.Exception
Throws:
java.lang.Exception

print

public void print(java.io.PrintWriter writer)
           throws java.lang.Exception
Specified by:
print in interface SwiftOTDBuilderObject
Overrides:
print in class SwiftOTDBuilderObjAdapter
Throws:
java.lang.Exception

genMap

public void genMap(SwiftOTDBuilderObject obj,
                   java.io.PrintWriter writer)
            throws java.lang.Exception
compare the expansion attribute of this and obj - if there is one, and output the extractfile's expan if there is a diff

Specified by:
genMap in interface SwiftOTDBuilderObject
Overrides:
genMap in class SwiftOTDBuilderObjAdapter
Throws:
java.lang.Exception

diff

public void diff(SwiftOTDBuilderObject obj,
                 java.io.PrintWriter writer,
                 boolean coreAttrOnly)
          throws java.lang.Exception
Specified by:
diff in interface SwiftOTDBuilderObject
Overrides:
diff in class SwiftOTDBuilderObjAdapter
Throws:
java.lang.Exception

Sun Message Library for SWIFT API

Copyright © 2008 Sun Microsystems, Inc. All rights reserved.