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

📄 cswpersistenceobject.java

📁 esri的ArcGIS Server超级学习模板程序(for java)
💻 JAVA
字号:
package com.esri.solutions.jitk.common.csw;

import java.util.HashMap;
import java.util.Map;


/**
 * The class acts as a container for CS/W search criteria.  It is a
 * go-between object for clients and the {@link CswPersistenceService}.
 */
public class CswPersistenceObject {
    /**
     * Constant key for accessing and setting the search term
     * value on the local map.
     */
    public static final String SEARCH_TERM_KEY = "csw.search.term";

    /**
         * Constant key for accessing and setting the live data and/or maps
         * search criteria value on the local map.
         */
    public static final String LIVE_DATA_KEY = "csw.search.livedata";

    /**
         * Constant key for accessing and setting the value that indicates
         * if the advanced CS/W search options should be used.
         */
    public static final String ADVANCED_QUERY_KEY = "csw.search.advanced.options";

    /**
     * Constant key for accessing and setting the value that indicates
     * if the data categories should be used in the search.
     */
    public static final String USE_DATA_CATEGORIES = "csw.search.advanced.options.usedatacategories";

    /**
         * Constant key for accessing and setting the agriculture
         * data category search criteria on the local map.
         */
    public static final String AGRICULTURE_KEY = "csw.search.dc.agriculture";

    /**
         * Constant key for accessing and setting the biology
         * data category search criteria on the local map.
         */
    public static final String BIOLOGY_KEY = "csw.search.dc.biology";

    /**
         * Constant key for accessing and setting the administrative
         * data category search criteria on the local map.
         */
    public static final String ADMIN_KEY = "csw.search.dc.admin";

    /**
         * Constant key for accessing and setting the atmospheric
         * data category search criteria on the local map.
         */
    public static final String ATMOSPHERIC_KEY = "csw.search.dc.atmospheric";

    /**
         * Constant key for accessing and setting the business
         * data category search criteria on the local map.
         */
    public static final String BUSINESS_KEY = "csw.search.dc.business";

    /**
         * Constant key for accessing and setting the elevation
         * data category search criteria on the local map.
         */
    public static final String ELEVATION_KEY = "csw.search.dc.elevation";

    /**
         * Constant key for accessing and setting the environment
         * data category search criteria on the local map.
         */
    public static final String ENVIRONMENT_KEY = "csw.search.dc.environment";

    /**
         * Constant key for accessing and setting the geological
         * data category search criteria on the local map.
         */
    public static final String GEOLOGICAL_KEY = "csw.search.dc.geological";

    /**
         * Constant key for accessing and setting the human
         * data category search criteria on the local map.
         */
    public static final String HUMAN_KEY = "csw.search.dc.human";

    /**
         * Constant key for accessing and setting the imagery
         * data category search criteria on the local map.
         */
    public static final String IMAGERY_KEY = "csw.search.dc.imagery";

    /**
         * Constant key for accessing and setting the military
         * data category search criteria on the local map.
         */
    public static final String MILITARY_KEY = "csw.search.dc.military";

    /**
         * Constant key for accessing and setting the inland
         * data category search criteria on the local map.
         */
    public static final String INLAND_KEY = "csw.search.dc.inland";

    /**
         * Constant key for accessing and setting the locations
         * data category search criteria on the local map.
         */
    public static final String LOCATIONS_KEY = "csw.search.dc.locations";

    /**
         * Constant key for accessing and setting the oceans
         * data category search criteria on the local map.
         */
    public static final String OCEANS_KEY = "csw.search.dc.oceans";

    /**
         * Constant key for accessing and setting the cadastral
         * data category search criteria on the local map.
         */
    public static final String CADASTRAL_KEY = "csw.search.dc.cadastral";

    /**
         * Constant key for accessing and setting the cultural
         * data category search criteria on the local map.
         */
    public static final String CULTURAL_KEY = "csw.search.dc.cultural";

    /**
         * Constant key for accessing and setting the facilities
         * data category search criteria on the local map.
         */
    public static final String FACILITIES_KEY = "csw.search.dc.facilities";

    /**
         * Constant key for accessing and setting the transportation
         * data category search criteria on the local map.
         */
    public static final String TRANSPORTATION_KEY = "csw.search.dc.transportation";

    /**
         * Constant key for accessing and setting the utilities
         * data category search criteria on the local map.
         */
    public static final String UTILITIES_KEY = "csw.search.dc.utilities";

    /**
         * Constant key for accessing and setting the value indicating if
         * the geography extent search should be used.
         */
    public static final String QUERY_OVERLAP_EXTENT_KEY = "csw.search.geography.extent.overlap";

    /**
         * Constant key for accessing and setting the ID of the CS/W
         * catalog on the local map.
         */
    public static final String CATALOG_ID_KEY = "csw.search.catalog.id";

    /**
         * Constant key for accessing and setting the ID of the CS/W
         * query on the local map.
         */
    public static final String QUERY_ID_KEY = "csw.query.id";

    /**
         * Constant key for accessing and setting the name of the CS/W
         * query on the local map.
         */
    public static final String QUERY_NAME_KEY = "csw.query.name";

    /**
         * Constant key for accessing and setting the description of the
         * CS/W query on the local map.
         */
    public static final String QUERY_DESCRIPTION_KEY = "csw.query.description";

    /**
         * Constant key for accessing and setting the minimum longitude
         * value on the local map.
         */
    public static final String QUERY_EXTENT_XMIN = "csw.query.extent.xmin";

    /**
         * Constant key for accessing and setting the minimum latitude
         * value on the local map.
         */
    public static final String QUERY_EXTENT_YMIN = "csw.query.extent.ymin";

    /**
         * Constant key for accessing and setting the maximum longitude
         * value on the local map.
         */
    public static final String QUERY_EXTENT_XMAX = "csw.query.extent.xmax";

    /**
         * Constant key for accessing and setting the maximum latitude
         * value on the local map.
         */
    public static final String QUERY_EXTENT_YMAX = "csw.query.extent.ymax";

    /**
         * Constant key for accessing and setting the maximum features
         * value on the local map.
         */
    public static final String MAX_RESULTS_KEY = "csw.search.max.results";

    /**
     * {@link Map} of key/value pairs.
     */
    private Map<String, String> _attributes = null;

    /**
     * Default no-args constructor.
     */
    public CswPersistenceObject() {
        _attributes = new HashMap<String, String>();
    }

    /**
     * Retrieves the value for the given <code>name</code>
     *
     * @param name {@link String} key name.
     * @return {@link String} key's value.
     */
    public String getAttribute(String name) {
        return _attributes.get(name);
    }

    /**
     * Sets the <code>value</code> for the given <code>name</code>.
     *
     * @param name {@link String} key.
     * @param value {@link String} value.
     */
    public void setAttribute(String name, String value) {
        _attributes.put(name, value);
    }

    /**
     * Tests the local map if it contains the given key.
     *
     * @param name {@link String} key.
     * @return Returns true if the map contains a mapping for the specified key.
     */
    public boolean contains(String name) {
        return _attributes.containsKey(name);
    }
}

⌨️ 快捷键说明

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