This method is called by startElement method. (override method)
200 if( strcmp( name, CVPARAM_TAG_NAME ) == 0 ) {
201 const char* a = attrs.getStringValue( CV_ACC_ATTR_NAME,
"" );
202 const char* n = attrs.getStringValue( CV_NAME_ATTR_NAME,
"" );
203 const char* v = attrs.getStringValue( CV_VALUE_ATTR_NAME,
"" );
205 if( strcmp( a,
"MS:1000511" ) == 0 ) {
206 int stage = toint( v, 10, 1 );
214 else if( strcmp( a,
"MS:1000521" ) == 0 ) {
217 else if( strcmp( a,
"MS:1000523" ) == 0 ) {
220 else if( strcmp( a,
"MS:1000576" ) == 0 ) {
223 else if( strcmp( a,
"MS:1000574" ) == 0 ) {
226 else if( strcmp( a,
"MS:1000127" ) == 0 ) {
234 else if( strcmp( a,
"MS:1000128" ) == 0 ) {
242 else if( strcmp( a,
"MS:1000129" ) == 0 ) {
244 m_currSpecInfo->polarity = kome::objects::Spectrum::POLARITY_NEGATIVE;
247 m_currSpec->setPolarity( kome::objects::Spectrum::POLARITY_NEGATIVE );
250 else if( strcmp( a,
"MS:1000130" ) == 0 ) {
252 m_currSpecInfo->polarity = kome::objects::Spectrum::POLARITY_POSITIVE;
255 m_currSpec->setPolarity( kome::objects::Spectrum::POLARITY_POSITIVE );
258 else if( strcmp( a,
"MS:1000501" ) == 0 ) {
259 double lowMz = todouble( v, -1.0 );
267 else if( strcmp( a,
"MS:1000500" ) == 0 ) {
268 double upMz = todouble( v, -1.0 );
276 else if( strcmp( a,
"MS:1000285" ) == 0 ) {
277 double tic = todouble( v, -1.0 );
285 else if( strcmp( a,
"MS:1000504" ) == 0 ) {
286 double bpm = todouble( v, -1.0 );
294 else if( strcmp( a,
"MS:1000505" ) == 0 ) {
295 double bpi = todouble( v, -1.0 );
303 else if( strcmp( a,
"MS:1000016" ) == 0 ) {
304 double rt = todouble( v, -1.0 );
305 const char* unit = attrs.getStringValue( CV_UNIT_ATTR_NAME,
"" );
306 if( strcmp( unit,
"UO:0000031" ) != 0 ) {
318 else if( strcmp( a,
"MS:1000744" ) == 0 ) {
319 double prec = todouble( v, -1.0 );
327 else if( strcmp( a,
"MS:1000512" ) == 0 ) {
332 m_currSpec->getProperties().setValue(
"Filter", v );
335 else if( strcmp( a,
"MS:1000040" ) == 0 ) {
336 double mz = todouble( v, -1.0 );
341 else if( strcmp( a,
"MS:1000827" ) == 0 ) {
343 std::string name =
"Isolation Window Target m/z";
345 name =
"Precursor Target";
348 name =
"Product Target";
352 m_currSpecInfo->props.push_back( std::make_pair( name.c_str(), v ) );
355 m_currSpec->getProperties().setValue( name.c_str(), v );
360 double mz = todouble( v, -1.0 );
371 else if( strcmp( a,
"MS:1000045" ) == 0 ) {
372 const char* unitId = attrs.getStringValue(
"unitAccession",
"" );
374 if( strcmp( unitId,
"UO:0000266" ) == 0 ) {
375 ce = FMT(
"%s eV", v );
394 m_file.setInstrument( n );
398 const char* u = attrs.getStringValue( CV_UNIT_ATTR_NAME,
"" );
402 if( strcmp( a, MZ_ARRAY_ACC ) == 0 ) {
405 else if( strcmp( a, RT_ARRAY_ACC ) == 0 ) {
407 if( strcmp( u,
"UO:0000031" ) != 0 ) {
411 else if( strcmp( a, INT_ARRAY_ACC ) == 0 ) {
421 m_currSpecInfo->props.push_back( std::make_pair(
"Spectrum Type", n ) );
424 m_currSpec->getProperties().setValue(
"Spectrum Type", n );
432 else if( strcmp( name, SRC_FILE_TAG_NAME ) == 0 ) {
434 std::string file = attrs.getStringValue( SRC_FILE_ATTR_NAME,
"" );
435 std::string location = attrs.getStringValue( SRC_LOC_ATTR_NAME,
"" );
437 if( !location.empty() ) {
438 if( location[ (
int)location.length() - 1 ] !=
'/' ) {
439 location.append(
"/" );
442 location.append( file );
446 else if( strcmp( name, SOFTWARE_TAG_NAME ) == 0 ) {
450 else if( strcmp( name, PARAM_GROUP_TAG_NAME ) == 0 ) {
451 m_arrayInfo.name = attrs.getStringValue( PARAM_GROUP_ID_ATTR_NAME,
"" );
461 else if( strcmp( name, SPEC_TAG_NAME ) == 0 ) {
463 const char*
id = attrs.getStringValue( SPEC_ID_ATTR_NAME,
"Scan" );
466 long long pos =
m_pos;
478 int scanNum = attrs.getIntValue( SPEC_SCAN_NUM_ATTR_NAME,
m_scanNum );
483 int stage = attrs.getIntValue( SPEC_MS_LEVEL_ATTR_NAME, dfSpec->stage );
488 std::string strSpotID = attrs.getStringValue(
"spotID",
"" );
489 if ( !strSpotID.empty( ) )
494 else if( strcmp( name, PRECURSOR_TAG_NAME ) == 0 ) {
496 const char*
id = attrs.getStringValue( PREC_SPEC_ATTR_NAME, NULL );
497 kome::objects::Spectrum* parent = NULL;
509 else if( strcmp( name, PRODUCT_TAG_NAME ) == 0 ) {
512 else if( strcmp( name, CHROM_TAG_NAME ) == 0 ) {
514 const char*
id = attrs.getStringValue( CHROM_ID_ATTR_NAME,
"Chromatogram" );
521 else if( strcmp( name, ION_SELECTION_TAG_NAME ) == 0 ) {
524 else if( strcmp( name, USR_PARAM_TAG_NAME ) == 0 ) {
526 std::string n = attrs.getStringValue( USR_PARAM_NAME_ATTR_NAME,
"" );
527 std::string v = attrs.getStringValue( USR_PARAM_VAL_ATTR_NAME,
"" );
531 kome::core::Properties* props = &
m_file.getRootDataGroupNode()->getProperties();
541 props->setValue( n.c_str(), v.c_str() );
545 else if( strcmp( name, OFFSET_TAG_NAME ) == 0 ) {
546 m_offsetScan = attrs.getIntValue( OFFSET_SCAN_ATTR_NAME, -1 );
547 m_offsetId = attrs.getStringValue( OFFSET_IDREF_ATTR_NAME,
"" );
549 else if( strcmp( name, REF_TAG_NAME ) == 0 ) {
550 std::string
id = attrs.getStringValue( REF_REF_ATTR_NAME,
"" );
std::string m_currSoftwareName
std::map< int, MzmlSpectrum * > m_specScanMap
static AccessionManager & getInstance()
gets accession manager object (This is the only object.)
MzmlChromatogram * m_currChrom
SpecInfo * getSpecInfo(const char *name)
gets the spectrum information
SpecInfo * m_currSpecInfo
const char * getName()
gets accession name
Accession * m_softwareAcc
Accession * getOrigin()
gets origin accesion
MzmlSample::ArrayInfo m_arrayInfo
std::map< std::string, MzmlChromatogram * > m_chromIdMap
Accession * getAccession(const unsigned int idx)
gets accession
std::map< std::string, MzmlSpectrum * > m_specIdMap
accession object management class
std::string m_currSoftwareVersion
mzml sample spectrum class
accession information class
mzml sample spectrum class
void setSpecInfo(kome::objects::Spectrum *spec, SpecInfo *info)
sets the spectrum information
void setOffset(const long long offset)
sets data offset
MzmlSpectrum * m_currSpec
void addParentFile(const char *path)
adds parent files