public Object unmarshal(QName type, Element data) throws JAXBException { return unmarshal(type, data, true); }
public Object unmarshalDefaultValue(ConfigurationItemMetadata item, Element data, boolean doValidate) { try { return unmarshal(item.getType(), data, doValidate); } catch (JAXBException ex) { if (forceDefaults) { Message msg = new Message("DEFAULT_VALUE_UNMARSHAL_ERROR_EXC", LOG, item.getName()); throw new ConfigurationException(msg, ex); } return null; } }
public Object getValue() { Object o = super.getValue(); if (o instanceof Element) { Element el = (Element)o; QName type = new QName(el.getNamespaceURI(), el.getLocalName()); TypeSchema ts = new TypeSchemaHelper(true).get(type.getNamespaceURI()); if (null == ts) { throw new ConfigurationException(new Message("JAXB_PROPERTY_EDITOR_EXC", LOG, type)); } try { return ts.unmarshal(type, el); } catch (JAXBException ex) { Message msg = new Message("JAXB_PROPERTY_EDITOR_EXC", LOG, type); throw new ConfigurationException(msg, ex); } } return o; } }
public Object getValue() { Object o = super.getValue(); if (o instanceof Element) { Element el = (Element)o; QName type = new QName(el.getNamespaceURI(), el.getLocalName()); TypeSchema ts = new TypeSchemaHelper(true).get(type.getNamespaceURI()); if (null == ts) { throw new ConfigurationException(new Message("JAXB_PROPERTY_EDITOR_EXC", LOG, type)); } try { return ts.unmarshal(type, el); } catch (JAXBException ex) { Message msg = new Message("JAXB_PROPERTY_EDITOR_EXC", LOG, type); throw new ConfigurationException(msg, ex); } } return o; }
public Object getValue() { Object o = super.getValue(); if (o instanceof Element) { Element el = (Element)o; QName type = new QName(el.getNamespaceURI(), el.getLocalName()); TypeSchema ts = new TypeSchemaHelper(true).get(type.getNamespaceURI()); if (null == ts) { throw new ConfigurationException(new Message("JAXB_PROPERTY_EDITOR_EXC", LOG, type)); } try { return ts.unmarshal(type, el); } catch (JAXBException ex) { Message msg = new Message("JAXB_PROPERTY_EDITOR_EXC", LOG, type); throw new ConfigurationException(msg, ex); } } return o; } }