if (getFieldAxis() != null) { List axisList = getAxes(); axisList.remove(0); if (fieldAxis != null) { axisList.add(0, fieldAxis); hasFieldAxis = true; } } else { if (fieldAxis != null) { getAxes().add(0, fieldAxis);  hasFieldAxis = true; getDataCube().reset();   }
if (hasFieldAxis) {  FieldAxis removeAxis = null; if (fieldAxis != null) { removeAxis = (FieldAxis) getAxes().get(0); getAxes().set(0, fieldAxis); } else { removeAxis = (FieldAxis) getAxes().remove(0); hasFieldAxis = false; }    int removeIndex = getXMLDataIOStyle().getIOAxesOrder().lastIndexOf(removeAxis); getXMLDataIOStyle().getIOAxesOrder().remove(removeIndex); if (fieldAxis != null) getXMLDataIOStyle().getIOAxesOrder().add(removeIndex, fieldAxis);  } else {  hasFieldAxis = true; getAxes().add(0, fieldAxis); getXMLDataIOStyle().getIOAxesOrder().add(fieldAxis);
   public boolean setFieldAxis (FieldAxis fieldAxis) {       if (!canAddAxisObjToArray(fieldAxis))         return false;          hasFieldAxis = false;        if (getFieldAxis() != null) { // replace or removal          List axisList = getAxes();         axisList.remove(0);         if (fieldAxis != null) {             axisList.add(0, fieldAxis);  //replace the old fieldAxis with the new one            hasFieldAxis = true;         }        } else {  //add a fieldAxis where none prev existed.         if (fieldAxis != null) { // only if we have something to add             getAxes().add(0, fieldAxis);//            getDataCube().incrementDimension(fieldAxis); // increment dimension            hasFieldAxis = true;            getDataCube().reset(); // reset data within the datacube                                   // since we no longer can guarente internal ordering                                   // as the field axis goes in slot "0".         }       }       // IF we had an object, update the locators       if (fieldAxis != null) {          updateChildLocators(fieldAxis, "add");       }       updateNotesLocationOrder(); // reset to the current order of the axes                                   // may not be needed, but we do for all cases anyways          //array doenst hold a dataformat anymore       //each field along the fieldAxis should have dataformat       // IF fieldAxis exists       if (hasFieldAxis) {           setDataFormat(null);       }       return true;   }