use of xades4j.xml.bind.xades.XmlQualifyingPropertiesType in project xades4j by luisgoncalves.
the class DefaultQualifyingPropertiesUnmarshaller method unmarshalProperties.
@Override
public void unmarshalProperties(Element qualifyingProps, QualifyingPropertiesDataCollector propertyDataCollector) throws UnmarshalException {
XmlQualifyingPropertiesType xmlQualifyingProps = null;
try {
// Create the JAXB unmarshaller and unmarshalProperties the root JAXB element
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
JAXBElement<XmlQualifyingPropertiesType> qualifPropsElem = (JAXBElement<XmlQualifyingPropertiesType>) unmarshaller.unmarshal(qualifyingProps);
xmlQualifyingProps = qualifPropsElem.getValue();
} catch (jakarta.xml.bind.UnmarshalException ex) {
throw new UnmarshalException("Cannot bind XML elements to Java classes", ex);
} catch (JAXBException ex) {
throw new UnmarshalException("Cannot unmarshall properties. Error on JAXB unmarshalling.", ex);
}
// Iterate the modules to convert the different types of properties.
for (UnmarshallerModule module : modules) {
module.convertProperties(xmlQualifyingProps, qualifyingProps, propertyDataCollector);
}
}
Aggregations