context.addRootElement(identificationRootElement,
identificationRootElement.getName());
MarkerGeneratingErrorReporter errorReporter =
context.getErrorReporter(identificationRootElement);
LocationDetailsRegistry registry =
errorReporter.getLocationDetailsRegistry();
if (registry == null) {
registry = new LocationDetailsRegistry();
errorReporter.setLocationDetailsRegistry(registry);
}
DefaultJDOMFactory factory = new DefaultJDOMFactory();
Element element = factory.element(DeviceRepositorySchemaConstants.
USER_AGENT_PATTERN_ELEMENT_NAME,
MCSNamespace.DEVICE_IDENTIFICATION);
LocationDetails details =
new DeviceLocationDetails(ERROR_LOCATION_FORMAT,
MCSNamespace.DEVICE_IDENTIFICATION);
registry.registerLocationDetails(element, details);
} catch (SAXException e) {
EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e);
} catch (ParserErrorException e) {
EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e);
}