Class AbstractMitab25BinaryWriter<T extends BinaryInteraction,​P extends Participant>

    • Constructor Detail

      • AbstractMitab25BinaryWriter

        public AbstractMitab25BinaryWriter()

        Constructor for AbstractMitab25BinaryWriter.

      • AbstractMitab25BinaryWriter

        public AbstractMitab25BinaryWriter​(File file)
                                    throws IOException

        Constructor for AbstractMitab25BinaryWriter.

        Parameters:
        file - a File object.
        Throws:
        IOException - if any.
      • AbstractMitab25BinaryWriter

        public AbstractMitab25BinaryWriter​(OutputStream output)

        Constructor for AbstractMitab25BinaryWriter.

        Parameters:
        output - a OutputStream object.
      • AbstractMitab25BinaryWriter

        public AbstractMitab25BinaryWriter​(Writer writer)

        Constructor for AbstractMitab25BinaryWriter.

        Parameters:
        writer - a Writer object.
    • Method Detail

      • isWriteHeader

        public boolean isWriteHeader()

        isWriteHeader.

        Returns:
        a boolean.
      • setWriteHeader

        public void setWriteHeader​(boolean writeHeader)

        Setter for the field writeHeader.

        Parameters:
        writeHeader - a boolean.
      • write

        public void write​(T interaction)
                   throws MIIOException
        Writes a binary interaction. Does not write any extended properties from participants, interaction and features This method will write empty columns for interaction detection method, publication author and identifier, source and confidences. It will also ignore experimental roles, host organism, interaction parameters and participant identification methods
        Specified by:
        write in interface InteractionWriter<T extends BinaryInteraction>
        Parameters:
        interaction - a T object.
        Throws:
        MIIOException - if any.
      • write

        public void write​(Collection<? extends T> interactions)
                   throws MIIOException
        Writes a collection of binary interactions. Does not write any extended properties from participants, interaction and features This method will write empty columns for interaction detection method, publication author and identifier, source and confidences. It will also ignore experimental roles, host organism, interaction parameters and participant identification methods
        Specified by:
        write in interface InteractionWriter<T extends BinaryInteraction>
        Parameters:
        interactions - a Collection object.
        Throws:
        MIIOException - if any.
      • setColumnFeeder

        protected void setColumnFeeder​(MitabColumnFeeder<T,​P> columnFeeder)

        Setter for the field columnFeeder.

        Parameters:
        columnFeeder - a MitabColumnFeeder object.
      • initialiseColumnFeeder

        protected abstract void initialiseColumnFeeder()

        initialiseColumnFeeder.

      • writeBinary

        protected void writeBinary​(T interaction,
                                   P a,
                                   P b)
                            throws IOException
        Writes the binary interaction and its participants in MITAB 2.5
        Parameters:
        interaction - a T object.
        a - a P object.
        b - a P object.
        Throws:
        IOException - if any.
      • getWriter

        protected Writer getWriter()

        Getter for the field writer.

        Returns:
        a Writer object.
      • writeHeader

        protected void writeHeader()
                            throws IOException
        Write the header
        Throws:
        IOException - if any.
      • setVersion

        protected void setVersion​(MitabVersion version)

        Setter for the field version.

        Parameters:
        version - a MitabVersion object.
      • hasStarted

        protected boolean hasStarted()

        hasStarted.

        Returns:
        a boolean.
      • setStarted

        protected void setStarted​(boolean start)

        setStarted.

        Parameters:
        start - a boolean.