HiRISE

HiRISE.HiVali
Class SourceModel

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by javax.swing.DefaultComboBoxModel
          extended by HiRISE.HiVali.SourceModel
All Implemented Interfaces:
Serializable, ComboBoxModel, ListModel, MutableComboBoxModel

public class SourceModel
extends DefaultComboBoxModel

Version:
1.6
Author:
guym
See Also:
Serialized Form

Field Summary
static String ID
          CVS ID
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
SourceModel()
           
 
Method Summary
 void addChannels(Observation observation)
          Add channels to an observation node.
protected  void addObservation(Observation observation)
          Add an observation to the list.
 void addPTFSources(File file)
          Add a file to the sources to be processed.
 void addSource(String name)
          Add a source to be validated.
 void setDatabase(Database database)
          Set the database connection wrapper
 
Methods inherited from class javax.swing.DefaultComboBoxModel
addElement, getElementAt, getIndexOf, getSelectedItem, getSize, insertElementAt, removeAllElements, removeElement, removeElementAt, setSelectedItem
 
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.ListModel
addListDataListener, removeListDataListener
 

Field Detail

ID

public static final String ID
CVS ID

See Also:
Constant Field Values
Constructor Detail

SourceModel

public SourceModel()
Method Detail

setDatabase

public void setDatabase(Database database)
Set the database connection wrapper

Parameters:
database - Connected instance of Database

addObservation

protected void addObservation(Observation observation)
                       throws Invalid_Argument_Exception,
                              SQLException
Add an observation to the list.

Parameters:
observation - The observation
Throws:
Invalid_Argument_Exception
SQLException

addSource

public void addSource(String name)
               throws IOException,
                      SQLException,
                      Invalid_Argument_Exception
Add a source to be validated. This could be an observation ID, a channel ID, or a path to PTF.

Parameters:
name -
Throws:
IOException
SQLException
Invalid_Argument_Exception

addPTFSources

public void addPTFSources(File file)
                   throws IOException,
                          SQLException,
                          Invalid_Argument_Exception
Add a file to the sources to be processed. The file could be a directory, in which case this method will recurse through subdirectories. If the file is a PTF, it will be parsed for Observation IDs. Otherwise, the filename will be parsed for Channel IDs or Observation IDs, which will be added as sources.

Parameters:
file -
Throws:
IOException
SQLException
Invalid_Argument_Exception

addChannels

public void addChannels(Observation observation)
                 throws Invalid_Argument_Exception,
                        SQLException
Add channels to an observation node.

Parameters:
observation -
Throws:
Invalid_Argument_Exception
SQLException

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona