/** * Parser calls this for each element in a document. * * @param namespaceURI the namespace (not used) * @param localName the current tag we are parsing * @param qName ? (not used) * @param atts attributes for the current tag * @throws SAXException if there is a problem with the parser */ public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { currentKey = localName; elementBuffer = ""; if (currentKey.equals("processStep")) { currentEntry = new ProvenanceEntry(); } else if (currentKey.equals("program")) { currentEntry.setProgram(atts.getValue("version"), atts.getValue("build")); } else if (currentKey.equals("programArguments")) { currentEntry.setProgramArguments(atts.getValue("inputs"), atts.getValue("outputs")); } else if (currentKey.equals("platform")) { currentEntry.setPlatformVersion(atts.getValue("version")); } else if (currentKey.equals("compiler")) { currentEntry.setJavaVersion(atts.getValue("version")); } }