public abstract class REpiceaRecordReader
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Class and Description |
|---|---|
protected class |
REpiceaRecordReader.InternalTask |
static class |
REpiceaRecordReader.MessageID |
static class |
REpiceaRecordReader.NullInThisFieldException |
static class |
REpiceaRecordReader.VariableValueException |
| Modifier | Constructor and Description |
|---|---|
protected |
REpiceaRecordReader()
Constructor for GUI mode.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkInputFieldsFormat(java.lang.Object[] oArray)
This method checks if the input values of the current record are of the appropriate format.
|
protected void |
checkInputFieldsValue(java.lang.Object[] oArray,
java.lang.Enum<?> fieldID) |
protected abstract java.util.List<ImportFieldElement> |
defineFieldsToImport()
This method defines the fields to be imported.
|
protected abstract java.lang.Enum |
defineGroupFieldEnum()
This method set the Enum var that corresponds to the group field.
|
java.util.List<java.lang.String> |
getGroupList()
This method returns a list of Strings that represents the groups.
|
java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> |
getGroupMap()
This method returns the indices of all the observations according to their corresponding groups.
|
java.lang.String |
getGroupName(int groupId)
This method returns the group name for this particular group ID.
|
protected ImportFieldManager |
getImportFieldManager() |
java.util.List<java.lang.Integer> |
getObservationIndicesForThisGroup(int groupId)
This method returns the indices of the observations for a given group.
|
int |
getSelectedGroupId()
This method returns the id of the selected group.
|
void |
initGUIMode(UseModeProvider.UseMode useMode,
java.lang.String... fileSpec)
This method initializes the RecordInstantiator object in GUI mode with no owner.
|
void |
initGUIMode(java.awt.Window guiOwner,
UseModeProvider.UseMode useMode,
java.lang.String... fileSpec)
This method initializes the RecordInstantiator object in GUI mode.
|
void |
initInScriptMode(ImportFieldManager importFieldManager)
For script mode.
|
boolean |
isGroupingEnabled()
This method returns true if the grouping is enabled.
|
protected boolean |
isThisFieldAvailable(java.lang.Enum<?> fieldID,
java.lang.Object[] oArray)
This method returns true if the field is available.
|
protected void |
makeASelection(java.awt.Window guiOwner)
If the number of strata is larger than 1, this method provides a dialog with a list
that allows to select a particular stratum.
|
void |
readAllRecords()
This method reads all the records of the dataset.
|
protected abstract void |
readLineRecord(java.lang.Object[] oArray,
int lineCounter)
This method read the line record and set the values in the appropriate fields.
|
void |
readRecordsForThisGroupId(int groupId)
This method reads the records that correspond to the group ID.
|
protected java.lang.Enum<?> |
setCurrentFieldID(java.lang.Object[] oArray,
java.lang.Enum<?> currentFieldID) |
protected void |
setPopUpWindowEnabled(boolean isPopUpWindowEnabled)
This method serves to enable or disable the PopUp Windows in the Import dialog.
|
void |
setSelectedGroupId(int selectedGroupId)
This method sets the selected group.
|
public void initGUIMode(java.awt.Window guiOwner,
UseModeProvider.UseMode useMode,
java.lang.String... fileSpec)
throws java.lang.Exception
guiOwner - a Window instance that can be null if the dialog has no ownerfileSpec - the specifications of the file to be imported (e.g. filename, table, etc...)java.lang.Exception - a CancellationException is thrown if the user cancels the dialogprotected final boolean isThisFieldAvailable(java.lang.Enum<?> fieldID,
java.lang.Object[] oArray)
fieldID - the enum that represents the field.oArray - the line record from the file.protected final java.lang.Enum<?> setCurrentFieldID(java.lang.Object[] oArray,
java.lang.Enum<?> currentFieldID)
throws java.lang.Exception
java.lang.Exceptionprotected void checkInputFieldsValue(java.lang.Object[] oArray,
java.lang.Enum<?> fieldID)
throws java.lang.Exception
java.lang.Exceptionpublic void initGUIMode(UseModeProvider.UseMode useMode, java.lang.String... fileSpec) throws java.lang.Exception
fileSpec - the specifications of the file to be imported (e.g. filename, table, etc...)java.lang.Exception - a CancellationException is thrown if the user cancels the dialogpublic void initInScriptMode(ImportFieldManager importFieldManager) throws java.lang.Exception
importFieldManager - a valid ImportFieldManager instancejava.lang.Exception - when the groups have not been properly readprotected void setPopUpWindowEnabled(boolean isPopUpWindowEnabled)
isPopUpWindowEnabled - a booleanpublic void readAllRecords()
throws java.lang.Exception
java.lang.Exceptionpublic void readRecordsForThisGroupId(int groupId)
throws java.lang.Exception
groupId - a integer that corresponds to the group IDjava.lang.Exceptionpublic int getSelectedGroupId()
public void setSelectedGroupId(int selectedGroupId)
selectedGroupId - an Integer that represents the index of the selected grouppublic boolean isGroupingEnabled()
public java.util.List<java.lang.String> getGroupList()
public java.util.List<java.lang.Integer> getObservationIndicesForThisGroup(int groupId)
groupId - the id of the grouppublic java.lang.String getGroupName(int groupId)
groupId - the id of the grouppublic java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> getGroupMap()
protected abstract java.util.List<ImportFieldElement> defineFieldsToImport() throws java.lang.Exception
java.lang.Exceptionprotected void checkInputFieldsFormat(java.lang.Object[] oArray)
throws java.lang.Exception
oArray - the line recordjava.lang.Exceptionprotected void makeASelection(java.awt.Window guiOwner)
throws java.util.concurrent.CancellationException
guiOwner - the Frame instance that acts as ownerjava.util.concurrent.CancellationException - if the user has cancelled the dialogprotected abstract java.lang.Enum defineGroupFieldEnum()
protected abstract void readLineRecord(java.lang.Object[] oArray,
int lineCounter)
throws REpiceaRecordReader.VariableValueException,
java.lang.Exception
REpiceaRecordReader.VariableValueExceptionjava.lang.Exceptionprotected ImportFieldManager getImportFieldManager()