tim@335: package de.intevation.gnv.state;
tim@335:
sascha@779: import com.vividsolutions.jts.geom.Point;
sascha@779:
sascha@779: import de.intevation.artifactdatabase.Config;
sascha@779:
sascha@779: import de.intevation.gnv.geobackend.base.Result;
sascha@779:
sascha@779: import de.intevation.gnv.state.describedata.DefaultKeyValueDescribeData;
sascha@779: import de.intevation.gnv.state.describedata.KeyValueDescibeData;
sascha@779: import de.intevation.gnv.state.describedata.NamedArrayList;
sascha@779: import de.intevation.gnv.state.describedata.NamedCollection;
sascha@779:
sascha@779: import de.intevation.gnv.utils.ArtifactXMLUtilities;
sascha@779: import de.intevation.gnv.utils.InputValidator;
sascha@779: import de.intevation.gnv.utils.WKTUtils;
sascha@779:
sascha@779: import de.intevation.gnv.utils.exception.ValidationException;
sascha@779:
tim@335: import java.util.ArrayList;
tim@335: import java.util.Collection;
tim@511: import java.util.HashMap;
tim@335: import java.util.Iterator;
ingo@470: import java.util.List;
tim@335:
tim@335: import org.apache.log4j.Logger;
sascha@779:
tim@511: import org.w3c.dom.Element;
tim@511: import org.w3c.dom.Node;
tim@511: import org.w3c.dom.NodeList;
tim@335:
tim@335: /**
ingo@796: * This state handles coordinate input by the user. It searches database results
ingo@796: * for coordinates and turns them into a human readable form.
ingo@796: *
sascha@780: * @author Tim Englich
tim@335: *
tim@335: */
tim@335: public class CoordinateSelectionState extends StateBase {
tim@335:
tim@335: /**
tim@335: * the logger, used to log exceptions and additonaly information
tim@335: */
tim@335: private static Logger log = Logger.getLogger(CoordinateSelectionState.class);
sascha@778:
tim@335: /**
tim@335: * The UID of this Class
tim@335: */
tim@335: private static final long serialVersionUID = 6318923553625195063L;
sascha@778:
tim@511: /**
tim@511: * XPATH Expressions for the setup.
tim@511: */
sascha@778:
tim@511: private final static String MESH_WIDTH_XPATH = "mesh-width";
tim@511: private final static String XLINK_XPATH = "xlink:href";
tim@511: private final static String MESH_LIST_XPATH = "/mesh-widths/mesh";
tim@511: private final static String ID_XPATH = "id";
tim@511: private final static String WIDTH_VALUE_XPATH = "width";
sascha@778:
tim@511: /**
tim@511: * Holds all given Widths between two MeshPoints for different Meshes.
tim@511: */
tim@511: private HashMap meshWidths = null;
tim@335:
tim@335: /**
tim@335: * Constructor
tim@335: */
tim@335: public CoordinateSelectionState() {
tim@335: super();
tim@335: }
tim@335:
tim@335: @Override
ingo@607: protected List