class XMLSave {

    protected void saveElementID(EObject o) {
        String id = helper.getID(o);

        // Kogito customization clause
        // Ensure all object have an id set, if not yet,
        // otherwise references to those are not being properly resolved.
        // See also XMLHelper#getHREF(EObject)
        if (null == id && o instanceof BaseElement) {
            String eId = ((BaseElement) o).getId();
            if (null == eId && isIdNeeded(o)) {
                id = EcoreUtil.generateUUID();
                ((BaseElement) o).setId(id);
            }
        }
        if (id != null) {
            if (!toDOM) {
                doc.addAttribute(idAttributeName, id);
            } else {
                Attr attr = getGwtDOMHandler().createAttributeNS(idAttributeNS, idAttributeName);
                attr.setNodeValue(id);
                getGwtDOMHandler().setAttributeNodeNS(currentNode, attr);
                handler.recordValues(attr, o, null, o);
            }
        }
        saveFeatures(o);
    }

    public  XMLSave(XMLHelper helper);
    public  XMLSave(Map<?, ?> options, XMLHelper helper, String encoding);
    public  XMLSave(Map<?, ?> options, XMLHelper helper, String encoding, String xmlVersion);

}