|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.interop.Dispatch com.esri.arcgis.geodatabase.IFeatureWorkspaceProxy
public class IFeatureWorkspaceProxy
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();
Field Summary | |
---|---|
boolean |
noncastable
|
Fields inherited from class com.esri.arcgis.interop.Dispatch |
---|
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef |
Constructor Summary | |
---|---|
|
IFeatureWorkspaceProxy()
|
|
IFeatureWorkspaceProxy(Object obj)
|
protected |
IFeatureWorkspaceProxy(Object obj,
String iid)
|
Method Summary | |
---|---|
void |
addListener(String iidStr,
Object theListener,
Object theSource)
|
IFeatureClass |
createFeatureClass(String name,
IFields fields,
IUID cLSID,
IUID eXTCLSID,
int featureType,
String shapeFieldName,
String configKeyword)
Creates a new standalone feature class under the workspace. |
IFeatureDataset |
createFeatureDataset(String name,
ISpatialReference spatialReference)
Creates a new feature dataset. |
IQueryDef |
createQueryDef()
Create a query definition object. |
IRelationshipClass |
createRelationshipClass(String relClassName,
IObjectClass originClass,
IObjectClass destinationClass,
String forwardLabel,
String backwardLabel,
int cardinality,
int notification,
boolean isComposite,
boolean isAttributed,
IFields relAttrFields,
String originPrimaryKey,
String destPrimaryKey,
String originForeignKey,
String destForeignKey)
Creates a new relationship class. |
ITable |
createTable(String name,
IFields fields,
IUID cLSID,
IUID eXTCLSID,
String configKeyword)
Creates a new table. |
IFeatureClass |
openFeatureClass(String name)
Opens an existing feature class. |
IFeatureDataset |
openFeatureDataset(String name)
Opens an existing feature dataset. |
IFeatureDataset |
openFeatureQuery(String queryName,
IQueryDef queryDef)
Opens a feature dataset containing a single feature class defined by the specified Query. |
IRelationshipClass |
openRelationshipClass(String name)
Opens an existing relationship class. |
ITable |
openRelationshipQuery(IRelationshipClass relClass,
boolean joinForward,
IQueryFilter srcQueryFilter,
ISelectionSet srcSelectionSet,
String targetColumns,
boolean doNotPushJoinToDB)
The table of a relationship join query. |
ITable |
openTable(String name)
Opens an existing table. |
void |
removeListener(String iidStr,
Object theListener)
|
Methods inherited from class com.esri.arcgis.interop.Dispatch |
---|
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public boolean noncastable
Constructor Detail |
---|
public IFeatureWorkspaceProxy()
public IFeatureWorkspaceProxy(Object obj) throws IOException
IOException
protected IFeatureWorkspaceProxy(Object obj, String iid) throws IOException
IOException
Method Detail |
---|
public void addListener(String iidStr, Object theListener, Object theSource) throws IOException
addListener
in class com.esri.arcgis.interop.Dispatch
IOException
public void removeListener(String iidStr, Object theListener) throws IOException
removeListener
in class com.esri.arcgis.interop.Dispatch
IOException
public ITable openTable(String name) throws IOException, AutomationException
openTable
in interface IFeatureWorkspace
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ITable createTable(String name, IFields fields, IUID cLSID, IUID eXTCLSID, String configKeyword) throws 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 extends esriGeoDatabase.Object. CLSID must be set in order to apply a class extension with the EXTCLSID parameter.
The Fields object passed to the Fields parameter should not be an object retrieved from another class. If the new class is going to have the same fields as an existing class, cast the existing class' fields collection to the IClone interface, clone it, and use the cloned fields collection as input for this method.
The optional configurationKeyword parameter allows the application to control the physical layout for this table in the underlying RDBMS. For example, in 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.
Note: Table or feature class names with the following prefixes are not supported:
createTable
in interface IFeatureWorkspace
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFeatureClass openFeatureClass(String name) throws 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 feature classes that are part of a feature dataset (the feature dataset 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 a 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.
openFeatureClass
in interface IFeatureWorkspace
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFeatureClass createFeatureClass(String name, IFields fields, IUID cLSID, IUID eXTCLSID, int featureType, String shapeFieldName, String configKeyword) throws IOException, AutomationException
The CreateFeatureClass method can be used to create a stand-alone feature class that is not part of a feature dataset. It takes, in addition to all the parameters that CreateTable takes, an esriFeatureType parameter that specifies the category of features to be stored in this feature class (i.e., esriFTSimple, esriFTComplexEdgeFeature) and a shape field name. The shape field name identifies the name of the field in the input fields collection that represents the shape field for the feature class.
The Fields object passed to the Fields parameter should not be an object retrieved from another class. If the new class is going to have the same fields as an existing class, cast the existing class' fields collection to the IClone interface, clone it, and use the cloned fields collection as input for this method.
The GeometryDef object associated with the shape field object must be fully setup with a spatial reference, grid properties, and the geometry type before calling CreateFeatureClass.
The following esriGeometryType enumeration values represent the valid geometry types for a new feature class' GeometryDef object: esriGeometryPoint, esriGeometryMultipoint, esriGeometryPolyline, esriGeometryPolygon, and esriGeometryMultiPatch.
If the feature class is being created in geodatabase then the fields collection must contain, at a minimum, an Object ID field and a Shape field. 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 CLSID parameter is used to specify what type of feature will be contained by the class. If a null value is passed in for the CLSID, the geodatabase will return Feature instances from the class. In most cases, this is the desired behavior. If the feature class is used to store custom features, the GUID of the custom feature should be provided. Alternatively, the IClassSchemaEdit interface can be used to change the feature class' CLSID following creation.
The EXTCLSID parameter is used to specify what class will be instantiated as the feature class extension. This object must at least support the IClassExtension interface. If a null value is passed in for the EXTCLSID parameter, the feature class will not have a class extension associated with it. Since class extensions are not required, this is often the desired behavior. If the feature class should have an associated extension, the GUID of the class extension should be provided. Alternatively, the IClassSchemaEdit interface can be used to associate a class extension following creation.
The configurationKeywordparameter 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, and the list of available keywords supported by a workspace may be obtained using the IWorkspaceConfigurationinterface.
If the workspace the feature class 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 feature class. Use the IGeodatabaseRelease interface to determine the release of the geodatabase.
Developers should be aware that calling this method on a shapefile workspace when a shapefile of the same name already exists will cause the existing shapefile to be deleted. To prevent this, check for the existence of a shapefile prior to calling this method.
Note:Table or feature class names with the following prefixes are not supported:
createFeatureClass
in interface IFeatureWorkspace
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFeatureDataset openFeatureDataset(String name) throws IOException, AutomationException
The OpenFeatureDataset method can be used to open any existing feature dataset 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 feature dataset.
openFeatureDataset
in interface IFeatureWorkspace
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFeatureDataset createFeatureDataset(String name, ISpatialReference spatialReference) throws 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
createFeatureDataset
in interface IFeatureWorkspace
name
- The name (in)spatialReference
- A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IQueryDef createQueryDef() throws IOException, AutomationException
The CreateQueryDef method can be used to create a new query definition object that can be evaluated by returning a cursor.
createQueryDef
in interface IFeatureWorkspace
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFeatureDataset openFeatureQuery(String queryName, IQueryDef queryDef) throws 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 a map. The shape column is required as part of the SubFields parameter of the QueryDef.
openFeatureQuery
in interface IFeatureWorkspace
queryName
- The queryName (in)queryDef
- A reference to a com.esri.arcgis.geodatabase.IQueryDef (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRelationshipClass openRelationshipClass(String name) throws 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.
openRelationshipClass
in interface IFeatureWorkspace
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRelationshipClass createRelationshipClass(String relClassName, IObjectClass originClass, IObjectClass destinationClass, String forwardLabel, String backwardLabel, int cardinality, int notification, boolean isComposite, boolean isAttributed, IFields relAttrFields, String originPrimaryKey, String destPrimaryKey, String originForeignKey, String destForeignKey) throws IOException, AutomationException
The CreateRelationshipClass method can be used to create a new stand-alone relationship class that is not part of a feature dataset. 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, and a null value 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 destPrimaryKey parameters are the primary key fields for the origin and destination object classes. The OriginForeignKey and destForeignKey parameters 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 destPrimaryKey must be supplied.
The Fields object passed to the relAttrFields parameter should not be an object retrieved from another class. If the new class is going to have the same fields as an existing class, cast the existing class' fields collection to the IClone interface, clone it, and use the cloned fields collection as input for this method.
createRelationshipClass
in interface IFeatureWorkspace
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ITable openRelationshipQuery(IRelationshipClass relClass, boolean joinForward, IQueryFilter srcQueryFilter, ISelectionSet srcSelectionSet, String targetColumns, boolean doNotPushJoinToDB) throws IOException, AutomationException
openRelationshipQuery
in interface IFeatureWorkspace
relClass
- A reference to a com.esri.arcgis.geodatabase.IRelationshipClass (in)joinForward
- The joinForward (in)srcQueryFilter
- A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)srcSelectionSet
- A reference to a com.esri.arcgis.geodatabase.ISelectionSet (in)targetColumns
- The targetColumns (in)doNotPushJoinToDB
- The doNotPushJoinToDB (in)
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 |