com.ibm.tivoli.maximo.load

Class BaseFlatFileParser

  • java.lang.Object
    • com.ibm.tivoli.maximo.load.BaseFlatFileParser
  • Direct Known Subclasses:
    FlatFileParser


    public class BaseFlatFileParser
    extends java.lang.Object
    Class that Parses Flat files defined as per the MEA System Admistrator Guide document
    • Constructor Summary

      Constructors 
      Constructor and Description
      BaseFlatFileParser(java.io.BufferedReader reader, java.lang.String delim, char textQualifier, int startPosition)
      Initialize and parse header information
      BaseFlatFileParser(java.io.BufferedReader reader, java.lang.String delim, char textQualifier, int startPosition, boolean useHeader)
      Initialize and parse header information
      BaseFlatFileParser(java.io.BufferedReader reader, java.lang.String delim, int startPosition)
      Initialize and parse header information
      BaseFlatFileParser(java.io.BufferedReader reader, java.lang.String delim, int startPosition, boolean useHeader)
      Initialize and parse header information
      BaseFlatFileParser(java.io.BufferedReader reader, java.lang.String mosName, java.lang.String action, java.lang.String langCode, java.lang.String delim, char textQualifier, int startPosition)
      Initialize and parse header information
      BaseFlatFileParser(java.io.File file, java.lang.String delim, char textQualifier, int startPosition, boolean useHeader)
      Initialize and parse header information
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getAction()
      returns action from Flat file header
      java.lang.String getColHeader() 
      java.util.List getColumnHeaders()
      returns the column header from Flat file header
      int getCurrentLine()
      returns the line number
      int getCurrentLineIndex()
      return the line number of current record
      java.lang.String getDelimiter() 
      java.lang.String getExtSysName()
      returns External System name from Flat file header
      java.lang.String getInterface()
      returns the Enterprise Service name from Flat file header
      java.lang.String getOSName()
      returns External System name from Flat file header
      int getRecordEnd() 
      int getRecordStart() 
      java.lang.String getTransLanguage()
      returns the Trans language from Flat file header
      protected void initIntegration(boolean useHeader, java.lang.String intObjectName)
      Initialize integration information
      java.util.List nextRecord()
      Parse the next line in the Flat file
      java.util.Map parseLine()
      parses each line in the flat file
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • integrationLogger

        protected static final MXLogger integrationLogger
    • Constructor Detail

      • BaseFlatFileParser

        public BaseFlatFileParser(java.io.BufferedReader reader,
                                  java.lang.String delim,
                                  int startPosition)
                           throws MXException
        Initialize and parse header information
        Parameters:
        reader - Buffered reader of the Flat file
        delim - delimitter character
        startPosition - Starting position of the parsing file. It will be 0 for the first time.
        Throws:
        MXException
      • BaseFlatFileParser

        public BaseFlatFileParser(java.io.BufferedReader reader,
                                  java.lang.String delim,
                                  int startPosition,
                                  boolean useHeader)
                           throws MXException
        Initialize and parse header information
        Parameters:
        reader - Buffered reader of the Flat file
        delim - delimitter character
        startPosition - Starting position of the parsing file. It will be 0 for the first time.
        Throws:
        MXException
      • BaseFlatFileParser

        public BaseFlatFileParser(java.io.BufferedReader reader,
                                  java.lang.String delim,
                                  char textQualifier,
                                  int startPosition)
                           throws MXException
        Initialize and parse header information
        Parameters:
        reader - Buffered reader of the Flat file
        delim - delimitter character
        startPosition - Starting position of the parsing file. It will be 0 for the first time.
        Throws:
        MXException
      • BaseFlatFileParser

        public BaseFlatFileParser(java.io.BufferedReader reader,
                                  java.lang.String delim,
                                  char textQualifier,
                                  int startPosition,
                                  boolean useHeader)
                           throws MXException
        Initialize and parse header information
        Parameters:
        reader - Buffered reader of the Flat file
        delim - delimitter character
        startPosition - Starting position of the parsing file. It will be 0 for the first time.
        Throws:
        MXException
      • BaseFlatFileParser

        public BaseFlatFileParser(java.io.File file,
                                  java.lang.String delim,
                                  char textQualifier,
                                  int startPosition,
                                  boolean useHeader)
                           throws MXException
        Initialize and parse header information
        Parameters:
        file - File handler of the Flat file
        delim - delimitter character
        startPosition - Starting position of the parsing file. It will be 0 for the first time.
        Throws:
        MXException
      • BaseFlatFileParser

        public BaseFlatFileParser(java.io.BufferedReader reader,
                                  java.lang.String mosName,
                                  java.lang.String action,
                                  java.lang.String langCode,
                                  java.lang.String delim,
                                  char textQualifier,
                                  int startPosition)
                           throws MXException
        Initialize and parse header information
        Parameters:
        reader - Buffered reader of the Flat file
        delim - delimitter character
        startPosition - Starting position of the parsing file. It will be 0 for the first time.
        Throws:
        MXException
    • Method Detail

      • initIntegration

        protected void initIntegration(boolean useHeader,
                                       java.lang.String intObjectName)
                                throws MXException
        Initialize integration information
        Throws:
        MXException
      • parseLine

        public java.util.Map parseLine()
                                throws MXException
        parses each line in the flat file
        Returns:
        Map
        Throws:
        MXException
      • getCurrentLineIndex

        public int getCurrentLineIndex()
        return the line number of current record
        Returns:
        the line number
      • nextRecord

        public java.util.List nextRecord()
                                  throws MXException
        Parse the next line in the Flat file
        Returns:
        List
        Throws:
        MXException
      • getRecordStart

        public int getRecordStart()
      • getRecordEnd

        public int getRecordEnd()
      • getExtSysName

        public java.lang.String getExtSysName()
        returns External System name from Flat file header
        Returns:
        the External System name from Flat file header
      • getOSName

        public java.lang.String getOSName()
        returns External System name from Flat file header
        Returns:
        the External System name from Flat file header
      • getAction

        public java.lang.String getAction()
        returns action from Flat file header
        Returns:
        the action name from Flat file header
      • getInterface

        public java.lang.String getInterface()
        returns the Enterprise Service name from Flat file header
        Returns:
        the Enterprise Service name from Flat file header
      • getTransLanguage

        public java.lang.String getTransLanguage()
        returns the Trans language from Flat file header
        Returns:
        the Trans language from Flat file header
      • getColumnHeaders

        public java.util.List getColumnHeaders()
        returns the column header from Flat file header
        Returns:
        the column header name from Flat file header
      • getCurrentLine

        public int getCurrentLine()
        returns the line number
        Returns:
        the line number from Flat file header
      • getDelimiter

        public java.lang.String getDelimiter()
      • getColHeader

        public java.lang.String getColHeader()