newnote.setNoteId(null);
newnote.setNoteId(findUniqueIdName(NoteObj, newnote.getNoteId()));   NoteObj.put(newnote.getNoteId(), newnote);
       public Object action (SaxDocumentHandler handler, AttributeList attrs) {           String parentNodeName = getParentNodeName();            // create new object appropriately            Note newnote = new Note();           newnote.setXMLAttributes(attrs); // set XML attributes from passed list            String noteId = newnote.getNoteId();           String noteIdRef = newnote.getNoteIdRef();           // add this object to the lookup table, if it has an ID           if (noteId != null) {              // a warning check, just in case               if (NoteObj.containsKey(noteId))                 Log.warnln("More than one note node with noteId=\""+noteId+"\", using latest node." );              // add this into the list of note objects              NoteObj.put(noteId, newnote);           }           //  If there is a reference object, clone it to get           //  the new axis           if (noteIdRef != null) {              if (NoteObj.containsKey(noteIdRef)) {                 BaseObject refNoteObj = (BaseObject) NoteObj.get(noteIdRef);                 try {                    newnote = (Note) refNoteObj.clone();                 } catch (java.lang.CloneNotSupportedException e) {                    Log.errorln("Weird error, cannot clone note object. Aborting read.");                    System.exit(-1);                 }                 // override attrs with those in passed list                 newnote.setXMLAttributes(attrs);                 newnote.setNoteId(null); // note shouldnt have noteId from the parent              } else {                 Log.warnln("Error: Reader got a note with NoteIdRef=\""+noteIdRef+"\" but no previous note has that id! Ignoring add note request.");                 return (Object) null;              }           }           // add this object to parent object           if( parentNodeName.equals(XDFNodeName.NOTES) )           {              // only NOTES objects appear in arrays, so we can               // just add to the current array              CurrentArray.addNote(newnote);           } else if ( parentNodeName.equals(XDFNodeName.FIELD) )           {              LastFieldObject.addNote(newnote);           } else if ( parentNodeName.equals(XDFNodeName.PARAMETER) )           {              LastParameterObject.addNote(newnote);           } else            {              Log.warnln( "Unknown parent node: "+parentNodeName+" for note. Ignoring.");           }           LastNoteObject = newnote;           return newnote;       }