• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java AutomationException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.esri.arcgis.interop.AutomationException的典型用法代码示例。如果您正苦于以下问题:Java AutomationException类的具体用法?Java AutomationException怎么用?Java AutomationException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AutomationException类属于com.esri.arcgis.interop包,在下文中一共展示了AutomationException类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getSchema

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
@Override
public String getSchema() throws IOException, AutomationException {
    try {
        JSONObject mySOE = ServerUtilities.createResource(
                "My SOE", "A simple template server object extension", false, false);
        JSONArray subResourcesArray = new JSONArray();
        subResourcesArray.put(ServerUtilities.createResource("hello",
                "Hello resource", false, false));
        mySOE.put("resources", subResourcesArray);
        return mySOE.toString();
    } catch (JSONException e) {
        getLogger().debug(e.getMessage());
        return ServerUtilities.sendError(500,
                "Exception occurred: " + e.getMessage(), null);
    }
}
 
开发者ID:Esri,项目名称:server-extension-java,代码行数:17,代码来源:MyServerObjectExtension.java


示例2: delegateRestRequestToHandler

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
protected RestResponse delegateRestRequestToHandler(RestRequest request)
        throws IOException, AutomationException {
    IRESTRequestHandler restRequestHandler = findRestRequestHandlerDelegate();
    if (restRequestHandler != null) {
        logger.debug("Forwarding request to handler: {}", request);
        String[] responseProperties = new String[1];
        byte[] responseBody = restRequestHandler.handleRESTRequest(
                request.getCapabilities(), request.getResourceName(),
                request.getOperationName(), request.getOperationInput(),
                request.getOutputFormat(), request.getRequestProperties(),
                responseProperties);
        return new RestResponse(responseProperties[0], responseBody);
    } else {
        throw new ServerObjectExtensionException(
                "Cannot find the correct REST request handler delegate.");
    }
}
 
开发者ID:Esri,项目名称:server-extension-java,代码行数:18,代码来源:AbstractRestServerObjectExtension.java


示例3: getVIdx

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
/**
 * 获取V值字段的Index
 * @return
 * @throws AutomationException
 * @throws IOException
 */
protected int getVIdx() throws AutomationException, IOException
{
	int vIdx = simplePoint.getFields().findField(VFieldName);
	if (vIdx == -1) {
		Field field = new Field();
		IFieldEdit edit = new IFieldEditProxy(field);
		edit.setAliasName(VFieldName);
		edit.setName(VFieldName);
		edit.setType(esriFieldType.esriFieldTypeDouble);
		simplePoint.addField(field);
		vIdx = simplePoint.findField(VFieldName);

	}
	return vIdx;
}
 
开发者ID:vonpower,项目名称:VonRep,代码行数:22,代码来源:VCalculator.java


示例4: getSchema

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
/**
     * This method returns the resource hierarchy of a REST based SOE in JSON
     * format.
     */
    @Override
    public String getSchema() throws IOException, AutomationException
    {
        LOGGER.verbose("getSchema() is called...");

        JSONObject arcGisSos = ServerUtilities.createResource("DB_Analyzer_for_ArcGIS_SOS_Extension", "A_DBAnalyzer_for_the_SOS_extension_for_ArcGIS_Server", false, false);

        JSONArray operationArray = new JSONArray();
        
        JSONObject tableNamesObject = ServerUtilities.createResource("ReadTableNamesFromDB", "reads all table names from DB", false, false);
        JSONObject analyzeProcedureTableObject = ServerUtilities.createResource("AnalyzeTableUsingProperties", "analyzes a specified table", false, false);
        
//        operationArray.put(ServerUtilities.createOperation("ReadTableNamesFromDB", "db", "json", false));
        operationArray.put(ServerUtilities.createOperation("AnalyzeTable", "tableName", "json", false));
//        operationArray.put(ServerUtilities.createOperation("AnalyzeProcedureTable", "bla", "json", false));

        JSONArray resourceArray = new JSONArray();
        resourceArray.put(tableNamesObject);
        resourceArray.put(analyzeProcedureTableObject);

        arcGisSos.put("resources", resourceArray);
//        arcGisSos.put("operations", operationArray);

        return arcGisSos.toString();
    }
 
开发者ID:52North,项目名称:ArcGIS-Server-SOS-Extension,代码行数:30,代码来源:DBInspector.java


示例5: getCheckFieldIdx

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
public int getCheckFieldIdx(IFeatureClass fc) throws AutomationException, IOException
{
	int vIdx = fc.getFields().findField(checkFieldStr);
	if (vIdx == -1) {
		Field field = new Field();
		IFieldEdit edit = new IFieldEditProxy(field);
		edit.setAliasName(checkFieldStr);
		edit.setName(checkFieldStr);
		edit.setType(esriFieldType.esriFieldTypeDouble);
		fc.addField(field);
		vIdx = fc.findField(checkFieldStr);

	}
	return vIdx;
	
}
 
开发者ID:vonpower,项目名称:VonRep,代码行数:17,代码来源:FillSampleRank.java


示例6: getArea

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
/**
 * 获取定级范围面积
 * 
 * @return 定级范围面积
 * @throws AutomationException
 * @throws IOException
 */
public double getArea() throws AutomationException, IOException {
	int featureCount = getFeatureClass().featureCount(null);
	double area = 0;
	IArea temp;
	for (int i = 0; i < featureCount; i++) {
		IGeometry g = getFeatureClass().getFeature(i).getShape();
		IPolygon ploygon = new IPolygonProxy(g);
		temp = new IAreaProxy(ploygon);
		area += temp.getArea();

	}

	return area;

}
 
开发者ID:vonpower,项目名称:VonRep,代码行数:23,代码来源:RangeCMap.java


示例7: getObservationMaxID

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
/**
     * @return the maximum ObjectID of all observations.
     * @throws IOException
     * @throws AutomationException
     */
    public int getObservationMaxID() throws AutomationException, IOException
    {
    	// TODO: insert observation needs to be adjusted to new AQ e-Reporting data model
    	
    	throw new UnsupportedOperationException();
    	
//        IQueryDef queryDef = gdb.getWorkspace().createQueryDef();
//
//        queryDef.setTables(Table.OBSERVATION);
//
//        queryDef.setSubFields("MAX(" + SubField.OBSERVATION_OBJECTID + ")");
//
//        // evaluate the database query
//        ICursor cursor = queryDef.evaluate();
//
//        IRow row = cursor.nextRow();
//
//        return (Integer) row.getValue(0);
    }
 
开发者ID:52North,项目名称:ArcGIS-Server-SOS-Extension,代码行数:25,代码来源:InsertGdbForObservationsImpl.java


示例8: analyzeTable

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
/**
 * @throws IOException 
 * @throws AutomationException 
 * 
 */
public JSONObject analyzeTable (String tableName, String primaryKeyColumn) throws AutomationException, IOException {
    
    
    JSONObject json = new JSONObject();

    try {
        ICursor cursor = DatabaseUtils.evaluateQuery(tableName, "", "COUNT(" + primaryKeyColumn + ")",
        		workspace);
        
        json.append("Reading count of table:", tableName);
        IRow row;
        if ((row = cursor.nextRow()) != null) {
            Object count = row.getValue(0);
            String countAsString = count.toString();
            
            json.append("Table count:", countAsString);
        }
    } catch (Exception e) {
        LOGGER.severe(e.getLocalizedMessage(), e);
        throw new IOException(e);
    }
    
    return json;
}
 
开发者ID:52North,项目名称:ArcGIS-Server-SOS-Extension,代码行数:30,代码来源:AccessGdbForAnalysisImpl.java


示例9: analyzeProcedureTable

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
/**
 * @throws IOException 
 * @throws AutomationException 
 * 
 */
public JSONObject analyzeProcedureTable () throws AutomationException, IOException {
    
    JSONObject json = new JSONObject();
    json.append("This function: ", "...checks the availability of a table as specified in the properties of this SOE (configure in ArcGIS Server Manager).");
    json.append("This function: ", "...and presents the count of rows contained in that table.");
    
    try {
        ICursor cursor = DatabaseUtils.evaluateQuery(soe.getTable(), "", "COUNT(" + soe.getTablePkField() + ")", workspace);
        
        json.append("Reading count of table:", soe.getTable());
        IRow row;
        if ((row = cursor.nextRow()) != null) {
            Object count = row.getValue(0);
            String countAsString = count.toString();
            
            json.append("Table count:", countAsString);
        }
    } catch (Exception e) {
        LOGGER.severe(e.getLocalizedMessage(), e);
        
        json.append("ERROR:", "while trying to read table '" + soe.getTable() + "' with specified primary key '" + soe.getTablePkField() + "'");
    }
    
    return json;
}
 
开发者ID:52North,项目名称:ArcGIS-Server-SOS-Extension,代码行数:31,代码来源:AccessGdbForAnalysisImpl.java


示例10: execute

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
public void execute() throws AutomationException, IOException {
		int vIdx = getVIdx();
		IFeatureCursor cursor = simplePoint.IFeatureClass_update(null, false);
		IFeature feature = cursor.nextFeature();
		//初始化公式变量
		double 总销售价格=0,同类建筑平均造价=0,房屋建筑总面积=0,开发利润=0,销售税费=0,资金利息=0,建筑密度=0,房屋占地面积=0;
		double value = 0;
		while (feature != null) {
			//带入公式计算
			//([总销售价格]-([同类建筑平均造价]*[房屋建筑总面积])-[开发利润]-[销售税费]-[资金利息])*([建筑密度]/[房屋占地面积])
			总销售价格=Double.parseDouble((feature.getValue(getFieldsIdx("总销售价格"))).toString());
			同类建筑平均造价=Double.parseDouble((feature.getValue(getFieldsIdx("同类建筑平均造价"))).toString());
			房屋建筑总面积=Double.parseDouble((feature.getValue(getFieldsIdx("房屋建筑总面积"))).toString());
			开发利润=Double.parseDouble((feature.getValue(getFieldsIdx("开发利润"))).toString());
			销售税费=Double.parseDouble((feature.getValue(getFieldsIdx("销售税费"))).toString());
			资金利息=Double.parseDouble((feature.getValue(getFieldsIdx("资金利息"))).toString());
			建筑密度=Double.parseDouble((feature.getValue(getFieldsIdx("建筑密度"))).toString());
			房屋占地面积=Double.parseDouble((feature.getValue(getFieldsIdx("房屋占地面积"))).toString());
			
			value=(总销售价格-(同类建筑平均造价*房屋建筑总面积)-开发利润-销售税费-资金利息)*(建筑密度/房屋占地面积);
			feature.setValue(vIdx, new Double(value));
			cursor.updateFeature(feature);
			feature = cursor.nextFeature();
}		
		
	}
 
开发者ID:vonpower,项目名称:VonRep,代码行数:27,代码来源:SPFCSCalculator.java


示例11: onMouseUp

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
public void onMouseUp(int arg0, int arg1, int arg2, int arg3)
		throws IOException, AutomationException {
	if(!inUse)return;
	inUse=false;
	if(lineSymbol==null)return;
	activeView.getScreenDisplay().startDrawing(activeView.getScreenDisplay().getHDC(),(short)-1);
	activeView.getScreenDisplay().setSymbol(new ISymbolProxy(textSymbol));
	activeView.getScreenDisplay().drawText(tp,textSymbol.getText());
	activeView.getScreenDisplay().setSymbol(new ISymbolProxy(lineSymbol));
	if(polyline.getLength()>0){
		activeView.getScreenDisplay().drawPolyline(polyline);
	}
	activeView.getScreenDisplay().finishDrawing();
	polyline=null;
	textSymbol=null;
	lineSymbol=null;
	tp=null;
}
 
开发者ID:vonpower,项目名称:VonRep,代码行数:19,代码来源:Measure.java


示例12: isNetwork

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
@Override
public boolean isNetwork(String procedureID) throws AutomationException, IOException {
       ICursor cursor = DatabaseUtils.evaluateQuery(Table.NETWORK,
       		AccessGDBImpl.concatTableAndField(Table.NETWORK, SubField.NETWORK_ID) + " = '" + procedureID + "'",
       		AccessGDBImpl.concatTableAndField(Table.NETWORK, SubField.NETWORK_ID),
       		gdb);
       
       IRow row;
       while ((row = cursor.nextRow()) != null) {
           String networkID = row.getValue(0).toString();
           
           if (networkID != null && networkID.equalsIgnoreCase(procedureID)) {
           	return true;
           }
       }
       
	return false;
}
 
开发者ID:52North,项目名称:ArcGIS-Server-SOS-Extension,代码行数:19,代码来源:AccessGdbForProceduresImpl.java


示例13: isProcedure

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
@Override
public boolean isProcedure(String procedureResourceID) throws AutomationException, IOException {

       ICursor cursor = DatabaseUtils.evaluateQuery(Table.PROCEDURE,
       		AccessGDBImpl.concatTableAndField(Table.PROCEDURE, SubField.PROCEDURE_RESOURCE) + " = '" + procedureResourceID + "'",
       		AccessGDBImpl.concatTableAndField(Table.PROCEDURE, SubField.PROCEDURE_RESOURCE),
       		gdb);
       
       IRow row;
       while ((row = cursor.nextRow()) != null) {
           String procedureIdFromDB = row.getValue(0).toString();
           
           if (procedureIdFromDB != null && procedureIdFromDB.equalsIgnoreCase(procedureResourceID)) {
           	return true;
           }
       }
       
	return false;
}
 
开发者ID:52North,项目名称:ArcGIS-Server-SOS-Extension,代码行数:20,代码来源:AccessGdbForProceduresImpl.java


示例14: execute

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
public void execute() throws AutomationException, IOException {
		int vIdx = getVIdx();
		IFeatureCursor cursor = simplePoint.IFeatureClass_update(null, false);
		IFeature feature = cursor.nextFeature();
		//初始化公式变量
		double 出地方纯收入=0,出地方面积=0,土地还原率=0;
		double value = 0;
		while (feature != null) {
			//带入公式计算
			//([出地方纯收入]/[出地方面积])*(1/{土地还原率})
			出地方纯收入=Double.parseDouble((feature.getValue(getFieldsIdx("出地方纯收入"))).toString());
			出地方面积=Double.parseDouble((feature.getValue(getFieldsIdx("出地方面积"))).toString());
			土地还原率=getPPValue("土地还原率");
			
			
			value=(出地方纯收入/出地方面积)*(1/土地还原率);
			feature.setValue(vIdx, new Double(value));
			cursor.updateFeature(feature);
			feature = cursor.nextFeature();
}				
	}
 
开发者ID:vonpower,项目名称:VonRep,代码行数:22,代码来源:TDLYCalculator.java


示例15: execute

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
public void execute() throws AutomationException, IOException {
		int vIdx = getVIdx();
		IFeatureCursor cursor = simplePoint.IFeatureClass_update(null, false);
		IFeature feature = cursor.nextFeature();
		//初始化公式变量
		double 取得房屋面积=0,交易总价=0,房屋交易税费=0,房屋面积=0,出让土地面积=0;
		double value = 0;
		while (feature != null) {
			//带入公式计算
			//([取得房屋面积]*([交易总价]-[房屋交易税费])/[房屋面积])/[出让土地面积]
			取得房屋面积=Double.parseDouble((feature.getValue(getFieldsIdx("取得房屋面积"))).toString());
			交易总价=Double.parseDouble((feature.getValue(getFieldsIdx("交易总价"))).toString());
			房屋交易税费=Double.parseDouble((feature.getValue(getFieldsIdx("房屋交易税费"))).toString());
			房屋面积=Double.parseDouble((feature.getValue(getFieldsIdx("房屋面积"))).toString());
			出让土地面积=Double.parseDouble((feature.getValue(getFieldsIdx("出让土地面积"))).toString());
			
			value=(取得房屋面积*(交易总价-房屋交易税费)/房屋面积)/出让土地面积;
			feature.setValue(vIdx, new Double(value));
			cursor.updateFeature(feature);
			feature = cursor.nextFeature();
}		
	}
 
开发者ID:vonpower,项目名称:VonRep,代码行数:23,代码来源:YDHFCalculator.java


示例16: draw

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
/**
 * @see IFeatureRenderer#draw
 */
public void draw(IFeatureCursor iFeatureCursor, int drawPhase,
		IDisplay iDisplay, ITrackCancel iTrackCancel) throws IOException,
		AutomationException {
	// do not draw features if no display or wrong drawphase
	if (iDisplay == null || drawPhase != esriDrawPhase.esriDPGeography)
		return;
	// the draw symbol comes from pLegendGroup
	ISymbol pSym = pLegendGroup.esri_getClass(0).getSymbol();
	// do not draw features if symbol hasn't been set
	if (pSym == null)
		return;

	// loop through the features and draw them using the symbol
	IFeature pf = iFeatureCursor.nextFeature();
	while (pf != null) {
		IFeatureDraw pFD = new IFeatureDrawProxy(pf);
		pFD.draw(drawPhase, iDisplay, pSym, false, null,
				esriDrawStyle.esriDSNormal);
		pf = iFeatureCursor.nextFeature();
	}
}
 
开发者ID:vonpower,项目名称:VonRep,代码行数:25,代码来源:RendererDialog.java


示例17: assemblyFeatureCombo

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
/**
 * get the map's and add them to combo renturn null
 * 
 * @throws IOException
 * @throws AutomationException
 */
private void assemblyFeatureCombo() throws AutomationException, IOException {

	UID pid = new UID();
	pid.setValue("{E156D7E5-22AF-11D3-9F99-00C04F6BC78E}");
	pEnumLayer = map.getLayers(pid, true);
	pEnumLayer.reset();

	ILayer tempLayer = pEnumLayer.next();

	while (tempLayer != null) {

		// 把获取的layer保存到layers中
		layers.add(tempLayer);

		String strLayerName = tempLayer.getName();
		featureLayersCombo.add(strLayerName);

		tempLayer = pEnumLayer.next();
	}
	featureLayersCombo.select(0);
	return;

}
 
开发者ID:vonpower,项目名称:VonRep,代码行数:30,代码来源:LableDialog.java


示例18: shutdown

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
@Override
public final void shutdown() throws IOException, AutomationException {
    logger.info("Shutting down ...");
    doShutdown();
    ((ConfigurableApplicationContext) applicationContext).close();
    logger.info("Shut down completed.");
    delegateMappings = null;
    serverContext = null;
    logger = null;
    displayName = null;
}
 
开发者ID:Esri,项目名称:server-extension-java,代码行数:12,代码来源:AbstractRestServerObjectExtension.java


示例19: handleBinaryRequest

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
@Override
public byte[] handleBinaryRequest(byte[] request) throws IOException,
        AutomationException {
    // TODO: Send appropriate error response for binary request
    getLogger().warn("Binary request are not allowed.");
    return handleError(new ServerObjectExtensionException(
            "Binary request are not allowed."));
}
 
开发者ID:Esri,项目名称:server-extension-java,代码行数:9,代码来源:AbstractRestServerObjectInterceptor.java


示例20: handleBinaryRequest2

import com.esri.arcgis.interop.AutomationException; //导入依赖的package包/类
@Override
public byte[] handleBinaryRequest2(String capabilities, byte[] request)
        throws IOException, AutomationException {
    // TODO: Send appropriate error response for binary request
    getLogger().warn("Binary request are not allowed.");
    return handleError(new ServerObjectExtensionException(
            "Binary request are not allowed."));
}
 
开发者ID:Esri,项目名称:server-extension-java,代码行数:9,代码来源:AbstractRestServerObjectInterceptor.java



注:本文中的com.esri.arcgis.interop.AutomationException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IVMInstall2类代码示例发布时间:2022-05-22
下一篇:
Java PsiPackageStatement类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap