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


Java FeatureClass.getName方法代码示例

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


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

示例1: doExport

import com.esri.arcgis.geodatabase.FeatureClass; //导入方法依赖的package包/类
private int doExport(
        final IArray parameters,
        final IGPMessages messages
) throws Exception
{
    final IGPValue hadoopConfValue = gpUtilities.unpackGPValue(parameters.getElement(0));
    final IGPValue featureClassValue = gpUtilities.unpackGPValue(parameters.getElement(2));

    int count = 0;
    final IFeatureClass[] featureClasses = new IFeatureClass[]{new IFeatureClassProxy()};
    gpUtilities.decodeFeatureLayer(featureClassValue, featureClasses, null);
    final FeatureClass featureClass = new FeatureClass(featureClasses[0]);
    try
    {
        final Configuration configuration = HBaseConfiguration.create(createConfiguration(hadoopConfValue.getAsText()));
        createIfDoesNotExist(configuration, featureClass.getName());
        final HTableInterface table = new HTable(configuration, featureClass.getName());
        try
        {
            table.setAutoFlush(configuration.getBoolean("exportToHBaseTool.autoFlush", false));
            messages.addMessage("autoFlush is " + (table.isAutoFlush() ? "true" : "false"));
            table.setWriteBufferSize(configuration.getInt("exportToHBaseTool.writeBufferSize", 2 * 1024 * 1024));
            messages.addMessage(String.format("writeBufferSize = %d", table.getWriteBufferSize()));
            count = doExport(configuration, messages, featureClass, table);
            if (!table.isAutoFlush())
            {
                table.flushCommits();
            }
        }
        finally
        {
            table.close();
        }
    }
    finally
    {
        Cleaner.release(featureClass);
    }
    return count;
}
 
开发者ID:mraad,项目名称:HBaseToolbox,代码行数:41,代码来源:ExportToHBaseTool.java

示例2: resolveDatabaseName

import com.esri.arcgis.geodatabase.FeatureClass; //导入方法依赖的package包/类
private void resolveDatabaseName(FeatureClass fc) throws IOException {
   	String name = fc.getName();
   	int lastIndex = name.lastIndexOf(".");
   	this.databaseName = name.substring(0, lastIndex).trim();
   	LOGGER.info("databaseName = "+this.databaseName);
}
 
开发者ID:52North,项目名称:ArcGIS-Server-SOS-Extension,代码行数:7,代码来源:AccessGDBImpl.java

示例3: doExport

import com.esri.arcgis.geodatabase.FeatureClass; //导入方法依赖的package包/类
private Void doExport(
        final IArray parameters,
        final IGPMessages messages
) throws Exception
{
    final IGPValue hadoopConfValue = gpUtilities.unpackGPValue(parameters.getElement(0));
    final IGPValue featureClassValue = gpUtilities.unpackGPValue(parameters.getElement(2));

    final IFeatureClass[] featureClasses = new IFeatureClass[]{new IFeatureClassProxy()};
    gpUtilities.decodeFeatureLayer(featureClassValue, featureClasses, null);
    final FeatureClass featureClass = new FeatureClass(featureClasses[0]);
    try
    {
        final Configuration configuration = HBaseConfiguration.create(createConfiguration(hadoopConfValue.getAsText()));
        final HBaseAdmin admin = new HBaseAdmin(configuration);
        try
        {
            if (admin.tableExists(featureClass.getName()))
            {
                admin.disableTable(featureClass.getName());
                admin.deleteTable(featureClass.getName());
            }
            messages.addMessage("Creating HTable '" + featureClass.getName() + "'");

            final int maxVersions = configuration.getInt("createHTableTool.maxVersions", 1);

            final HTableDescriptor tableDescriptor = new HTableDescriptor(featureClass.getName());

            final HColumnDescriptor geomDescriptor = new HColumnDescriptor(Const.GEOM);
            geomDescriptor.setMaxVersions(maxVersions);
            tableDescriptor.addFamily(geomDescriptor);

            final HColumnDescriptor attrDescriptor = new HColumnDescriptor(Const.ATTR);
            attrDescriptor.setMaxVersions(maxVersions);
            tableDescriptor.addFamily(attrDescriptor);

            admin.createTable(tableDescriptor);
        }
        finally
        {
            admin.close();
        }
    }
    finally
    {
        Cleaner.release(featureClass);
    }
    return null;
}
 
开发者ID:mraad,项目名称:HBaseToolbox,代码行数:50,代码来源:CreateHTableTool.java


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