try {
double doubleVal = Double.parseDouble(valStr);
String units = element.getAttributeValue("units");
ValueContainer container =
(ValueContainer) findObject(ValueContainer.class);
TimeValue value = definitionsFactory.createTimeValue();
value.setTime(doubleVal);
value.setUnits(units);
container.addValue(value);
} catch (NumberFormatException nfe) {
System.out.println("Invalid time: '" + valStr + "'");
}
} else if (name.equals("pairValue")) {
PairValueContainer pair = new PairValueContainer();
pushObject(pair);
processThemePropertyChildren(element);
popObject();
PairValue value = definitionsFactory.createPairValue();
value.setFirst(pair.getFirst());
value.setSecond(pair.getSecond());
ValueContainer container =
(ValueContainer) findObject(ValueContainer.class);
container.addValue(value);
} else if (name.equals("listValue")) {
ListValueContainer pair = new ListValueContainer();
pushObject(pair);
processThemePropertyChildren(element);
popObject();
ListValue value = definitionsFactory.createListValue();
Value next = null;
while((next = pair.getNext())!=null){
value.setNext(next);
}
ValueContainer container =
(ValueContainer) findObject(ValueContainer.class);
container.addValue(value);
} else if (name.equals("frequencyValue")) {
String valStr = element.getText();
try {
double doubleVal = Double.parseDouble(valStr);
String units = element.getAttributeValue("units");
ValueContainer container =
(ValueContainer) findObject(ValueContainer.class);
FrequencyValue value = definitionsFactory.createFrequencyValue();
value.setNumber(doubleVal);
value.setUnits(units);
container.addValue(value);
} catch (NumberFormatException nfe) {
System.out.println("Invalid frequency: '" + valStr + "'");
}
} else if (name.equals("fractionValue")) {
PairValueContainer pair = new PairValueContainer();
pushObject(pair);
processThemePropertyChildren(element);
popObject();
FractionValue value = definitionsFactory.createFractionValue();
value.setNumerator(pair.getFirst());
value.setDenominator(pair.getSecond());
ValueContainer container =
(ValueContainer) findObject(ValueContainer.class);
container.addValue(value);
} else if (name.equals("keywordRef")) {