/** finish handling and set up the enclosed object Usually called when the end tag is seen */ @Override public void finishProcessing() { IMeasuredSpectrum pMeasured = null; final double pScore = getScore(); final double pHyperScore = getHyperScore(); final double rawScore = getRawScore(); IonTypeScorer scorer = getIonScore(); IProteinPosition[] containedInProteins = m_Positions.toArray(IProteinPosition.EMPTY_ARRAY); ((Polypeptide) m_Peptide).setContainedInProteins(containedInProteins); SpectralMatch scan = new SpectralMatch(m_Peptide, pMeasured, pScore, pHyperScore, rawScore, scorer, null); if (m_Usage != null) scan.getUsage().addTo(m_Usage); setElementObject(scan); }
@Override public void endElement(String elx, String localName, String el) throws SAXException { if ("IonScore".equals(el)) { IonScoreHandler handler = (IonScoreHandler) getHandler().popCurrentHandler(); m_IonScore.set(handler.getElementObject()); return; } if ("ProteinPosition".equals(el)) { ProteinPositionHandler handler = (ProteinPositionHandler) getHandler().popCurrentHandler(); m_Positions.add(handler.getElementObject()); return; } if ("usage".equals(el)) { String txt = getIncludedText(); m_Usage = SpectralPeakUsage.deserializeUsage(txt); return; } super.endElement(elx, localName, el); }