private void mergeSOFNode(Node node) throws IIOInvalidTreeException {
  SOFMarkerSegment sof=(SOFMarkerSegment)findMarkerSegment(SOFMarkerSegment.class,true);
  if (sof != null) {
    sof.updateFromNativeNode(node,false);
  }
 else {
    SOFMarkerSegment newGuy=new SOFMarkerSegment(node);
    int firstSOS=findMarkerSegmentPosition(SOSMarkerSegment.class,true);
    if (firstSOS != -1) {
      markerSequence.add(firstSOS,newGuy);
    }
 else {
      markerSequence.add(newGuy);
    }
  }
}

private void mergeSOFNode ( Node node ) throws IIOInvalidTreeException { SOFMarkerSegment sof = ( SOFMarkerSegment ) findMarkerSegment ( SOFMarkerSegment . class , true ) ; if ( sof != null ) { sof . updateFromNativeNode ( node , false ) ; } else { SOFMarkerSegment newGuy = new SOFMarkerSegment ( node ) ; int firstSOS = findMarkerSegmentPosition ( SOSMarkerSegment . class , true ) ; if ( firstSOS != - 1 ) { markerSequence . add ( firstSOS , newGuy ) ; } else { markerSequence . add ( newGuy ) ; } } }
merge the given sof node into the marker sequence . if there already exists an sof marker segment in the sequence , then its values are updated from the node . if there is no sof segment , then a new one is created and added as follows : if there are any sos segments , the new sof segment is inserted before the first one . if there is no sos segment , the new sof segment is added to the end of the sequence .
