if ( thisValueList.getIsDelimitedCase() ) return;
if ( thisValueList.getIsDelimitedCase() ) { String parentNodeName = thisValueList.getParentNodeName();   String valueListId = thisValueList.getValueListId(); if (valueListId != null) {   if (ValueListObj.containsKey(valueListId)) Log.warnln("More than one valueList node with valueListId=\""+valueListId+"\", using latest node." );   ValueListObj.put(valueListId, thisValueList);  }   String valueListIdRef = thisValueList.getValueListIdRef(); if (valueListIdRef != null) {  if (ValueListObj.containsKey(valueListIdRef)) {    ValueList refValueListObj = (ValueList) ValueListObj.get(valueListIdRef); try { thisValueList = (ValueList) refValueListObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone valueList object. Aborting read."); System.exit(-1); }  } else { Log.warnln("Error: Reader got an valueList with ValueListIdRef=\""+valueListIdRef+"\" but no previous valueList has that id! Ignoring add valueList request."); return; } }   ArrayList myValueList = splitStringIntoValueObjects(valueListString, thisValueList);    ValueListDelimitedList newValueListObj = new ValueListDelimitedList (myValueList, thisValueList.getDelimiter(), thisValueList.getNoData(), thisValueList.getInfinite(), thisValueList.getInfiniteNegative(), thisValueList.getNotANumber(), thisValueList.getOverflow(), thisValueList.getUnderflow() );  if( parentNodeName.equals(XDFNodeName.AXIS) )  {   List axisList = (List) CurrentArray.getAxes(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1);  lastAxisObject.addAxisValueList(newValueListObj);  } else if( parentNodeName.equals(XDFNodeName.PARAMETER) ) {  LastParameterObject.addValueList( newValueListObj);  } else { Log.errorln("Error: weird parent node "+parentNodeName+" for "+XDFNodeName.VALUELIST+", Ignoring."); }   Iterator iter = myValueList.iterator(); while (iter.hasNext()) {  Value newvalue = (Value) iter.next();  Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } }   CurrentValueList = null; valueListString = null; return;  }
       public void action (SaxDocumentHandler handler)        throws SAXException       {          ValueList thisValueList = CurrentValueList;          // generate valuelist values from algoritm IF we need to          // (e.g. values where'nt in a delimited cdata list)          // check to see if we didnt alrealy parse from a delmited string.          if ( thisValueList.getIsDelimitedCase() )             return; // we already did the list, leave here           // 1. grab parent node name          String parentNodeName = thisValueList.getParentNodeName();          // 2. Find the list of values. If there is a reference object, clone it to get          //    the new values list, otherwise, determine values from attributes           //    (e.g. algorithm method)          String valueListIdRef = thisValueList.getValueListIdRef();          if (valueListIdRef != null) {             if (ValueListObj.containsKey(valueListIdRef)) {                 // Just a simple clone since we have stored the ArrayList rather than the                 // ValueList object (which actually doesnt exist. :P                 /*                 ArrayList refValueListObj = (ArrayList) ValueListObj.get(valueListIdRef);                 values  = (ArrayList) refValueListObj.clone();                 */                 ValueList refValueListObj = (ValueList) ValueListObj.get(valueListIdRef);                 try {                    thisValueList = (ValueList) refValueListObj.clone();                 } catch (java.lang.CloneNotSupportedException e) {                    Log.errorln("Weird error, cannot clone valueList object. Aborting read.");                    System.exit(-1);                 }             } else {                 Log.warnln("Error: Reader got an valueList with ValueListIdRef=\""+valueListIdRef+"\" but no previous valueList has that id! Ignoring add valueList request.");                 return;              }          }           // 3. add this valueList to the lookup table, if the original valueList had an ID          String valueListId = thisValueList.getValueListId();          if (valueListId != null) {              // a warning check, just in case               if (ValueListObj.containsKey(valueListId))                 Log.warnln("More than one valueList node with valueListId=\""+valueListId+"\", using latest node." );              // add the valueList array into the list of valueList objects              ValueListObj.put(valueListId, thisValueList);          }          // 4. Populate correct parent node w/ values           ValueListAlgorithm valueListObj = new ValueListAlgorithm ( thisValueList.getStart(),                                                                     thisValueList.getStep(),                                                                     thisValueList.getSize(),                                                                     thisValueList.getNoData(),                                                                     thisValueList.getInfinite(),                                                                     thisValueList.getInfiniteNegative(),                                                                     thisValueList.getNotANumber(),                                                                     thisValueList.getOverflow(),                                                                     thisValueList.getUnderflow()                                                                   );          if( parentNodeName.equals(XDFNodeName.AXIS) )          {             // get the last axis             List axisList = (List) CurrentArray.getAxes();             Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1);             lastAxisObject.addAxisValueList( valueListObj);          }           else if ( parentNodeName.equals(XDFNodeName.PARAMETER) )          {             LastParameterObject.addValueList( valueListObj);          }           else if ( parentNodeName.equals(XDFNodeName.VALUEGROUP) )          {             if ( LastValueGroupParentObject instanceof Parameter )             {                Parameter myParamObject = (Parameter) LastValueGroupParentObject;                   myParamObject.addValueList( valueListObj);             } else if ( LastValueGroupParentObject instanceof Axis )             {                // get the last axis                Axis myAxisObject = (Axis) LastValueGroupParentObject;                myAxisObject.addAxisValueList( valueListObj);             } else {                Log.warnln("Error: unknown valueGroupParent "+LastValueGroupParentObject+                           " cant treat for "+XDFNodeName.VALUELIST);                return; // bail              }          } else {             Log.errorln("Error: weird parent node "+parentNodeName+" for "+XDFNodeName.VALUELIST+". Ignoring");          }          // 5. now add valueObjects to groups           List values = valueListObj.getValues();          Iterator iter = values.iterator();          while (iter.hasNext())          {             Value newvalue = (Value) iter.next();             // add this object to all open value groups             Iterator groupIter = CurrentValueGroupList.iterator();             while (groupIter.hasNext())             {                ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next();                newvalue.addToGroup(nextValueGroupObj);             }          }       }