本文整理汇总了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;
}
示例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);
}
示例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;
}