@@ -0,0 +1,2145 @@
+/*%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 org.mwc.cmap.naturalearth.readerwriter;%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.mwc.cmap.naturalearth.wrapper.NELayer;%0D%0Aimport org.w3c.dom.Document;%0D%0Aimport org.w3c.dom.Element;%0D%0A%0D%0Aimport MWC.GUI.Layer;%0D%0Aimport MWC.GUI.Layers;%0D%0Aimport MWC.Utilities.ReaderWriter.XML.LayerHandlerExtension;%0D%0Aimport MWC.Utilities.ReaderWriter.XML.MWCXMLReader;%0D%0A%0D%0Apublic class NELayerHandler extends MWCXMLReader implements LayerHandlerExtension%0D%0A%7B%0D%0A%09private static final String MY_TYPE = %22natural_earth%22;%0D%0A%0D%0A%09private static final String NAME = %22NAME%22;%0D%0A%0D%0A%09private String _name;%0D%0A%0D%0A%09private Layers _theLayers;%0D%0A%0D%0A%09public NELayerHandler()%0D%0A%09%7B%0D%0A%09%09this(MY_TYPE);%0D%0A%09%7D%0D%0A%0D%0A%09public NELayerHandler(String theType)%0D%0A%09%7B%0D%0A%09%09// inform our parent what type of class we are%0D%0A%09%09super(theType);%0D%0A%0D%0A%09%09addAttributeHandler(new HandleAttribute(NAME)%0D%0A%09%09%7B%0D%0A%09%09%09public void setValue(String name, String val)%0D%0A%09%09%09%7B%0D%0A%09%09%09%09_name = val;%0D%0A%09%09%09%7D%0D%0A%09%09%7D);%0D%0A%09%7D%0D%0A%0D%0A%09public void elementClosed()%0D%0A%09%7B%0D%0A%09%09NELayer newL = new NELayer(_name, null);%0D%0A%09%09_theLayers.addThisLayer(newL);%0D%0A%09%7D%0D%0A%0D%0A%0D%0A%09@Override%0D%0A%09public void setLayers(Layers theLayers)%0D%0A%09%7B%0D%0A%09%09_theLayers = theLayers;%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public boolean canExportThis(Layer subject)%0D%0A%09%7B%0D%0A%09%09return (subject instanceof NELayer);%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public void exportThis(Layer theLayer, Element parent, Document doc)%0D%0A%09%7B%0D%0A%09%09@SuppressWarnings(%22unused%22)%0D%0A%09%09NELayer solution = (NELayer) theLayer;%0D%0A%0D%0A%09%09// TODO: handle the export%0D%0A%0D%0A%09%7D%0D%0A%0D%0A%7D

introduce the first NE layer handler