use of org.bedework.util.calendar.PropertyIndex.ParameterInfoIndex in project bw-calendar-engine by Bedework.
the class IcalTranslator method xmlParameter.
private void xmlParameter(final XmlEmit xml, final Parameter val) throws CalFacadeException {
try {
ParameterInfoIndex pii = ParameterInfoIndex.lookupPname(val.getName());
QName ptype = XcalTags.textVal;
if (pii != null) {
DataType dtype = pii.getPtype();
if (dtype != null) {
ptype = dtype.getXcalType();
}
}
if (ptype.equals(XcalTags.textVal)) {
QName tag = new QName(XcalTags.namespace, val.getName().toLowerCase());
xml.property(tag, val.getValue());
} else {
QName tag = openTag(xml, val.getName());
xml.property(ptype, val.getValue());
xml.closeTag(tag);
}
} catch (CalFacadeException cfe) {
throw cfe;
} catch (Throwable t) {
throw new CalFacadeException(t);
}
}
Aggregations