@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); }
/** * Receive notification of the start of an element. * * <p> * * <p>By default, do nothing. Application writers may override this method in a subclass to take * specific actions at the start of each element (such as allocating a new tree node or writing * output to a file). * * @param uri The Namespace URI, or the empty string if the element has no Namespace URI or if * Namespace processing is not being performed. * @param localName The local name (without prefix), or the empty string if Namespace processing * is not being performed. * @param el The qualified name (with prefix), or the empty string if qualified names are not * available. * @param attributes The attributes attached to the element. If there are no attributes, it shall * be an empty Attributes object. * @throws org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception. * @see org.xml.sax.ContentHandler#startElement */ @Override public void startElement(String uri, String localName, String el, Attributes attributes) throws SAXException { if ("IonScore".equals(el)) { IonScoreHandler handler = new IonScoreHandler(this); getHandler().pushCurrentHandler(handler); handler.handleAttributes(uri, localName, el, attributes); return; } if ("ProteinPosition".equals(el)) { ProteinPositionHandler handler = new ProteinPositionHandler(this, m_Peptide); getHandler().pushCurrentHandler(handler); handler.handleAttributes(uri, localName, el, attributes); return; } if ("usage".equals(el)) { clearIncludedText(); return; } super.startElement(uri, localName, el, attributes); }