@@ -0,0 +1,2260 @@
+/*%0D%0A *    Debrief - the Open Source Maritime Analysis Application%0D%0A *    http://debrief.info%0D%0A *%0D%0A *    (C) 2000-2014, PlanetMayo Ltd%0D%0A *%0D%0A *    This library is free software; you can redistribute it and/or%0D%0A *    modify it under the terms of the Eclipse Public License v1.0%0D%0A *    (http://www.eclipse.org/legal/epl-v10.html)%0D%0A *%0D%0A *    This library is distributed in the hope that it will be useful,%0D%0A *    but WITHOUT ANY WARRANTY; without even the implied warranty of%0D%0A *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. %0D%0A */%0D%0Apackage Debrief.ReaderWriter.XML.Tactical;%0D%0A%0D%0A/**%0D%0A * Title:        Debrief 2000%0D%0A * Description:  Debrief 2000 Track Analysis Software%0D%0A * Copyright:    Copyright (c) 2000%0D%0A * Company:      MWC%0D%0A * @author Ian Mayo%0D%0A * @version 1.0%0D%0A */%0D%0A%0D%0Aimport org.w3c.dom.Element;%0D%0A%0D%0Aimport Debrief.Wrappers.Track.DynamicInfillSegment;%0D%0Aimport Debrief.Wrappers.Track.TrackSegment;%0D%0A%0D%0Aabstract public class DynamicInfillSegmentHandler extends CoreTrackSegmentHandler%0D%0A%7B%0D%0A%09private static final String DYNAMIC_SEGMENT = %22DynamicInfillSegment%22;%0D%0A%09private static final String BEFORE = %22BeforeLeg%22;%0D%0A%09private static final String AFTER = %22AfterLeg%22;%0D%0A%0D%0A%09private String _beforeName;%0D%0A%09private String _afterName;%0D%0A%09%0D%0A%09public DynamicInfillSegmentHandler()%0D%0A%09%7B%0D%0A%09%09// inform our parent what type of class we are%0D%0A%09%09super(DYNAMIC_SEGMENT);%0D%0A%0D%0A%09%09addAttributeHandler(new HandleAttribute(BEFORE)%0D%0A%09%09%7B%0D%0A%09%09%09@Override%0D%0A%09%09%09public void setValue(String name, String value)%0D%0A%09%09%09%7B%0D%0A%09%09%09%09_beforeName = value;%0D%0A%09%09%09%7D%0D%0A%09%09%7D);%0D%0A%09%09addAttributeHandler(new HandleAttribute(AFTER)%0D%0A%09%09%7B%0D%0A%09%09%09@Override%0D%0A%09%09%09public void setValue(String name, String value)%0D%0A%09%09%09%7B%0D%0A%09%09%09%09_afterName = value;%0D%0A%09%09%09%7D%0D%0A%09%09%7D);%0D%0A%09%7D%0D%0A%09%0D%0A%09%0D%0A%0D%0A%09@Override%0D%0A%09protected TrackSegment createTrack()%0D%0A%09%7B%0D%0A%09%09final TrackSegment res = new DynamicInfillSegment(_beforeName, _afterName);%0D%0A%09%09return res;%0D%0A%09%7D%0D%0A%0D%0A%0D%0A%09public static void exportThisSegment(final org.w3c.dom.Document doc, final Element trk,%0D%0A%09%09%09final DynamicInfillSegment seg)%0D%0A%09%7B%09%09%0D%0A%09%09final Element segE = CoreTrackSegmentHandler.exportThisSegment(doc, seg, DYNAMIC_SEGMENT);%0D%0A%09%0D%0A%09%09// sort out the remaining attributes%0D%0A%09%09segE.setAttribute(BEFORE, seg.getBeforeName());%0D%0A%09%09segE.setAttribute(AFTER, seg.getAfterName());%0D%0A%09%0D%0A%09%09trk.appendChild(segE);%0D%0A%09%7D%0D%0A%7D

create import/export handler for this new type