com.ibm.commerce.foundation.dataload.datareader

Class AbstractXmlReader

  • All Implemented Interfaces:
    DataReader, javax.xml.transform.ErrorListener
    Direct Known Subclasses:
    XmlReader


    public abstract class AbstractXmlReader
    extends AbstractDataReader
    implements javax.xml.transform.ErrorListener
    This is an abstract the XML Reader class. The other data load XML reader classes should extend this class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void error(javax.xml.transform.TransformerException ex)
      Throws an error message
      void fatalError(javax.xml.transform.TransformerException ex)
      Throws a fatal error message
      java.lang.Integer getSourcePosition()
      It returns the source position of the data object returned by the next() method you called last time.
      void init()
      Does some initialization.
      ConfigProperties initConfig(org.w3c.dom.Node dataReaderNode, ConfigProperties parentConfigProperties)
      Do initialization for the configuration.
      void warning(javax.xml.transform.TransformerException ex)
      Prints a warning message
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractXmlReader

        public AbstractXmlReader()
    • Method Detail

      • getSourcePosition

        public java.lang.Integer getSourcePosition()
        It returns the source position of the data object returned by the next() method you called last time. The subclass should call sourcePositionIncrement() method to increment the source position. Otherwise it will always return 0.
        Specified by:
        getSourcePosition in interface DataReader
        Overrides:
        getSourcePosition in class AbstractDataReader
        Returns:
        the source position of the data object.
      • error

        public void error(javax.xml.transform.TransformerException ex)
                   throws javax.xml.transform.TransformerException
        Throws an error message
        Specified by:
        error in interface javax.xml.transform.ErrorListener
        Parameters:
        ex - a transformer exception
        Throws:
        javax.xml.transform.TransformerException - if there are errors.
      • fatalError

        public void fatalError(javax.xml.transform.TransformerException ex)
                        throws javax.xml.transform.TransformerException
        Throws a fatal error message
        Specified by:
        fatalError in interface javax.xml.transform.ErrorListener
        Parameters:
        ex - a transformer exception
        Throws:
        javax.xml.transform.TransformerException - if there are errors.
      • warning

        public void warning(javax.xml.transform.TransformerException ex)
                     throws javax.xml.transform.TransformerException
        Prints a warning message
        Specified by:
        warning in interface javax.xml.transform.ErrorListener
        Parameters:
        ex - a transformer exception
        Throws:
        javax.xml.transform.TransformerException - if there are errors.