Class DefaultFlowReader

    • Field Detail

      • m_Encoding

        protected BaseCharset m_Encoding
        the encoding to use.
    • Constructor Detail

      • DefaultFlowReader

        public DefaultFlowReader()
    • Method Detail

      • setEncoding

        public void setEncoding​(BaseCharset value)
        Sets the encoding to use.
        Specified by:
        setEncoding in interface EncodingSupporter
        Parameters:
        value - the encoding, e.g. "UTF-8" or "UTF-16", empty string for default
      • getEncoding

        public BaseCharset getEncoding()
        Returns the encoding to use.
        Specified by:
        getEncoding in interface EncodingSupporter
        Returns:
        the encoding, e.g. "UTF-8" or "UTF-16", empty string for default
      • encodingTipText

        public String encodingTipText()
        Returns the tip text for this property.
        Specified by:
        encodingTipText in interface EncodingSupporter
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • isCompact

        protected boolean isCompact​(File file,
                                    List<String> data)
        Determines whether the file is in compact format or not.
        Parameters:
        file - the file to check
        data - for transferring the data
        Returns:
        true if in compact format
      • isCompact

        protected boolean isCompact​(List<String> lines)
        Determines whether the lines represent compact format or not.
        Parameters:
        lines - the flow
        Returns:
        true if in compact format
      • readNonCompact

        protected Actor readNonCompact​(List<String> lines)
        Reads the actor from the non-compact format.
        Parameters:
        lines - the lines to read the actor from
        Returns:
        the actor, null if failed to read
      • nonCompactToNested

        protected List nonCompactToNested​(List<String> lines)
        Turns the non-compact format into nested format.
        Parameters:
        lines - the non-compact lines
        Returns:
        the nested format
      • readNested

        protected List readNested​(List<String> lines)
        Performs the actual reading.
        Parameters:
        lines - the flow data
        Returns:
        the flow or null in case of an error
      • readActor

        protected Actor readActor​(List<String> lines)
        Performs the actual reading.
        Parameters:
        lines - the flow data
        Returns:
        the flow or null in case of an error
      • getCorrespondingWriter

        public FlowWriter getCorrespondingWriter()
        Returns the corresponding writer, if available.
        Specified by:
        getCorrespondingWriter in interface FlowReader
        Returns:
        the writer, null if none available