in taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/OdfPackage.java [1576:1628]
public void startElement(String namespaceURI, String localName,
String qName, Attributes atts) throws SAXException {
switch (localName) {
case "file-entry":
fileEntry = new OdfFileEntry();
fileEntry.setPath(atts.getValue("manifest:full-path"));
fileEntry.setMediaType(atts.getValue("manifest:media-type"));
try {
if (atts.getValue("manifest:size") != null)
fileEntry.setSize(Integer.parseInt(atts
.getValue("manifest:size")));
} catch (NumberFormatException nfe) {
throw new SAXException("not a number: "
+ atts.getValue("manifest:size"));
}
fileEntry.setVersion(atts.getValue("manifest:version"));
break;
case "encryption-data":
encryptionData = new EncryptionData();
if (fileEntry != null) {
encryptionData.setChecksumType(atts
.getValue("manifest:checksum-type"));
encryptionData.setChecksum(atts
.getValue("manifest:checksum"));
fileEntry.setEncryptionData(encryptionData);
}
break;
case "algorithm":
Algorithm algorithm = new Algorithm();
algorithm.setName(atts.getValue("manifest:algorithm-name"));
algorithm.setInitializationVector(atts
.getValue("manifest:initialization-vector"));
if (encryptionData != null)
encryptionData.setAlgorithm(algorithm);
break;
case "key-derivation":
KeyDerivation keyDerivation = new KeyDerivation();
keyDerivation.setName(atts
.getValue("manifest:key-derivation-name"));
keyDerivation.setSalt(atts.getValue("manifest:salt"));
try {
if (atts.getValue("manifest:iteration-count") != null)
keyDerivation.setIterationCount(Integer.parseInt(atts
.getValue("manifest:iteration-count")));
} catch (NumberFormatException nfe) {
throw new SAXException("not a number: "
+ atts.getValue("manifest:iteration-count"));
}
if (encryptionData != null)
encryptionData.setKeyDerivation(keyDerivation);
break;
}
}