Class AllSheetsXLSEntityIterator

  • All Implemented Interfaces:
    com.rapiddweller.common.context.ContextAware, com.rapiddweller.format.DataIterator<Entity>, java.io.Closeable, java.lang.AutoCloseable

    public class AllSheetsXLSEntityIterator
    extends java.lang.Object
    implements com.rapiddweller.format.DataIterator<Entity>, com.rapiddweller.common.context.ContextAware
    Iterates an Excel sheet and maps its rows to Entity instances.

    Created at 27.01.2009 21:38:31
    Since:
    0.5.8
    Author:
    Volker Bergmann
    • Constructor Summary

      Constructors 
      Constructor Description
      AllSheetsXLSEntityIterator​(java.lang.String uri)
      Instantiates a new All sheets xls entity iterator.
      AllSheetsXLSEntityIterator​(java.lang.String uri, com.rapiddweller.common.Converter<java.lang.String,​?> preprocessor, ComplexTypeDescriptor entityDescriptor, boolean formatted)
      Instantiates a new All sheets xls entity iterator.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      java.lang.Class<Entity> getType()  
      java.lang.String getUri()
      Gets uri.
      com.rapiddweller.format.DataContainer<Entity> next​(com.rapiddweller.format.DataContainer<Entity> container)  
      static java.util.List<Entity> parseAll​(java.lang.String uri, com.rapiddweller.common.Converter<java.lang.String,​?> preprocessor, boolean formatted)
      Parse all list.
      void setContext​(com.rapiddweller.common.Context context)  
      void setRowBased​(boolean rowBased)
      Sets row based.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AllSheetsXLSEntityIterator

        public AllSheetsXLSEntityIterator​(java.lang.String uri)
                                   throws java.io.IOException,
                                          org.apache.poi.openxml4j.exceptions.InvalidFormatException
        Instantiates a new All sheets xls entity iterator.
        Parameters:
        uri - the uri
        Throws:
        java.io.IOException - the io exception
        org.apache.poi.openxml4j.exceptions.InvalidFormatException - the invalid format exception
      • AllSheetsXLSEntityIterator

        public AllSheetsXLSEntityIterator​(java.lang.String uri,
                                          com.rapiddweller.common.Converter<java.lang.String,​?> preprocessor,
                                          ComplexTypeDescriptor entityDescriptor,
                                          boolean formatted)
                                   throws java.io.IOException
        Instantiates a new All sheets xls entity iterator.
        Parameters:
        uri - the uri
        preprocessor - the preprocessor
        entityDescriptor - the entity descriptor
        formatted - the formatted
        Throws:
        java.io.IOException - the io exception
    • Method Detail

      • parseAll

        public static java.util.List<Entity> parseAll​(java.lang.String uri,
                                                      com.rapiddweller.common.Converter<java.lang.String,​?> preprocessor,
                                                      boolean formatted)
                                               throws java.io.IOException,
                                                      org.apache.poi.openxml4j.exceptions.InvalidFormatException
        Parse all list.
        Parameters:
        uri - the uri
        preprocessor - the preprocessor
        formatted - the formatted
        Returns:
        the list
        Throws:
        java.io.IOException - the io exception
        org.apache.poi.openxml4j.exceptions.InvalidFormatException - the invalid format exception
      • setRowBased

        public void setRowBased​(boolean rowBased)
        Sets row based.
        Parameters:
        rowBased - the row based
      • getUri

        public java.lang.String getUri()
        Gets uri.
        Returns:
        the uri
      • setContext

        public void setContext​(com.rapiddweller.common.Context context)
        Specified by:
        setContext in interface com.rapiddweller.common.context.ContextAware
      • getType

        public java.lang.Class<Entity> getType()
        Specified by:
        getType in interface com.rapiddweller.format.DataIterator<Entity>
      • next

        public com.rapiddweller.format.DataContainer<Entity> next​(com.rapiddweller.format.DataContainer<Entity> container)
        Specified by:
        next in interface com.rapiddweller.format.DataIterator<Entity>
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface com.rapiddweller.format.DataIterator<Entity>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object