private void setIdToXObject(XObject obj) {
   obj.setId("" + idCounter);
   idCounter++;
 }