⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wcs.java

📁 电子地图服务器,搭建自己的地图服务
💻 JAVA
字号:
/* Copyright (c) 2001 - 2007 TOPP - www.openplans.org.  All rights reserved.
 * This code is licensed under the GPL 2.0 license, availible at the root
 * application directory.
 */
package org.vfny.geoserver.global;

import org.vfny.geoserver.global.dto.ServiceDTO;
import org.vfny.geoserver.global.dto.WCSDTO;


/**
 * WCS
 *
 * <p>
 * Represents the GeoServer information required to configure an instance of the
 * WCS Server. This class holds the currently used configuration and is
 * instantiated initially by the GeoServerPlugIn at start-up, but may be
 * modified by the Configuration Interface during runtime. Such modifications
 * come from the GeoServer Object in the SessionContext.
 * </p>
 *
 * <p>
 * WCS wcs = new WCS(dto); System.out.println(wcs.getName());
 * System.out.println(wcs.getAbstract());
 * </p>
 *
 * @author $Author: Alessio Fabiani (alessio.fabiani@gmail.com) $ (last
 *         modification)
 * @author $Author: Simone Giannecchini (simboss1@gmail.com) $ (last
 *         modification)
 * @version $Id: WCS.java 7731 2007-11-10 02:52:30Z groldan $
 */
public final class WCS extends Service {
    public static final String WEB_CONTAINER_KEY = "WCS";

    /** list of WMS Exception Formats */
    private static final String[] EXCEPTION_FORMATS = {
            "application/vnd.ogc.se_xml", "application/vnd.ogc.se_inimage",
            "application/vnd.ogc.se_blank"
        };

    /**
     *
     * @uml.property name="gmlPrefixing" multiplicity="(0 1)"
     */
    private boolean gmlPrefixing;

    /**
     * WCS constructor.
     *
     * <p>
     * Stores the data specified in the WCSDTO object in this WCS Object for
     * GeoServer to use.
     * </p>
     *
     * @param config
     *            The data intended for GeoServer to use.
     */
    public WCS(WCSDTO config) {
        super(config.getService());
        setId("wcs");
        gmlPrefixing = config.isGmlPrefixing();
    }

    /**
     * Creates the WCS service by getting the WCSDTO object from the
     * config and calling {@link #WCS(WCSDTO)}.
     *
     * @throws ConfigurationException
     */
    public WCS(Config config, Data data, GeoServer geoServer)
        throws ConfigurationException {
        this(config.getWcs());
        setData(data);
        setGeoServer(geoServer);
    }

    /**
     * WCS constructor.
     *
     * <p>
     * Package constructor intended for default use by GeoServer
     * </p>
     *
     * @see GeoServer#GeoServer()
     */
    WCS() {
        super(new ServiceDTO());
        setId("wcs");
    }

    /**
     * load purpose.
     *
     * <p>
     * Loads a new data set into this object.
     * </p>
     *
     * @param config
     */
    public void load(WCSDTO config) {
        super.load(config.getService());
        gmlPrefixing = config.isGmlPrefixing();
    }

    /**
     * Implement toDTO.
     *
     * <p>
     * Package method used by GeoServer. This method may return references, and
     * does not clone, so extreme caution sould be used when traversing the
     * results.
     * </p>
     *
     * @return WCSDTO An instance of the data this class represents. Please see
     *         Caution Above.
     *
     * @see org.vfny.geoserver.global.GlobalLayerSupertype#toDTO()
     * @see WCSDTO
     */
    public Object toDTO() {
        WCSDTO dto = new WCSDTO();
        dto.setService((ServiceDTO) super.toDTO());
        dto.setGmlPrefixing(gmlPrefixing);

        return dto;
    }

    /**
     * isGmlPrefixing purpose.
     *
     * <p>
     * Description ...
     * </p>
     *
     * @return
     */
    public boolean isGmlPrefixing() {
        return gmlPrefixing;
    }

    /**
     * setGmlPrefixing purpose.
     *
     * <p>
     * Description ...
     * </p>
     *
     * @param b
     *
     * @uml.property name="gmlPrefixing"
     */
    public void setGmlPrefixing(boolean b) {
        gmlPrefixing = b;
    }

    /**
     * getExceptionFormats purpose.
     *
     * <p>
     * Returns a static list of Exception Formats in as Strings
     * </p>
     *
     * @return String[] a static list of Exception Formats
     */
    public String[] getExceptionFormats() {
        return EXCEPTION_FORMATS;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -