use of com.evolveum.midpoint.xml.ns._public.resource.capabilities_3 in project midpoint by Evolveum.
the class XmlParser method parseObject.
private boolean parseObject(XMLStreamReader stream, XmlObjectHandler handler, int serial, Map<String, String> nsMap) {
XmlObjectMetadata metadata = new XmlObjectMetadata();
metadata.setSerialNumber(serial);
metadata.setStartLine(stream.getLocation().getLineNumber());
com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType object = null;
try {
Document objectDoc = domConverter.buildDocument(stream);
Element objectElement = ToolsUtils.getFirstChildElement(objectDoc);
ToolsUtils.setNamespaceDeclarations(objectElement, nsMap);
Unmarshaller unmarshaller = ToolsUtils.JAXB_CONTEXT.createUnmarshaller();
Object obj = unmarshaller.unmarshal(objectElement);
if (!(obj instanceof com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType)) {
throw new XmlParserException("Xml object '" + obj.getClass().getName() + "' doesn't represent 'ObjectType'");
}
object = (ObjectType) obj;
} catch (JAXBException | XMLStreamException | XmlParserException ex) {
metadata.setException(ex);
}
metadata.setEndLine(stream.getLocation().getLineNumber());
return handler.handleObject(object, metadata);
}
Aggregations