com.esri.arcgis.catalog
Class GxDataServer

java.lang.Object
  extended by com.esri.arcgis.catalog.GxDataServer
All Implemented Interfaces:
IGxGDSConnection, IGxObject, IGxObjectContainer, IGxObjectProperties, IGxObjectUI, IGxObjectWizard, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class GxDataServer
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IGxObject, IGxObjectUI, IGxObjectProperties, IGxObjectWizard, IGxObjectContainer, IGxGDSConnection

The one and only Data Server object.

Product Availability

Available with ArcGIS Desktop.

See Also:
Serialized Form

Constructor Summary
GxDataServer()
          Constructs a GxDataServer using ArcGIS Engine.
GxDataServer(Object obj)
          Construct a GxDataServer using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 IGxObject addChild(IGxObject child)
          Adds a new child and returns a reference to it.
 void attach(IGxObject parent, IGxCatalog pCatalog)
          Attaches the object to its parent and the catalog.
 void attachGeoDatabase(String gdbName, String gdbFileName)
          Attaches a Geodatabase.
 void connect()
          Connects to a GIS Data server.
 void createGeoDatabase(String gdbName, String gdbFileName, int gdbFileSize)
          Creates a new Geodatabase.
 void deleteChild(IGxObject child)
          Deletes the specified child object.
 void detach()
          Instructs the object to detach itself from its parent and the catalog.
 void disconnect()
          Disconnects from a GIS Data server.
 boolean equals(Object o)
          Compare this object with another
 String getBaseName()
          The base name of the object (i.e.
 String getCategory()
          The category of the object.
 IEnumGxObject getChildren()
          An enumeration of the child objects.
 IUID getClassID()
          The class ID of this object.
static String getClsid()
          getClsid.
 IUID getContextMenu()
          The class ID of the context menu for this object.
 Object getDataServerManager()
          The Data Server Manager object.
 String getFullName()
          The full name of the object.
 IName getInternalObjectName()
          The Name for the internal object that this GxObject represents.
 int getLargeImage()
          The large image that represents the object.
 int getLargeSelectedImage()
          The large image that represents the object when it is selected.
 String getName()
          The short name of the object.
 IUID getNewMenu()
          The class ID of the New menu for this object.
 IGxObject getParent()
          The parent of the object.
 void getPropByIndex(int index, String[] name, Object[] value)
          The name and value of the indexed property in the GxObject.
 Object getProperty(String name)
          The value of the named property in the GxObject.
 int getPropertyCount()
          The number of properties in the GxObject.
 String getServerName()
          The server name.
 int getSmallImage()
          The small image that represents the object.
 int getSmallSelectedImage()
          The small image that represents the object when it is selected.
 int hashCode()
          the hashcode for this object
 boolean isAdministrator()
          Indicates whether the connected user is an administrator or not.
 boolean isAreChildrenViewable()
          Indicates if the objects children are available for viewing in the tree-view.
 boolean isConnected()
          Indicates whether the GIS Data server connection has been made.
 boolean isHasChildren()
          Indicates if the object has any children.
 boolean isValid()
          Indicates if the object is still valid.
 void pause()
          Pauses a Database server.
 void refresh()
          Updates the object and any children of the object.
 void restoreGeodatabase(String gdbName, String backupFileName, String dbFileName)
          Restores a backup to the specified Geodatabase.
 void resume()
          Resumes a Database server.
 void setProperty(String name, Object value)
          Set the value of the named property in the GxObject.
 void start()
          Starts a Database server.
 void stop()
          Stops a Database server.
 
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

GxDataServer

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

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

GxDataServer

public GxDataServer(Object obj)
             throws IOException
Construct a GxDataServer using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to GxDataServer.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems GxDataServer theGxDataServer = (GxDataServer) obj;
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

getName

public String getName()
               throws IOException,
                      AutomationException
The short name of the object.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getName in interface IGxObject
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFullName

public String getFullName()
                   throws IOException,
                          AutomationException
The full name of the object.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getFullName in interface IGxObject
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBaseName

public String getBaseName()
                   throws IOException,
                          AutomationException
The base name of the object (i.e. no extension).

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getBaseName in interface IGxObject
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCategory

public String getCategory()
                   throws IOException,
                          AutomationException
The category of the object.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getCategory in interface IGxObject
Returns:
The category
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getParent

public IGxObject getParent()
                    throws IOException,
                           AutomationException
The parent of the object.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getClassID

public IUID getClassID()
                throws IOException,
                       AutomationException
The class ID of this object.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getInternalObjectName

public IName getInternalObjectName()
                            throws IOException,
                                   AutomationException
The Name for the internal object that this GxObject represents.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

isValid

public boolean isValid()
                throws IOException,
                       AutomationException
Indicates if the object is still valid.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

attach

public void attach(IGxObject parent,
                   IGxCatalog pCatalog)
            throws IOException,
                   AutomationException
Attaches the object to its parent and the catalog.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
attach in interface IGxObject
Parameters:
parent - A reference to a com.esri.arcgis.catalog.IGxObject (in)
pCatalog - A reference to a com.esri.arcgis.catalog.IGxCatalog (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

detach

public void detach()
            throws IOException,
                   AutomationException
Instructs the object to detach itself from its parent and the catalog.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
detach in interface IGxObject
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

refresh

public void refresh()
             throws IOException,
                    AutomationException
Updates the object and any children of the object.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
refresh in interface IGxObject
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSmallImage

public int getSmallImage()
                  throws IOException,
                         AutomationException
The small image that represents the object.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getSmallImage in interface IGxObjectUI
Returns:
The hBitmap (A COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSmallSelectedImage

public int getSmallSelectedImage()
                          throws IOException,
                                 AutomationException
The small image that represents the object when it is selected.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getSmallSelectedImage in interface IGxObjectUI
Returns:
The hBitmap (A COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLargeImage

public int getLargeImage()
                  throws IOException,
                         AutomationException
The large image that represents the object.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getLargeImage in interface IGxObjectUI
Returns:
The hBitmap (A COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLargeSelectedImage

public int getLargeSelectedImage()
                          throws IOException,
                                 AutomationException
The large image that represents the object when it is selected.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getLargeSelectedImage in interface IGxObjectUI
Returns:
The hBitmap (A COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getContextMenu

public IUID getContextMenu()
                    throws IOException,
                           AutomationException
The class ID of the context menu for this object.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getNewMenu

public IUID getNewMenu()
                throws IOException,
                       AutomationException
The class ID of the New menu for this object.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getPropertyCount

public int getPropertyCount()
                     throws IOException,
                            AutomationException
The number of properties in the GxObject.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getPropertyCount in interface IGxObjectProperties
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPropByIndex

public void getPropByIndex(int index,
                           String[] name,
                           Object[] value)
                    throws IOException,
                           AutomationException
The name and value of the indexed property in the GxObject.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getPropByIndex in interface IGxObjectProperties
Parameters:
index - The index (in)
name - The name (in/out: use single element array)
value - A Variant (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getProperty

public Object getProperty(String name)
                   throws IOException,
                          AutomationException
The value of the named property in the GxObject.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getProperty in interface IGxObjectProperties
Parameters:
name - The name (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setProperty

public void setProperty(String name,
                        Object value)
                 throws IOException,
                        AutomationException
Set the value of the named property in the GxObject.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setProperty in interface IGxObjectProperties
Parameters:
name - The name (in)
value - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isHasChildren

public boolean isHasChildren()
                      throws IOException,
                             AutomationException
Indicates if the object has any children.

Remarks

Note: This property always return True even when it has no children. This was done to improve the overall ArcCatalog browsing performance.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
isHasChildren in interface IGxObjectContainer
Returns:
The hasChildren
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getChildren

public IEnumGxObject getChildren()
                          throws IOException,
                                 AutomationException
An enumeration of the child objects.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

isAreChildrenViewable

public boolean isAreChildrenViewable()
                              throws IOException,
                                     AutomationException
Indicates if the objects children are available for viewing in the tree-view.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
isAreChildrenViewable in interface IGxObjectContainer
Returns:
The areViewable
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addChild

public IGxObject addChild(IGxObject child)
                   throws IOException,
                          AutomationException
Adds a new child and returns a reference to it. However, if a duplicate already exists, the function returns the existing child instead.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
addChild in interface IGxObjectContainer
Parameters:
child - A reference to a com.esri.arcgis.catalog.IGxObject (in)
Returns:
A reference to a com.esri.arcgis.catalog.IGxObject
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteChild

public void deleteChild(IGxObject child)
                 throws IOException,
                        AutomationException
Deletes the specified child object.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
deleteChild in interface IGxObjectContainer
Parameters:
child - A reference to a com.esri.arcgis.catalog.IGxObject (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isConnected

public boolean isConnected()
                    throws IOException,
                           AutomationException
Indicates whether the GIS Data server connection has been made.

Product Availability

Available with ArcGIS Desktop.

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

isAdministrator

public boolean isAdministrator()
                        throws IOException,
                               AutomationException
Indicates whether the connected user is an administrator or not.

Product Availability

Available with ArcGIS Desktop.

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

connect

public void connect()
             throws IOException,
                    AutomationException
Connects to a GIS Data server.

Product Availability

Available with ArcGIS Desktop.

Specified by:
connect in interface IGxGDSConnection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

disconnect

public void disconnect()
                throws IOException,
                       AutomationException
Disconnects from a GIS Data server.

Product Availability

Available with ArcGIS Desktop.

Specified by:
disconnect in interface IGxGDSConnection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getServerName

public String getServerName()
                     throws IOException,
                            AutomationException
The server name.

Product Availability

Available with ArcGIS Desktop.

Specified by:
getServerName in interface IGxGDSConnection
Returns:
The serverName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDataServerManager

public Object getDataServerManager()
                            throws IOException,
                                   AutomationException
The Data Server Manager object.

Product Availability

Available with ArcGIS Desktop.

Specified by:
getDataServerManager in interface IGxGDSConnection
Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createGeoDatabase

public void createGeoDatabase(String gdbName,
                              String gdbFileName,
                              int gdbFileSize)
                       throws IOException,
                              AutomationException
Creates a new Geodatabase.

Product Availability

Available with ArcGIS Desktop.

Specified by:
createGeoDatabase in interface IGxGDSConnection
Parameters:
gdbName - The gdbName (in)
gdbFileName - The gdbFileName (in)
gdbFileSize - The gdbFileSize (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

attachGeoDatabase

public void attachGeoDatabase(String gdbName,
                              String gdbFileName)
                       throws IOException,
                              AutomationException
Attaches a Geodatabase.

Product Availability

Available with ArcGIS Desktop.

Specified by:
attachGeoDatabase in interface IGxGDSConnection
Parameters:
gdbName - The gdbName (in)
gdbFileName - The gdbFileName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

restoreGeodatabase

public void restoreGeodatabase(String gdbName,
                               String backupFileName,
                               String dbFileName)
                        throws IOException,
                               AutomationException
Restores a backup to the specified Geodatabase.

Product Availability

Available with ArcGIS Desktop.

Specified by:
restoreGeodatabase in interface IGxGDSConnection
Parameters:
gdbName - The gdbName (in)
backupFileName - The backupFileName (in)
dbFileName - The dbFileName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

start

public void start()
           throws IOException,
                  AutomationException
Starts a Database server.

Product Availability

Available with ArcGIS Desktop.

Specified by:
start in interface IGxGDSConnection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

stop

public void stop()
          throws IOException,
                 AutomationException
Stops a Database server.

Product Availability

Available with ArcGIS Desktop.

Specified by:
stop in interface IGxGDSConnection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

resume

public void resume()
            throws IOException,
                   AutomationException
Resumes a Database server.

Product Availability

Available with ArcGIS Desktop.

Specified by:
resume in interface IGxGDSConnection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

pause

public void pause()
           throws IOException,
                  AutomationException
Pauses a Database server.

Product Availability

Available with ArcGIS Desktop.

Specified by:
pause in interface IGxGDSConnection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.