com.esri.arcgis.geodatabasedistributed
Class GdbImporter

java.lang.Object
  extended bycom.esri.arcgis.geodatabasedistributed.GdbImporter
All Implemented Interfaces:
IGdbXmlImport, ISupportErrorInfo, java.io.Serializable

public class GdbImporter
extends java.lang.Object
implements IGdbXmlImport, ISupportErrorInfo

Geodatabase Importer Object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Remarks

Use the GdbImporter coclass when you wish to import schema and data or schema from a resulting XML document to an PGDB or ArcSDE geodatabase.  See the IGdbXMLImport methods for more on getting information about importing resulting XML document to geodatabase.

See Also:
GdbExporter, Serialized Form

Constructor Summary
GdbImporter()
          Constructs a GdbImporter using ArcGIS Engine.
GdbImporter(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
 
Method Summary
 void addIFeatureProgressListener(IFeatureProgress theListener)
           
 void addIOperationProgressListener(IOperationProgress theListener)
           
 boolean equals(java.lang.Object o)
          Compare this object with another
 boolean generateNameMapping(java.lang.String inFile, IWorkspace workspace, IEnumNameMapping[] enumNameMapping)
          Generate a list of objects to import.
 IGdbXmlImport getAsIGdbXmlImport()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 ISupportErrorInfo getAsISupportErrorInfo()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
static java.lang.String getClsid()
           
 IFields getRecordSetFields(java.lang.String inFile)
          Generate a fieldset to load from xml.
 int hashCode()
          the hashcode for this object
 void importRecordSet(java.lang.String inFile, IFields sourceFields, IFields targetMappedFields, ITable pTable)
          Loading data from xml recordset.
 void importWorkspace(java.lang.String inFile, IEnumNameMapping enumNameMapping, IWorkspace pWorkspace, boolean schemaOnly)
          Imports a workspace from XML.
 void interfaceSupportsErrorInfo(GUID riid)
          Supported Platforms
 void removeIFeatureProgressListener(IFeatureProgress theListener)
           
 void removeIOperationProgressListener(IOperationProgress theListener)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GdbImporter

public GdbImporter()
            throws java.io.IOException,
                   java.net.UnknownHostException
Constructs a GdbImporter using ArcGIS Engine.

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

GdbImporter

public GdbImporter(java.lang.Object obj)
            throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.

Construct a GdbImporter using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to GdbImporter.
GdbImporter theGdbImporter = (GdbImporter) obj;

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

getClsid

public static java.lang.String getClsid()

getAsIGdbXmlImport

public IGdbXmlImport getAsIGdbXmlImport()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsISupportErrorInfo

public ISupportErrorInfo getAsISupportErrorInfo()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


equals

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


hashCode

public int hashCode()
the hashcode for this object


addIFeatureProgressListener

public void addIFeatureProgressListener(IFeatureProgress theListener)
                                 throws java.io.IOException
Throws:
java.io.IOException

removeIFeatureProgressListener

public void removeIFeatureProgressListener(IFeatureProgress theListener)
                                    throws java.io.IOException
Throws:
java.io.IOException

addIOperationProgressListener

public void addIOperationProgressListener(IOperationProgress theListener)
                                   throws java.io.IOException
Throws:
java.io.IOException

removeIOperationProgressListener

public void removeIOperationProgressListener(IOperationProgress theListener)
                                      throws java.io.IOException
Throws:
java.io.IOException

generateNameMapping

public boolean generateNameMapping(java.lang.String inFile,
                                   IWorkspace workspace,
                                   IEnumNameMapping[] enumNameMapping)
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: IGdbXmlImport
Generate a list of objects to import.

Supported Platforms

Windows, Solaris, Linux

Remarks

The GenerateNameMapping method generates a name mapping enumeration where you pass in inFile, IWorkspace, and IEnumNameMapping.

Specified by:
generateNameMapping in interface IGdbXmlImport
Parameters:
inFile - The inFile (in)
workspace - A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
enumNameMapping - A reference to a com.esri.arcgis.geodatabase.IEnumNameMapping (out: use single element array)
Returns:
The hasConflict
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IGdbXmlImport

importWorkspace

public void importWorkspace(java.lang.String inFile,
                            IEnumNameMapping enumNameMapping,
                            IWorkspace pWorkspace,
                            boolean schemaOnly)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IGdbXmlImport
Imports a workspace from XML.

Supported Platforms

Windows, Solaris, Linux

Remarks

The ImportWorkspace method imports a geodatabase workspace schema and data.

In order to import a workspace, you need to pass in IEnumNameMapping and IWorkspace.  The inFile is a string that identifies the input XML file, where you must specify the file extension.  For example, if the inFile is an XML file then the outFile should be "foo.xml".  Otherwise, the inFile is a .ZIP or .Z file.

If you set schemaOnly to TRUE, the imported workspace will contain the schema and no data.  Otherwise, the workspace being imported will contain schema and data.

Specified by:
importWorkspace in interface IGdbXmlImport
Parameters:
inFile - The inFile (in)
enumNameMapping - A reference to a com.esri.arcgis.geodatabase.IEnumNameMapping (in)
pWorkspace - A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
schemaOnly - The schemaOnly (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
See Also:
IGdbXmlImport

importRecordSet

public void importRecordSet(java.lang.String inFile,
                            IFields sourceFields,
                            IFields targetMappedFields,
                            ITable pTable)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IGdbXmlImport
Loading data from xml recordset.

Supported Platforms

Windows, Solaris, Linux

Remarks

The ImportRecordSet method imports a geodatabase recordset.

In order to import a recordset, you need to pass in IFields and ITable.  The inFile is a string that identifies the input XML file, where you must specify the file extension.  For example, if the inFile is an XML file then the outFile should be "foo.xml".  Otherwise, the inFile is a .ZIP or .Z file.

Specified by:
importRecordSet in interface IGdbXmlImport
Parameters:
inFile - The inFile (in)
sourceFields - A reference to a com.esri.arcgis.geodatabase.IFields (in)
targetMappedFields - A reference to a com.esri.arcgis.geodatabase.IFields (in)
pTable - A reference to a com.esri.arcgis.geodatabase.ITable (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
See Also:
IGdbXmlImport

getRecordSetFields

public IFields getRecordSetFields(java.lang.String inFile)
                           throws java.io.IOException,
                                  AutomationException
Description copied from interface: IGdbXmlImport
Generate a fieldset to load from xml.

Supported Platforms

Windows, Solaris, Linux

Remarks

The GetRecordSetFields method retrieves recordset fields and records from resulting XML file.  You need to pass in inFile as a string that identifies the input XML file.

Specified by:
getRecordSetFields in interface IGdbXmlImport
Parameters:
inFile - The inFile (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFields
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IGdbXmlImport

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws java.io.IOException,
                                       AutomationException
Description copied from interface: ISupportErrorInfo

Supported Platforms

Windows, Solaris, Linux

Description

Indicates whether the interface supports IErrorInfo.

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.