Sun Message Library for SWIFT API

com.stc.swift.builder
Class SwiftHRFFieldSpecReader

java.lang.Object
  extended by com.stc.swift.builder.SwiftHRFReader
      extended by com.stc.swift.builder.SwiftHRFFieldSpecReader
All Implemented Interfaces:
SwiftReader

public class SwiftHRFFieldSpecReader
extends SwiftHRFReader

Read in a text file as HTML - assume it is HTML since the file name is provided by the caller of this class as a REF LINK follow up. This HTML file is suppose to be a "Field Specification" page for a SWIFT Message Type Format Specification; Collect the following information: (1) look for FORMAT - parse the

...
following for options & patterns & descs (2) look for PRESENCE - mandatory / optional (3) look for QUALIFIER (if is format spec is in FORMAT2) - parse the ...
following for information: optional, CR, RN, option letters, desc


Constructor Summary
SwiftHRFFieldSpecReader(SwiftHRFSpecReader specReader, SwiftHRFSpecEntry field, SwiftHRFHeuristics rules)
           
 
Method Summary
 SwiftHRFSpecEntry getFieldSpec()
           
static void main(java.lang.String[] args)
           
 void parse(java.io.File input)
          parse the given file (SWIFT HRF field spec HTML page) collectiing information about options and qualifiers (if applicable) and populate the object field;
 void reportParsingError(java.lang.String msgKey)
          helper
 
Methods inherited from class com.stc.swift.builder.SwiftHRFReader
filterOutTags, getDelimitedMultiValues, getDelimitedMultiValues, parseFormatSection, readNextElement, readNextElement, readTagWithValue, readUtil, readUtil, readUtil, readUtil
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwiftHRFFieldSpecReader

public SwiftHRFFieldSpecReader(SwiftHRFSpecReader specReader,
                               SwiftHRFSpecEntry field,
                               SwiftHRFHeuristics rules)
Method Detail

parse

public void parse(java.io.File input)
           throws SwiftParsingException,
                  java.io.FileNotFoundException,
                  java.io.IOException
parse the given file (SWIFT HRF field spec HTML page) collectiing information about options and qualifiers (if applicable) and populate the object field;

Specified by:
parse in interface SwiftReader
Specified by:
parse in class SwiftHRFReader
Parameters:
input -
Throws:
SwiftParsingException - - encountered unexpected structures during parsing;
java.io.FileNotFoundException - - the input file can not be found;
java.io.IOException - - IO error during line read;

reportParsingError

public void reportParsingError(java.lang.String msgKey)
                        throws SwiftParsingException
Description copied from class: SwiftHRFReader
helper

Throws:
SwiftParsingException

getFieldSpec

public SwiftHRFSpecEntry getFieldSpec()

main

public static void main(java.lang.String[] args)

Sun Message Library for SWIFT API

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