cst.adminTool.io
Class ImportTrialSubjectDataUsingWizards
java.lang.Object
cst.adminTool.io.ImportTrialSubjectDataUsingWizards
public class ImportTrialSubjectDataUsingWizards
- extends java.lang.Object
Guides end-users through the process of importing activity data into the data repository.
-
Show an instance of the
DataSelectionEditor
to allow users to specify features of the imported file. Properties include the file name, the type of delimiter, whether comments and blank values are allowed and the name of the activity for the data.
-
Determine the first line of data using an instance of
FindFirstLineDialog
.
-
Using an instance of
PreviewSpreadsheetImportEditor
, show a preview of the data in tabular form, beginning with the first row that was previously specified by the user.
-
Map the table columns to date fields in the activity specified by the user in the
DataSelectionEditor
.
-
Pass all of the settings gathered by the previous dialogs to an instance of
TrialSubjectDataSpreadsheetParsingEngine
.
This class is responsible for successfully parsing the text file and adding records to the data repository.
-
The
TrialSubjectDataSpreadsheetParsingEngine
class delegates parsing duties to two other classes.
TrialSubjectDataHeaderParser
is responsible for checking for duplicated or unrecognised header column values that don't fit
with the mapping information passed to it by the PreviewSpreadsheetImportEditor
.
-
If no errors occur when the header is processed, the engine attempts to read the import file in two passes.
-
In the first pass, it calls
TrialSubjectDataSpreadsheetBodyParser
to validate the data rows.
-
If errors are encountered then an error file is generated.
-
Otherwise if no errors are detected in the data, then the same class attempts to import the data and submit it to the data repository.
Copyright 2010 Medical Research Council Unit for Lifelong Health and Ageing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- Version:
- 1.0
- Author:
- Kevin Garwood (kgarwood@users.sourceforge.net)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImportTrialSubjectDataUsingWizards
public ImportTrialSubjectDataUsingWizards(SessionProperties sessionProperties)
importCoreData
public void importCoreData()