/** * make a form suitable to 1) reconstruct the original given access to starting conditions * * @param adder !null where to put the data */ @Override public void serializeAsString(IXMLAppender adder) { String tag = TAG; adder.openTag(tag); adder.appendAttribute( "precursorIntensity", XTandemUtilities.formatDouble(getPrecursorIntensity(), 1)); adder.appendAttribute("precursorCharge", Integer.toString(getPrecursorCharge())); FragmentationMethod method = getMethod(); if (method == null) method = FragmentationMethod.CID; adder.appendAttribute("activationMethod", method); adder.endTag(); adder.appendText(XTandemUtilities.formatDouble(getMassChargeRatio(), 3)); adder.closeTag(tag); }
/** * make a form suitable to 1) reconstruct the original given access to starting conditions * * @param adder !null where to put the data */ public void serializeAsString(IXMLAppender adder) { String[] algorithms = getScoringAlgorithms(); String tag = TAG; adder.openTag(tag); adder.endTag(); adder.cr(); for (int i = 0; i < algorithms.length; i++) { String algorithm = algorithms[i]; IScoredScan scoredScan = getScoredScan(algorithm); scoredScan.serializeAsString(adder); } adder.closeTag(tag); }