Package adams.gui

Class InstanceCompare

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.env.HomeRelocator, ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

    public class InstanceCompare
    extends adams.gui.core.AbstractFrameWithOptionHandling
    Stand-alone version of the Instance Compare utility. Valid options are:

    -file1 <java.io.File> (property: firstDataset)
        The first dataset in the comparison.
        default: .
     
    -att-range1 <java.lang.String> (property: firstAttributeRange)
        The range of attributes of the first dataset to use in the comparison.
        default: first-last
     
    -row-index1 <java.lang.String> (property: firstRowIndex)
        The index of the attribute in the first dataset to use for matching the
        rows of the two datasets.
        default:
     
    -file2 <java.io.File> (property: secondDataset)
        The second dataset in the comparison.
        default: .
     
    -att-range2 <java.lang.String> (property: secondAttributeRange)
        The range of attributes of the second dataset to use in the comparison.
        default: first-last
     
    -row-index2 <java.lang.String> (property: secondRowIndex)
        The index of the attribute in the second dataset to use for matching the
        rows of the two datasets.
        default:
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_PanelCompare

        protected InstanceComparePanel m_PanelCompare
        the panel for comparing the datasets.
      • m_FirstFile

        protected adams.core.io.PlaceholderFile m_FirstFile
        the first file to compare.
      • m_FirstAttributeRange

        protected adams.core.Range m_FirstAttributeRange
        the first attribute range to use.
      • m_FirstRowIndex

        protected adams.core.Index m_FirstRowIndex
        the index of the first attribute to use for matching rows.
      • m_SecondFile

        protected adams.core.io.PlaceholderFile m_SecondFile
        the second file to compare.
      • m_SecondAttributeRange

        protected adams.core.Range m_SecondAttributeRange
        the second attribute range to use.
      • m_SecondRowIndex

        protected adams.core.Index m_SecondRowIndex
        the index of the second attribute to use for matching rows.
    • Constructor Detail

      • InstanceCompare

        public InstanceCompare()
    • Method Detail

      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.gui.core.AbstractFrameWithOptionHandling
      • initialize

        protected void initialize()
        For initializing members.
        Overrides:
        initialize in class adams.gui.core.BaseFrame
      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class adams.gui.core.BaseFrame
      • setFirstDataset

        public void setFirstDataset​(adams.core.io.PlaceholderFile value)
        Sets the first dataset.
        Parameters:
        value - the first dataset
      • getFirstDataset

        public adams.core.io.PlaceholderFile getFirstDataset()
        Returns the first dataset.
        Returns:
        the first dataset
      • firstDatasetTipText

        public String firstDatasetTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setFirstAttributeRange

        public void setFirstAttributeRange​(String value)
        Sets the first attribute range ('first' and 'last' can be used as well).
        Parameters:
        value - the attribute range
      • getFirstAttributeRange

        public String getFirstAttributeRange()
        Returns the first attribute range.
        Returns:
        the attribute range
      • firstAttributeRangeTipText

        public String firstAttributeRangeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setFirstRowIndex

        public void setFirstRowIndex​(String value)
        Sets the first row index ('first' and 'last' can be used as well).
        Parameters:
        value - the index of the row attribute
      • getFirstRowIndex

        public String getFirstRowIndex()
        Returns the first row index.
        Returns:
        the index of the row attribute (1-based, 'first', 'last')
      • firstRowIndexTipText

        public String firstRowIndexTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setSecondDataset

        public void setSecondDataset​(adams.core.io.PlaceholderFile value)
        Sets the second dataset.
        Parameters:
        value - the second dataset
      • getSecondDataset

        public adams.core.io.PlaceholderFile getSecondDataset()
        Returns the second dataset.
        Returns:
        the second dataset
      • secondDatasetTipText

        public String secondDatasetTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setSecondAttributeRange

        public void setSecondAttributeRange​(String value)
        Sets the second attribute range ('second' and 'last' can be used as well).
        Parameters:
        value - the attribute range
      • getSecondAttributeRange

        public String getSecondAttributeRange()
        Returns the second attribute range.
        Returns:
        the attribute range
      • secondAttributeRangeTipText

        public String secondAttributeRangeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setSecondRowIndex

        public void setSecondRowIndex​(String value)
        Sets the second row index ('second' and 'last' can be used as well).
        Parameters:
        value - the index of the row attribute
      • getSecondRowIndex

        public String getSecondRowIndex()
        Returns the second row index.
        Returns:
        the index of the row attribute (2-based, 'second', 'last')
      • secondRowIndexTipText

        public String secondRowIndexTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • beforeShow

        protected void beforeShow()
        Hook method just before the dialog is made visible.
        Overrides:
        beforeShow in class adams.gui.core.BaseFrame
      • main

        public static void main​(String[] args)
        Starts the frame.
        Parameters:
        args - the commandline arguments