public class ISOMMEParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
binPath |
protected java.lang.String |
btfFile |
protected java.util.ArrayList<NameValueUnit[]> |
channel |
protected java.lang.String |
channelDir |
protected XSDContextIF |
ctx |
protected java.lang.String |
encoding |
protected java.lang.String |
filename |
protected java.util.ArrayList<NameValueUnit[]> |
measurement |
protected int |
measurementId |
protected java.lang.Integer |
numberOfSamples |
protected java.lang.String |
samplingRate |
protected java.lang.String |
timeOfFirstSample |
Constructor and Description |
---|
ISOMMEParser(XSDContextIF ctx) |
Modifier and Type | Method and Description |
---|---|
protected int[] |
checkChannelHeaders(java.io.File[] chFiles)
Check the header of all channel files.
|
protected void |
checkDirectory(java.io.File f)
Check the file exist, is a directory and is readable.
|
protected void |
checkFile(java.io.File f)
Chekc the file exist, is a file and is readable.
|
NameValueUnit[][] |
get(java.lang.String returnInfo)
Get the information from the ISO Parser.
|
protected void |
handleChannelFile(java.io.File channelFile,
java.util.ArrayList<NameValueUnit> channelLine,
int nrOfValues)
Handle a channel file.
|
void |
parse()
Parse the ISO MME-file.
|
void |
setBinPath(java.lang.String binPath)
Set the bin path for the binary files according the ODs Standard.
|
void |
setChannelDir(java.lang.String channelDir)
Set the channel directory.
|
void |
setEncoding(java.lang.String encoding)
Set the encoding of the file.
|
void |
setFilename(java.lang.String inFileName)
Set the filename of ISO file.
|
protected java.lang.String filename
protected java.util.ArrayList<NameValueUnit[]> measurement
protected java.util.ArrayList<NameValueUnit[]> channel
protected java.lang.String binPath
protected XSDContextIF ctx
protected java.lang.String encoding
protected java.lang.String btfFile
protected int measurementId
protected java.lang.Integer numberOfSamples
protected java.lang.String samplingRate
protected java.lang.String timeOfFirstSample
protected java.lang.String channelDir
public ISOMMEParser(XSDContextIF ctx)
public NameValueUnit[][] get(java.lang.String returnInfo) throws RuleException
returnInfo
- the kind of information to be returned, either measurement or channel.RuleException
- in case the returnIfo is not the expected information.public void setFilename(java.lang.String inFileName)
inFilename
- the filename.public void setChannelDir(java.lang.String channelDir)
channelDir
- the directory with the channel filenames.public void setBinPath(java.lang.String binPath)
binPath
- the path for the binary files.public void setEncoding(java.lang.String encoding)
encoding
- the encoding.public void parse() throws RuleException
RuleException
- when there is something wrong with the ISO File or the used channel files.protected void checkFile(java.io.File f) throws RuleException
f
- the file.RuleException
- when one of the criteria don't match.protected void checkDirectory(java.io.File f) throws RuleException
f
- the file.RuleException
- when one of the criteria don't match.protected int[] checkChannelHeaders(java.io.File[] chFiles) throws RuleException
chFiles
- The array of channel files.RuleException
protected void handleChannelFile(java.io.File channelFile, java.util.ArrayList<NameValueUnit> channelLine, int nrOfValues) throws RuleException
channelFile
- the file with the channel information.channelLine
- the line of the data set with the channel information of this channel.nrOfValues
- The number of declared values in this file. If less than the maximum number of values in the
submatrix, the missing values are added as invalid valuesRuleException
- when there is something wrong with the channel file.