|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Provides access to members that create and open various types of datasets and other workspace level objects.
The IFeatureWorkspace interface is used to access and manage datasets that are a key component of a feature based geodatabase; Tables and ObjectClasses, FeatureClasses, FeatureDatasets, and RelationshipClasses. All of the Open methods (such as OpenTable) take a dataset name as input. When working with an enterprise geodatabase, the name may be fully qualified (for example, "database.owner.tablename" or "owner.tablename") using the qualification character appropriate to the underlying database (see ISQLSyntax)). If the input name is not fully qualified, then it is qualified using the currently connected user for the workspace.
When working with geodatabases (personal, file or ArcSDE) the workspace keeps a running object table of instantiated datasets. Multiple calls to open an already instantiated dataset will return a reference to the already instantiated dataset.
IWorkspaceFactory shapeWkspFactory = new ShapefileWorkspaceFactory();
| Method Summary | |
IFeatureClass |
createFeatureClass(java.lang.String name,
IFields fields,
IUID cLSID,
IUID eXTCLSID,
int featureType,
java.lang.String shapeFieldName,
java.lang.String configKeyword)
Creates a new standalone feature class under the workspace. |
IFeatureDataset |
createFeatureDataset(java.lang.String name,
ISpatialReference spatialReference)
Creates a new feature dataset. |
IQueryDef |
createQueryDef()
Create a query definition object. |
IRelationshipClass |
createRelationshipClass(java.lang.String relClassName,
IObjectClass originClass,
IObjectClass destinationClass,
java.lang.String forwardLabel,
java.lang.String backwardLabel,
int cardinality,
int notification,
boolean isComposite,
boolean isAttributed,
IFields relAttrFields,
java.lang.String originPrimaryKey,
java.lang.String destPrimaryKey,
java.lang.String originForeignKey,
java.lang.String destForeignKey)
Creates a new relationship class. |
ITable |
createTable(java.lang.String name,
IFields fields,
IUID cLSID,
IUID eXTCLSID,
java.lang.String configKeyword)
Creates a new table. |
IFeatureClass |
openFeatureClass(java.lang.String name)
Opens an existing feature class. |
IFeatureDataset |
openFeatureDataset(java.lang.String name)
Opens an existing feature dataset. |
IFeatureDataset |
openFeatureQuery(java.lang.String queryName,
IQueryDef pQueryDef)
Opens a feature dataset containing a single feature class defined by the specified Query. |
IRelationshipClass |
openRelationshipClass(java.lang.String name)
Opens an existing relationship class. |
ITable |
openRelationshipQuery(IRelationshipClass pRelClass,
boolean joinForward,
IQueryFilter pSrcQueryFilter,
ISelectionSet pSrcSelectionSet,
java.lang.String targetColumns,
boolean doNotPushJoinToDB)
The table of a relationship join query. |
ITable |
openTable(java.lang.String name)
Opens an existing table. |
| Method Detail |
public ITable openTable(java.lang.String name)
throws java.io.IOException,
AutomationException
name - The name (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.IDatabaseConnectionInfo
public ITable createTable(java.lang.String name,
IFields fields,
IUID cLSID,
IUID eXTCLSID,
java.lang.String configKeyword)
throws java.io.IOException,
AutomationException
The CreateTable method can be used to create a new table or object class in the workspace.
The optional CLSID and EXTCLSID parameters allow the calling application to specify the GUIDs for the objects that implement the instance and the class extension behavior for an object class. If no CLSID is passed in, then the resulting table is not registered in the geodatabase object class data dictionary (It will support the IObjectClass interface but will have an ObjectClassID of –1). Valid values for CLSID are esriGeoDatabase.Object or any non-spatial object that aggregates esriGeoDatabase.Object. CLSID must be set if EXTCLSID is set.
The optional configurationKeyword parameter allows the application to control the physical layout for this table in the underlying RDBMS—for example, in the case of an Oracle database, the configuration keyword controls the tablespace in which the table is created, the initial and next extents, and other properties. The configuration keywords for an ArcSDE instance are set up by the ArcSDE data administrator, the list of available keywords supported by a workspace may be obtained using the IWorkspaceConfiguration interface. For more information on configuration keywords, refer to the ArcSDE documentation.
Note: Do not prefixed table or feature class names with the following:
"gdb_"
"sde_"
"delta_"
name - The name (in)fields - A reference to a com.esri.arcgis.geodatabase.IFields (in)cLSID - A reference to a com.esri.arcgis.system.IUID (in)eXTCLSID - A reference to a com.esri.arcgis.system.IUID (in)configKeyword - The configKeyword (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IFeatureClass openFeatureClass(java.lang.String name)
throws java.io.IOException,
AutomationException
The OpenFeatureClass method can be used to open any existing feature class in the workspace given its fully qualified name. Note that every feature class in a geodatabase has a unique fully qualified name, and the OpenFeatureClass method can be used to directly open FeatureClasses that are part of a FeatureDataset (the FeatureDataset name does not need to be specified).
Use the IDatabaseConnectionInfo interface to determine the User and Database (if applicable). ISQLSyntax::QualifyTableName can be used to determine the fully qualified name for a feature class. Use the NameExists method on the IWorkspace2 interface to determine if a feature class with the appropriate name exists in the geodatabase.
Opening a feature class that participates in a topology or geometric network will also open all other feature classes participating in the topology or geometric network in memory.
name - The name (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.IDatabaseConnectionInfo
public IFeatureClass createFeatureClass(java.lang.String name,
IFields fields,
IUID cLSID,
IUID eXTCLSID,
int featureType,
java.lang.String shapeFieldName,
java.lang.String configKeyword)
throws java.io.IOException,
AutomationException
The CreateFeatureClass method can be used to create a stand-alone feature class that is not part of a FeatureDataset. It takes, in addition to all the parameters that CreateTable takes, a FeatureType parameter that specifies the category of features to be stored in this feature class (such as esriFTSimple, esriFTComplexEdgeFeature, and others) and a shapeFieldName. The ShapeFieldName identifies the name of the field in the input fields collection, of type Geometry, that represents the shape field for the feature class. The GeometryDef object associated with the shape Field object must be fully setup with information on both the spatial reference (the projected or geographic coordinate system plus the vertical coordinate system if needed, the coordinate domain and the coordinate resolution), and the spatial index for the shape Field before calling CreateFeatureClass.
If the FeatureWorkspace the FeatureClass is being created in is a Geodatabase workspace then at a minimum the Fields object must contain the required fields. The required fields can be obtained from the class description for the type of object you wish to create (see the RequiredFields property on IObjectClassDescription).
The optional CLSID parameter is used to specify what GUID to use to instantiate the object representing a feature in that FeatureClass. If "Nothing" is passed in for the CLSID, the GeoDatabase will use the CLSID corresponding to esriGeoDatabase.Feature. This is OK in most instances. If you know the FeatureClass has a custom Feature other than esriGeoDatabase.Feature, you can pass in its GUID at this time or later call methods on the FeatureClass' IClassSchemaEdit interface.
The optional EXTCLSID parameter specifies the GUID to use to instantiate the object representing the FeatureClassExtension. This object must at least support the IClassExtension interface. If you pass in "Nothing" for the EXTCLSID, the newly created FeatureClass will not have a ClassExtension. Since ClassExtensions are not required, this is generally OK, unless the FeatureClass is for annotation, dimension lines or a custom FeatureClass that requires a ClassExtension. If you know the FeatureClass has a ClassExtension and you know the GUID for the ClassExtension, you can pass it in at this time or later call methods on the FeatureClass's IClassSchemaEdit interface.
The optional configurationKeyword parameter allows the application to control the physical layout for this table in the underlying RDBMS—for example, in the case of an Oracle database, the configuration keyword controls the tablespace in which the table is created, the initial and next extents, and other properties. The configurationKeywords for an ArcSDE instance are set up by the ArcSDE data administrator, the list of available keywords supported by a workspace may be obtained using the IWorkspaceConfiguration interface. For more information on configuration keywords, refer to the ArcSDE documentation.
If the workspace the FeatureClass will be created in is a pre-9.2 Geodatabase, you must ensure the GeometryDef references a low precision spatial reference. 9.1 and earlier versions of the Geodatabase only support low precision spatial references, while 9.2 Geodatabases require high precision spatial references. Use IControlPrecision2::IsHighPrecision to manage the precision level of the spatial reference used to create the FeatureClass. Use the IGeodatabaseRelease interface to determine the release of the geodatabase
Note: Do not table or feature class names with the following prefixes are not supported:
name - The name (in)fields - A reference to a com.esri.arcgis.geodatabase.IFields (in)cLSID - A reference to a com.esri.arcgis.system.IUID (in)eXTCLSID - A reference to a com.esri.arcgis.system.IUID (in)featureType - A com.esri.arcgis.geodatabase.esriFeatureType constant (in)shapeFieldName - The shapeFieldName (in)configKeyword - The configKeyword (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IFeatureDataset openFeatureDataset(java.lang.String name)
throws java.io.IOException,
AutomationException
The OpenFeatureDataset method can be used to open any existing feature dataset in the workspace given its fully qualified name. At ArcGIS release 8.1 and higher, opening a feature dataset does not automatically instantiate all the feature classes in the feature dataset.
Use the IDatabaseConnectionInfo interface to determine the User and Database (if applicable). ISQLSyntax::QualifyTableName can be used to determine the fully qualified name for a feature dataset.
name - The name (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.IDatabaseConnectionInfo
public IFeatureDataset createFeatureDataset(java.lang.String name,
ISpatialReference spatialReference)
throws java.io.IOException,
AutomationException
The CreateFeatureDataset method can be used to create a new FeatureDataset given its name and spatial reference. Methods supported by the returned feature dataset allow creation of feature classes in the feature dataset.
If the workspace the FeatureDataset will be created in is a pre-9.2 Geodatabase, you must ensure the spatial reference is a low precision spatial reference. 9.1 and earlier versions of the Geodatabase only support low precision spatial references, while 9.2 Geodatabases require high precision spatial references. Use IControlPrecision2::IsHighPrecision to manage the precision level of the spatial reference used to create the FeatureDataset. Use the IGeodatabaseRelease interface to determine the release of the geodatabase
name - The name (in)spatialReference - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IQueryDef createQueryDef()
throws java.io.IOException,
AutomationException
The CreateQueryDef method can be used to create a new query definition object that can be evaluated by returning a cursor.
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IFeatureDataset openFeatureQuery(java.lang.String queryName,
IQueryDef pQueryDef)
throws java.io.IOException,
AutomationException
The OpenFeatureQuery can be used to open a virtual feature class whose definition is based on a QueryDef created using the CreateQueryDef method. The QueryDef can involve multiple tables as long as one of them is a feature class; the resulting virtual feature class can be used to construct a feature layer that can be added to Map. The shape column is required as part of the SubFields parameter of the QueryDef.
queryName - The queryName (in)pQueryDef - A reference to a com.esri.arcgis.geodatabase.IQueryDef (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IRelationshipClass openRelationshipClass(java.lang.String name)
throws java.io.IOException,
AutomationException
The OpenRelationshipClass method can be used to open any existing relationship class in the workspace given its fully qualified name.
Use the IDatabaseConnectionInfo interface to determine the User and Database (if applicable). ISQLSyntax::QualifyTableName can be used to determine the fully qualified name for a relationship class.
name - The name (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.IDatabaseConnectionInfo
public IRelationshipClass createRelationshipClass(java.lang.String relClassName,
IObjectClass originClass,
IObjectClass destinationClass,
java.lang.String forwardLabel,
java.lang.String backwardLabel,
int cardinality,
int notification,
boolean isComposite,
boolean isAttributed,
IFields relAttrFields,
java.lang.String originPrimaryKey,
java.lang.String destPrimaryKey,
java.lang.String originForeignKey,
java.lang.String destForeignKey)
throws java.io.IOException,
AutomationException
The CreateRelationshipClass method can be used to create a new stand-alone relationship class that is not part of a FeatureDataset. The relationship class is implemented as a separate data table whose name is the name of the relationship class if the cardinality is many-to-many or if the relationship class is attributed. The relAttribFields parameter is optional, a value of 0 or Nothing may be passed in for non-attributed relationship classes.
Many-to-many or attributed relationship classes require specification of all four key fields—the OriginPrimaryKey and the DestinationPrimaryKey are the primary key fields for the origin and destination object classes. OriginForeignKey and the DestinationForeignKey are the names of the corresponding foreign keys that will be created in the data table representing the relationship class. If the relationship class is one-to-one or one-to-many and not attributed, then the relationship class is implemented as a foreign key field in the destination object class (the OriginForeignKey) that references the primary key field in the origin object class (the OriginPrimaryKey). In this case, the OriginPrimaryKey, the OriginForeignKey, and the DestinationPrimaryKey must be supplied.
relClassName - The relClassName (in)originClass - A reference to a com.esri.arcgis.geodatabase.IObjectClass (in)destinationClass - A reference to a com.esri.arcgis.geodatabase.IObjectClass (in)forwardLabel - The forwardLabel (in)backwardLabel - The backwardLabel (in)cardinality - A com.esri.arcgis.geodatabase.esriRelCardinality constant (in)notification - A com.esri.arcgis.geodatabase.esriRelNotification constant (in)isComposite - The isComposite (in)isAttributed - The isAttributed (in)relAttrFields - A reference to a com.esri.arcgis.geodatabase.IFields (in)originPrimaryKey - The originPrimaryKey (in)destPrimaryKey - The destPrimaryKey (in)originForeignKey - The originForeignKey (in)destForeignKey - The destForeignKey (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public ITable openRelationshipQuery(IRelationshipClass pRelClass,
boolean joinForward,
IQueryFilter pSrcQueryFilter,
ISelectionSet pSrcSelectionSet,
java.lang.String targetColumns,
boolean doNotPushJoinToDB)
throws java.io.IOException,
AutomationException
pRelClass - A reference to a com.esri.arcgis.geodatabase.IRelationshipClass (in)joinForward - The joinForward (in)pSrcQueryFilter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)pSrcSelectionSet - A reference to a com.esri.arcgis.geodatabase.ISelectionSet (in)targetColumns - The targetColumns (in)doNotPushJoinToDB - The doNotPushJoinToDB (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||