cst.adminTool.io
Class TrialSubjectDataSpreadsheetBodyParser

java.lang.Object
  extended by cst.adminTool.io.TrialSubjectDataSpreadsheetBodyParser

public class TrialSubjectDataSpreadsheetBodyParser
extends java.lang.Object

Parses TrialSubjectModel records from tabular text files. Note that it reads the identifier and filter attributes only. It does not read activity data. An example record may appear as something like this:

 123M456        Birmingham      Male    30-39
 222F344        Swansea         Female  20-29
 

The parser relies on information provided by cst.common.io.PreviewSpreadsheetImporterEditor to map the columns which appear in the text file with the identifier and filter attribute fields of a subject record.


 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)

Constructor Summary
TrialSubjectDataSpreadsheetBodyParser(AdminServiceAPI adminServiceAPI, TrialSubjectModelFactory trialSubjectModelFactory, SpreadsheetTransferSettings transferSettings, TrialSubjectDataHeaderParser coreDataHeaderParser)
           
 
Method Summary
 TrialSubjectModel createTrialSubjectModel(java.lang.String currentLine)
           
 void importData(User currentUser, java.io.BufferedReader reader)
           
 void setCurrentUser(User currentUser)
           
 void setDataSourceName(java.lang.String dataSourceName)
           
 void validateData(java.io.BufferedReader reader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrialSubjectDataSpreadsheetBodyParser

public TrialSubjectDataSpreadsheetBodyParser(AdminServiceAPI adminServiceAPI,
                                             TrialSubjectModelFactory trialSubjectModelFactory,
                                             SpreadsheetTransferSettings transferSettings,
                                             TrialSubjectDataHeaderParser coreDataHeaderParser)
Method Detail

setDataSourceName

public void setDataSourceName(java.lang.String dataSourceName)

importData

public void importData(User currentUser,
                       java.io.BufferedReader reader)
                throws CSTException
Throws:
CSTException

createTrialSubjectModel

public TrialSubjectModel createTrialSubjectModel(java.lang.String currentLine)
                                          throws CSTException
Throws:
CSTException

validateData

public void validateData(java.io.BufferedReader reader)

setCurrentUser

public void setCurrentUser(User currentUser)