当前位置: 首页>>代码示例>>Java>>正文


Java FeatureClass.getWorkspace方法代码示例

本文整理汇总了Java中com.esri.arcgis.geodatabase.FeatureClass.getWorkspace方法的典型用法代码示例。如果您正苦于以下问题:Java FeatureClass.getWorkspace方法的具体用法?Java FeatureClass.getWorkspace怎么用?Java FeatureClass.getWorkspace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.esri.arcgis.geodatabase.FeatureClass的用法示例。


在下文中一共展示了FeatureClass.getWorkspace方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: AccessGdbForAnalysisImpl

import com.esri.arcgis.geodatabase.FeatureClass; //导入方法依赖的package包/类
public AccessGdbForAnalysisImpl(DBInspector soe) throws AutomationException, IOException {
    LOGGER.debug("Creating AccessGdbForAnalysisImpl.");
    
    this.soe = soe;
    
    // Workspace creation
    IMapServer3 ms = (IMapServer3) soe.getMapServerDataAccess();
    String mapName = ms.getDefaultMapName();
    IMapServerDataAccess mapServerDataAccess = soe.getMapServerDataAccess();
    Object dataSource= mapServerDataAccess.getDataSource(mapName, 0);
    FeatureClass fc = new FeatureClass(dataSource);
    Workspace workspace = new Workspace(fc.getWorkspace());
    
    this.workspace = new WorkspaceWrapper();
    
    if (fc.getWorkspace() instanceof SqlWorkspace) {
    	this.workspace.setSqlWorkspace((SqlWorkspace) fc.getWorkspace());
    	this.workspace.setWorkspace(workspace);
    }
    else {
    	this.workspace.setWorkspace(workspace);
    }
    
}
 
开发者ID:52North,项目名称:ArcGIS-Server-SOS-Extension,代码行数:25,代码来源:AccessGdbForAnalysisImpl.java

示例2: AccessGDBImpl

import com.esri.arcgis.geodatabase.FeatureClass; //导入方法依赖的package包/类
/**
     * Creates an AccessObservationGDB object and connects to the DB of the
     * ArcGIS MapServer handed over as a parameter.
     * 
     * @throws AutomationException
     * @throws IOException
     */
    public AccessGDBImpl(SosSoe sos) throws AutomationException, IOException {
        
        LOGGER.info("Creating AccessGDBImpl.");
        
        long start = System.currentTimeMillis();
        
        this.sos = sos;
        
        // Workspace creation
        IMapServer3 ms = (IMapServer3) sos.getMapServerDataAccess();
        String mapName = ms.getDefaultMapName();
        LOGGER.info("Using mapName: "+mapName);
        IMapServerDataAccess mapServerDataAccess = sos.getMapServerDataAccess();
        LOGGER.info("Using IMapServerDataAccess: "+mapServerDataAccess);
        Object dataSource= mapServerDataAccess.getDataSource(mapName, 0);
        LOGGER.info("Using dataSource: "+dataSource.getClass());
        FeatureClass fc = new FeatureClass(dataSource);
        resolveDatabaseName(fc);
        Workspace workspace = new Workspace(fc.getWorkspace());
        this.workspaceWrapper = new WorkspaceWrapper();
        
//        logConnectionProperties(fc.getWorkspace());
        
        if (fc.getWorkspace() instanceof SqlWorkspace) {
        	this.workspaceWrapper.setSqlWorkspace((SqlWorkspace) fc.getWorkspace());
        	this.workspaceWrapper.setWorkspace(workspace);
        }
        else {
//        	SqlWorkspaceFactory fac = new SqlWorkspaceFactory();
//        	SqlWorkspace sqlW = (SqlWorkspace) fac.open(fc.getWorkspace().getConnectionProperties(), fc.getWorkspace().getType());
//        	workspace = new Workspace(sqlW);
//        	this.workspaceWrapper.setSqlWorkspace(sqlW);
        	this.workspaceWrapper.setWorkspace(workspace);
        }
        
        LOGGER.info("workspace: "+this.workspaceWrapper.toString());

        init("/arcGisSos.properties", sos.getMaximumRecordCount());
        
        long delta = System.currentTimeMillis() - start;
        
        LOGGER.info("End of creating AccessGDBImpl. Created in " + delta/1000 + " seconds.");
    }
 
开发者ID:52North,项目名称:ArcGIS-Server-SOS-Extension,代码行数:51,代码来源:AccessGDBImpl.java


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