/* Package GeoTools/WMS Implementation * Copyright (C) 2001 Cameron Shorter (camerons@users.sourceforge.net) * Artur Hefczyc (kobit@users.sourceforge.net) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: ExternalWMSLayer.java,v 1.11 2001/10/24 09:40:18 kobit Exp $ * $Author: kobit $ * $Date: 2001/10/24 09:40:18 $ */ package uk.ac.leeds.ccg.ogc; import uk.ac.leeds.ccg.geotools.*; import java.net.*; import java.util.*; /** * Class WMSLayer reprezents single layer taken from * WMS server.
* After receiving capabilities from the WMS server ogc * library builds objects suit to structures received with capability data. * This class suit to Layer data from capapbilities, and * contain all necessary WMS layer information. * * @author Cameron Shorter * @author Artur Hefczyc * @version $Revision: 1.11 $ */ public class ExternalWMSLayer { /* Variables name from DTD */ String layerName = null; String layerTitle = null; String layerAbstract = null; double layerLatLonBB_maxx = 0; double layerLatLonBB_maxy = 0; double layerLatLonBB_minx = 0; double layerLatLonBB_miny = 0; double layerLegend_h = 0; double layerLegend_w = 0; String layerLegend_format = null; String layerLegend_resource = null; ArrayList layerStyles = new ArrayList(); // Array of WMSLayerStyle objects ArrayList layerBB = new ArrayList(); // Array of WMSLayerBB objects public ExternalWMSLayer(String name) { layerName = name; } public ExternalWMSLayer(String name, String title) { layerName = name; layerTitle = title; } public ExternalWMSLayer(String name, String title, double ll_bb_maxx, double ll_bb_maxy, double ll_bb_minx, double ll_bb_miny) { layerName = name; layerTitle = title; layerLatLonBB_maxx = ll_bb_maxx; layerLatLonBB_maxy = ll_bb_maxy; layerLatLonBB_minx = ll_bb_minx; layerLatLonBB_miny = ll_bb_miny; } public void setlLayerLatLonBB(double ll_bb_maxx, double ll_bb_maxy, double ll_bb_minx, double ll_bb_miny) { layerLatLonBB_maxx = ll_bb_maxx; layerLatLonBB_maxy = ll_bb_maxy; layerLatLonBB_minx = ll_bb_minx; layerLatLonBB_miny = ll_bb_miny; } public String llBBToString() { return "maxx="+layerLatLonBB_maxx+", maxy="+layerLatLonBB_maxy+ ", minx="+layerLatLonBB_minx+", miny="+layerLatLonBB_miny; } public void setLayerLegend(double h, double w, String format, String resource) { layerLegend_h = h; layerLegend_w = w; layerLegend_format = format; layerLegend_resource = resource; } public void setLayerName(String name) { layerName = name; } public void setLayerTitle(String title) { layerTitle = title; } public void setLayerAbstract(String lay_abstract) { layerAbstract = lay_abstract; } public String getLayerName() { return layerName; } public String getLayerTitle() { return layerTitle; } public String getLayerAbstract() { return layerAbstract; } public GeoRectangle getBounds() { return new GeoRectangle(layerLatLonBB_minx,layerLatLonBB_miny, layerLatLonBB_maxx-layerLatLonBB_minx, layerLatLonBB_maxy-layerLatLonBB_miny); } public String toString() { return layerName; } } /* * Changes in file: * * $Log: ExternalWMSLayer.java,v $ * Revision 1.11 2001/10/24 09:40:18 kobit * Added LOG cvs keyword to the end of file * * */