Interface AttributeWriter

  • All Known Implementing Classes:
    JoiningAttributeWriter

    public interface AttributeWriter
    - Added hasNext to support the FeatureWriter API. - Changed order of writer parameters to match Collections, JDBC API. - Added IOExceptions on all methods. - Do we want AttributeWriters to know about the schema and perform validation??
    Author:
    Ian Schneider, Sean Geoghegan, Defence Science and Technology Organisation.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()  
      int getAttributeCount()
      The number of attributes this reader can read, i.e the length of a row.
      AttributeDescriptor getAttributeType​(int i)
      Retrieve the AttributeType at the given index.
      boolean hasNext()
      Query whether there are other rows in the attribute writer.
      void next()
      Advance the AttributeWriter, all calls to write will correspond to the same set of attributes until next is called again.
      void write​(int position, Object attribute)
      Write the given attribute value at the position indicated.
    • Method Detail

      • getAttributeCount

        int getAttributeCount()
        The number of attributes this reader can read, i.e the length of a row.
      • getAttributeType

        AttributeDescriptor getAttributeType​(int i)
                                      throws ArrayIndexOutOfBoundsException
        Retrieve the AttributeType at the given index.
        Throws:
        ArrayIndexOutOfBoundsException
      • next

        void next()
           throws IOException
        Advance the AttributeWriter, all calls to write will correspond to the same set of attributes until next is called again.
        Throws:
        IOException
      • write

        void write​(int position,
                   Object attribute)
            throws IOException
        Write the given attribute value at the position indicated. Implementations can choose to immediately flush the write or buffer it.
        Throws:
        IOException
      • close

        void close()
            throws IOException
        Throws:
        IOException
      • hasNext

        boolean hasNext()
                 throws IOException
        Query whether there are other rows in the attribute writer.
        Throws:
        IOException
        See Also:
        FeatureWriter.hasNext()