com.esri.arcgis.geodatabase
Class WorkspaceDefinition

java.lang.Object
  extended by com.esri.arcgis.geodatabase.WorkspaceDefinition
All Implemented Interfaces:
IMetadata, IWorkspaceDefinition, IWorkspaceDefinition2, com.esri.arcgis.interop.RemoteObjRef, IXMLSerialize, Serializable

public class WorkspaceDefinition
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IWorkspaceDefinition, IWorkspaceDefinition2, IXMLSerialize, IMetadata

The Workspace Definition Object.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
WorkspaceDefinition()
          Constructs a WorkspaceDefinition using ArcGIS Engine.
WorkspaceDefinition(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
WorkspaceDefinition theWorkspaceDefinition = (WorkspaceDefinition) obj;
 
Method Summary
 void deserialize(IXMLSerializeData data)
          Deserializes an object from XML.
 boolean equals(Object o)
          Compare this object with another
 IArray getChildren()
          The list of sub-elements.
static String getClsid()
          getClsid.
 IArray getDomains()
          The list of Domains.
 IGPReplica getGPReplica()
          The replica.
 IPropertySet getMetadata()
          The PropertySet containing metadata.
 String getVersion()
          The workspace version.
 int getWorkspaceType()
          The workspace type.
 int hashCode()
          the hashcode for this object
 void serialize(IXMLSerializeData data)
          Serializes an object to XML.
 void setChildrenByRef(IArray dataElements)
          The list of sub-elements.
 void setDomainsByRef(IArray domains)
          The list of Domains.
 void setGPReplicaByRef(IGPReplica replica)
          The replica.
 void setMetadata(IPropertySet ppPropertySet)
          The PropertySet containing metadata.
 void setVersion(String workspaceVersion)
          The workspace version.
 void setWorkspaceType(int workspaceType)
          The workspace type.
 void synchronize(int action, int interval)
          Updates metadata with the current properties; may create metadata if it doesn't already exist.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

WorkspaceDefinition

public WorkspaceDefinition()
                    throws IOException,
                           UnknownHostException
Constructs a WorkspaceDefinition using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

WorkspaceDefinition

public WorkspaceDefinition(Object obj)
                    throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
WorkspaceDefinition theWorkspaceDefinition = (WorkspaceDefinition) obj;

Construct a WorkspaceDefinition using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to WorkspaceDefinition.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getWorkspaceType

public int getWorkspaceType()
                     throws IOException,
                            AutomationException
The workspace type.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getWorkspaceType in interface IWorkspaceDefinition
Returns:
A com.esri.arcgis.geodatabase.esriWorkspaceType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setWorkspaceType

public void setWorkspaceType(int workspaceType)
                      throws IOException,
                             AutomationException
The workspace type.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setWorkspaceType in interface IWorkspaceDefinition
Parameters:
workspaceType - A com.esri.arcgis.geodatabase.esriWorkspaceType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getVersion

public String getVersion()
                  throws IOException,
                         AutomationException
The workspace version.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getVersion in interface IWorkspaceDefinition
Returns:
The workspaceVersion
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setVersion

public void setVersion(String workspaceVersion)
                throws IOException,
                       AutomationException
The workspace version.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setVersion in interface IWorkspaceDefinition
Parameters:
workspaceVersion - The workspaceVersion (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDomains

public IArray getDomains()
                  throws IOException,
                         AutomationException
The list of Domains.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDomains in interface IWorkspaceDefinition
Returns:
A reference to a com.esri.arcgis.system.IArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDomainsByRef

public void setDomainsByRef(IArray domains)
                     throws IOException,
                            AutomationException
The list of Domains.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setDomainsByRef in interface IWorkspaceDefinition
Parameters:
domains - A reference to a com.esri.arcgis.system.IArray (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getChildren

public IArray getChildren()
                   throws IOException,
                          AutomationException
The list of sub-elements.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getChildren in interface IWorkspaceDefinition
Returns:
A reference to a com.esri.arcgis.system.IArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setChildrenByRef

public void setChildrenByRef(IArray dataElements)
                      throws IOException,
                             AutomationException
The list of sub-elements.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setChildrenByRef in interface IWorkspaceDefinition
Parameters:
dataElements - A reference to a com.esri.arcgis.system.IArray (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setGPReplicaByRef

public void setGPReplicaByRef(IGPReplica replica)
                       throws IOException,
                              AutomationException
The replica.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setGPReplicaByRef in interface IWorkspaceDefinition2
Parameters:
replica - A reference to a com.esri.arcgis.geodatabase.IGPReplica (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGPReplica

public IGPReplica getGPReplica()
                        throws IOException,
                               AutomationException
The replica.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getGPReplica in interface IWorkspaceDefinition2
Returns:
A reference to a com.esri.arcgis.geodatabase.IGPReplica
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

serialize

public void serialize(IXMLSerializeData data)
               throws IOException,
                      AutomationException
Serializes an object to XML.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
serialize in interface IXMLSerialize
Parameters:
data - A reference to a com.esri.arcgis.system.IXMLSerializeData (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deserialize

public void deserialize(IXMLSerializeData data)
                 throws IOException,
                        AutomationException
Deserializes an object from XML.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
deserialize in interface IXMLSerialize
Parameters:
data - A reference to a com.esri.arcgis.system.IXMLSerializeData (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMetadata

public IPropertySet getMetadata()
                         throws IOException,
                                AutomationException
The PropertySet containing metadata.

Remarks

The variable to hold the data must be of IPropertySet data type.

The metadata property is frequently used to save, or update, changes to metadata documents that have taken place through methods available on the IPropertySet, IXmlPropertySet, and/or IXmlPropertySet2 interfaces.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMetadata in interface IMetadata
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMetadata

public void setMetadata(IPropertySet ppPropertySet)
                 throws IOException,
                        AutomationException
The PropertySet containing metadata.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setMetadata in interface IMetadata
Parameters:
ppPropertySet - A reference to a com.esri.arcgis.system.IPropertySet (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

synchronize

public void synchronize(int action,
                        int interval)
                 throws IOException,
                        AutomationException
Updates metadata with the current properties; may create metadata if it doesn't already exist.

Description

The Synchronize method is used to extract metadata properties from an object and write those properties to the metadata .xml. Depending on the value of the esriMetaSyncAction, the Synchronize method may generate a new set of metadata if it doesn't already exist.

Remarks

The following actions will result in synchronization given each of the listed conditions:

Action Metadata status Esri/Sync element Interval parameter
esriMSAAccessed Doesn't matter Must not be FALSE Must be less than actual interval
esriMSAAlways Doesn't matter Doesn't matter Doesn't matter
esriMSACreated Must not exist Must not be FALSE Must be less than actual interval
esriMSANotCreated Must exist Must not be FALSE Must be less than actual interval
esriMSAOverwrite Doesn't matter Doesn't matter Doesn't matter

The difference between esriMSAAlways and esriMSAOverwrite lies in which elements are synchronized. esriMSAAlways will honor the removal or value change of an element's Sync attribute (to disable synchronization), whereas using esriMSAOverwrite is equivalent to setting the IXmlPropertySet2.OverwriteSyncAttribute to true for the metadata's property set, meaning that even elements without a Sync attribute of TRUE will be synchronized.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
synchronize in interface IMetadata
Parameters:
action - A com.esri.arcgis.geodatabase.esriMetadataSyncAction constant (in)
interval - The interval (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.