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

📄 wcstocfunctionality.java

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

import com.esri.adf.web.data.GISResource;
import com.esri.adf.web.data.TocFunctionality;
import com.esri.adf.web.data.TocNode;
import com.esri.solutions.jitk.datasources.ogc.wcs.info.WCSCapabilities;

public class WCSTocFunctionality implements TocFunctionality {
	
	private WCSMapResource resource = null;
	private WCSTocLayerContent coverageLayer = null;
			
	private WCSTocLayerContent getToc(WCSCapabilities wcsCapabilities, String coverageName) {
		
		if(wcsCapabilities != null && coverageName != null && wcsCapabilities.getCoverageInfos().containsKey(coverageName)) {
			return new WCSTocLayerContent(wcsCapabilities.getCoverageInfo(coverageName));
		}
		
		return null;
	}
	
	/**
	 * The initialization chores for the functionality must be performed in this method.
	 */
	public void initFunctionality(GISResource resource) {
		
		this.resource = (WCSMapResource)resource;
		
		if(this.coverageLayer == null) {
			this.coverageLayer = getToc(this.resource.getWCSCapabilities(), this.resource.getCoverage());
		}
	}
	
	/**
	 * Returns the GISResource associated with this functionality.
	 */
	public GISResource getResource() {
		return resource;
	}
	
	/**
	 * The cleanup chores for the functionality must be performed in this method.
	 */
	public void destroyFunctionality() {}

	/**
	 * Creates the content hierarchy for this TOC.
	 */
	public void createTocHierarchy(TocNode parentNode) {
		if(coverageLayer != null) {
			parentNode.addChild(coverageLayer);
		}
	}
}

⌨️ 快捷键说明

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