|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.esri.arcgis.geoprocessing.ToolboxWorkspaceFactory
Workspace Factory used to open toolbox workspaces.
A WorkspaceFactory is a dispenser of workspaces and allows a client to connect to a workspace specified by a set of connection properties. The ToolboxWorkspaceFactory object can be used to open a toolbox from a workspace.
A Workspace is a container of spatial and nonspatial datasets such as feature classes, raster datasets, tables and toolboxes. It provides methods to instantiate existing datasets and to create new datasets. Workspaces are classified into types specified by the esriWorkspaceType enumerator: esriFileSystemWorksapce, esriLocalDatabaseWorkspace, and esriRemoteDatabaseWorkspace.
A toolbox workspace can be either a esriFileSystemWorkspace, a esriLocalDatabaseWorkspace, or a esriRemoteDatabaseWorkspace. Toolboxes can exist in a folder, a personal geodatabase, a file geodatabase, or a enterprise geodatabase.
| Constructor Summary | |
ToolboxWorkspaceFactory()
Constructs a ToolboxWorkspaceFactory using ArcGIS Engine. |
|
ToolboxWorkspaceFactory(java.lang.Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. |
|
| Method Summary | |
boolean |
containsWorkspace(java.lang.String parentDirectory,
IFileNames fileNames)
Indicates if parentDirectory contains a valid workspace, or is a valid file-system workspace. |
boolean |
copy(IWorkspaceName workspaceName,
java.lang.String destinationFolder,
IWorkspaceName[] workspaceNameCopy)
Copies a workspace to the specified destination folder. |
IWorkspaceName |
create(java.lang.String parentDirectory,
java.lang.String name,
IPropertySet connectionProperties,
int hWnd)
Creates a new workspace specified by the directory, file name, and connection properties. |
boolean |
equals(java.lang.Object o)
Compare this object with another |
ISupportErrorInfo |
getAsISupportErrorInfo()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IToolboxWorkspaceFactory |
getAsIToolboxWorkspaceFactory()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IWorkspaceFactory |
getAsIWorkspaceFactory()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IWorkspaceFactory2 |
getAsIWorkspaceFactory2()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IUID |
getClassID()
The class ID of the WorkspaceFactory. |
static java.lang.String |
getClsid()
|
java.lang.String |
getWorkspaceDescription(boolean plural)
A singular or plural description of the type of workspace the workspace factory opens/creates. |
IWorkspaceName |
getWorkspaceName(java.lang.String parentDirectory,
IFileNames fileNames)
Retrieves the workspace name of a workspace from the given list of file names. |
int |
getWorkspaceType()
The type of workspace the workspace factory opens/creates. |
int |
hashCode()
the hashcode for this object |
void |
interfaceSupportsErrorInfo(GUID riid)
Supported Platforms |
boolean |
isWorkspace(java.lang.String fileName)
True if the specified file identifies a workspace supported by the workspace factory. |
boolean |
move(IWorkspaceName workspaceName,
java.lang.String destinationFolder)
Moves a workspace to the specified destination folder. |
IWorkspace |
open(IPropertySet connectionProperties,
int hWnd)
Opens the workspace specified by the connection properties. |
IWorkspace |
openFromFile(java.lang.String fileName,
int hWnd)
Opens the workspace specified by the given file name. |
IWorkspace |
openFromString(java.lang.String connectStr,
int hWnd)
Opens the workspace specified by a connection string. |
IPropertySet |
readConnectionPropertiesFromFile(java.lang.String fileName)
The connection properties from the specified file. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ToolboxWorkspaceFactory()
throws java.io.IOException,
java.net.UnknownHostException
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems
public ToolboxWorkspaceFactory(java.lang.Object obj)
throws java.io.IOException
obj to ToolboxWorkspaceFactory. ToolboxWorkspaceFactory theToolboxWorkspaceFactory = (ToolboxWorkspaceFactory) obj;
obj - an object returned from ArcGIS Engine or Server
java.io.IOException - if there are interop problems| Method Detail |
public static java.lang.String getClsid()
public IWorkspaceFactory getAsIWorkspaceFactory()
public IWorkspaceFactory2 getAsIWorkspaceFactory2()
public IToolboxWorkspaceFactory getAsIToolboxWorkspaceFactory()
public ISupportErrorInfo getAsISupportErrorInfo()
public boolean equals(java.lang.Object o)
public int hashCode()
public IWorkspace open(IPropertySet connectionProperties,
int hWnd)
throws java.io.IOException,
AutomationException
IWorkspaceFactoryOpen takes as input a property set of connection properties that specify the workspace to connect to. In the case of file system workspaces and local database workspaces, a single property named DATABASE, whose value is the pathname to the workspace, is usually all that is required. In the case of remote database workspaces accessed via ArcSDE the properties can include the USER, PASSWORD, DATABASE, SERVER, INSTANCE, VERSION, HISTORICAL_NAME, HISTORICAL_TIMESTAMP, and AUTHENTICATION_MODE properties of the database being connected to.
List of acceptable connection property names and a brief description of each
"SERVER" – SDE server name you are connecting to.
"INSTANCE" – Instance you are connection to.
"DATABASE" – Database connected to.
"USER" – Connected user.
"PASSWORD" – Connected password.
"AUTHENTICATION_MODE" – Credential authentication mode of the connection. Acceptable values are "OSA" and "DBMS".
"VERSION" – Transactional version to connect to. Acceptable value is a string that represents a transaction version name.
"HISTORICAL_NAME" – Historical version to connect to. Acceptable value is a string type that represents a historical marker name.
"HISTORICAL_TIMESTAMP" – Moment in history to establish an historical version connection. Acceptable value is a date time that represents a moment timestamp.
Notes:
If “AUTHENTICATION_MODE” is “OSA” then “USER” and “PASSWORD” are not required. “OSA” represents operating system authentication and uses the operating system credentials to establish a connection with the database.
Since the workspace connection can only represent one version only 1 of the 3 version properties (“VERSION” or “HISTORICAL_NAME” or “HISTORICAL_TIMESTAMP”) should be used.
open in interface IWorkspaceFactoryconnectionProperties - A reference to a com.esri.arcgis.system.IPropertySet (in)hWnd - The hWnd (A COM typedef) (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public IWorkspace openFromFile(java.lang.String fileName,
int hWnd)
throws java.io.IOException,
AutomationException
IWorkspaceFactoryOpenFromFile takes the pathname of a file or directory that represents either a FileSystemWorkspace or LocalDatabaseWorkspace, or a connection file to a RemoteDatabase workspace and returns an interface on the specified workspace. Clients of these methods can then proceed to open and access datasets in the workspace. If these methods are called with insufficient properties, then the user will be presented with a connection dialog that will prompt for the required properties.
The hWnd argument is the parent window or application's window. The hWnd will guarantee that the connection dialog, if presented to you because of insufficient properties, has the correct parent.
openFromFile in interface IWorkspaceFactoryfileName - The fileName (in)hWnd - The hWnd (A COM typedef) (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IWorkspaceName create(java.lang.String parentDirectory,
java.lang.String name,
IPropertySet connectionProperties,
int hWnd)
throws java.io.IOException,
AutomationException
IWorkspaceFactory
create in interface IWorkspaceFactoryparentDirectory - The parentDirectory (in)name - The name (in)connectionProperties - A reference to a com.esri.arcgis.system.IPropertySet (in)hWnd - The hWnd (A COM typedef) (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public boolean containsWorkspace(java.lang.String parentDirectory,
IFileNames fileNames)
throws java.io.IOException,
AutomationException
IWorkspaceFactory
containsWorkspace in interface IWorkspaceFactoryparentDirectory - The parentDirectory (in)fileNames - A reference to a com.esri.arcgis.system.IFileNames (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public IWorkspaceName getWorkspaceName(java.lang.String parentDirectory,
IFileNames fileNames)
throws java.io.IOException,
AutomationException
IWorkspaceFactoryGetWorkspaceName is useful when browsing the file system for workspaces. It is handed in a parent directory and the list of file names in the directory to be examined. It returns a WorkspaceName object representing the first workspace it finds in the list of filenames and removes any filenames representing the workspace or its datasets from the input list of filenames.
getWorkspaceName in interface IWorkspaceFactoryparentDirectory - The parentDirectory (in)fileNames - A reference to a com.esri.arcgis.system.IFileNames (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IUID getClassID()
throws java.io.IOException,
AutomationException
IWorkspaceFactoryGetClassID returns the unique identifier for the workspace factory. You can use this to distinguish different versions of the same type of factory, for example, whether you are working with an SDEWorkspace, FileGDBWorkspace or AccessWorkspace factory.
getClassID in interface IWorkspaceFactoryAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public boolean isWorkspace(java.lang.String fileName)
throws java.io.IOException,
AutomationException
IWorkspaceFactory
isWorkspace in interface IWorkspaceFactoryfileName - The fileName (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IPropertySet readConnectionPropertiesFromFile(java.lang.String fileName)
throws java.io.IOException,
AutomationException
IWorkspaceFactoryThe filename parameter represents the pathname of a file that contains the connection information to be placed into the IPropertySet variable. When used with ArcSDE connection files, the pathname generally points to a binary file in the directory %USERPROFILE%/Application Data/ESRI/ArcCatalog.
readConnectionPropertiesFromFile in interface IWorkspaceFactoryfileName - The fileName (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public java.lang.String getWorkspaceDescription(boolean plural)
throws java.io.IOException,
AutomationException
IWorkspaceFactory
getWorkspaceDescription in interface IWorkspaceFactoryplural - The plural (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public int getWorkspaceType()
throws java.io.IOException,
AutomationException
IWorkspaceFactory
getWorkspaceType in interface IWorkspaceFactoryAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public boolean copy(IWorkspaceName workspaceName,
java.lang.String destinationFolder,
IWorkspaceName[] workspaceNameCopy)
throws java.io.IOException,
AutomationException
IWorkspaceFactoryThe Copy and Move methods can be used to copy or move workspaces or connection files between folders in the file system. The Boolean result indicates if the operation was successful. In the case of remote database workspaces, these operations work on the connection file representing the workspace.
copy in interface IWorkspaceFactoryworkspaceName - A reference to a com.esri.arcgis.geodatabase.IWorkspaceName (in)destinationFolder - The destinationFolder (in)workspaceNameCopy - A reference to a com.esri.arcgis.geodatabase.IWorkspaceName (out: use single element array)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public boolean move(IWorkspaceName workspaceName,
java.lang.String destinationFolder)
throws java.io.IOException,
AutomationException
IWorkspaceFactoryThe Copy and Move methods can be used to copy or move workspaces or connection files between folders in the file system. The Boolean result indicates if the operation was successful. In the case of remote database workspaces, these operations work on the connection file representing the workspace.
move in interface IWorkspaceFactoryworkspaceName - A reference to a com.esri.arcgis.geodatabase.IWorkspaceName (in)destinationFolder - The destinationFolder (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public IWorkspace openFromString(java.lang.String connectStr,
int hWnd)
throws java.io.IOException,
AutomationException
IWorkspaceFactory2The connect string is a collection of name value pairs separated by a semicolon (;).
openFromString in interface IWorkspaceFactory2connectStr - The connectStr (in)hWnd - The hWnd (A COM typedef) (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void interfaceSupportsErrorInfo(GUID riid)
throws java.io.IOException,
AutomationException
ISupportErrorInfoIndicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo in interface ISupportErrorInforiid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||