com.esri.arcgis.geodatabase
Class GPReplicaDescription

java.lang.Object
  extended by com.esri.arcgis.geodatabase.GPReplicaDescription
All Implemented Interfaces:
IGPReplicaDescription, IGPValue, com.esri.arcgis.interop.RemoteObjRef, IPersist, IPersistStream, IXMLSerialize, IXMLVersionSupport, Externalizable, Serializable

public class GPReplicaDescription
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IGPReplicaDescription, IGPValue, IXMLSerialize, IPersist, IPersistStream, IXMLVersionSupport, Externalizable

Defines the data to replicate or extract.

Remarks

The GPReplicaDescription coclass is used during replica creation and data extraction to describe the data and schema to include. See the CreateReplica methods on the IGeoDataServer and IReplicationAgent interfaces,

It can also be accessed from existing replicas to determine the schema associated with a replica and the filters used. See the IGPReplica interface for more information.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
GPReplicaDescription()
          Constructs a GPReplicaDescription using ArcGIS Engine.
GPReplicaDescription(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GPReplicaDescription theGPReplicaDescription = (GPReplicaDescription) obj;
 
Method Summary
 void deserialize(IXMLSerializeData data)
          Deserializes an object from XML.
 void empty()
          Clears the value object.
 boolean equals(Object o)
          Compare this object with another
 String getAsText()
          Provides the value of the value object.
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 String getMinNamespaceSupported()
          The minimum namespace the class can serialize to (eg the 90 namespace).
 int getModelType()
          The replica model type.
 IGeometry getQueryGeometry()
          The shape that determines which features are replicated.
 IGPReplicaDatasets getReplicaDatasets()
          The datasets in the replica.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 int getSpatialRelation()
          Defines how the shape returned by the QueryGeometry property is applied during replication and synchronization.
 int hashCode()
          the hashcode for this object
 IGPDataType IGPValue_getDataType()
          The data type of the value object.
 void init(IReplica replica)
          Initializes the object from an existing replica.
 void isDirty()
          isDirty
 boolean isEmpty()
          Indicates if the value object is empty.
 boolean isSingleGeneration()
          Indicates if the replica is a check-out.
 boolean isTransferRelatedObjects()
          Indicates if related objects are replicated.
 void load(IStream pstm)
          load
 void readExternal(ObjectInput in)
           
 void save(IStream pstm, int fClearDirty)
          save
 void serialize(IXMLSerializeData data)
          Serializes an object to XML.
 IGPMessage setAsText(String text)
          Provides the value of the value object with the given string value.
 void setModelType(int modelType)
          The replica model type.
 void setQueryGeometryByRef(IGeometry queryGeometry)
          The shape that determines which features are replicated.
 void setReplicaDatasetsByRef(IGPReplicaDatasets replicaDatasets)
          The datasets in the replica.
 void setSingleGeneration(boolean singleGeneration)
          Indicates if the replica is a check-out.
 void setSpatialRelation(int spatialRelation)
          Defines how the shape returned by the QueryGeometry property is applied during replication and synchronization.
 void setTransferRelatedObjects(boolean transferRelObjects)
          Indicates if related objects are replicated.
 void writeExternal(ObjectOutput out)
           
 
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

GPReplicaDescription

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

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

GPReplicaDescription

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

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

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

init

public void init(IReplica replica)
          throws IOException,
                 AutomationException
Initializes the object from an existing replica.

Remarks

Initialzes a GPReplicaDescription object from an existing Replica in the geodatabase. The object describes the data that has been replicated.

Product Availability

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

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

setModelType

public void setModelType(int modelType)
                  throws IOException,
                         AutomationException
The replica model type.

Remarks

The ModelType defines whether to output the data as simple datasets (esriModelTypeSimple) or as they are defined in the parent replica geodatabase (esriModelTypeFullGeodatabase).

By default this property is set to esriModelTypeFullGeodatabase.

See the esriReplicaModelType enumeration for more information.

Product Availability

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

Specified by:
setModelType in interface IGPReplicaDescription
Parameters:
modelType - A com.esri.arcgis.geodatabase.esriReplicaModelType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getModelType

public int getModelType()
                 throws IOException,
                        AutomationException
The replica model type.

Remarks

This property returns the ModelType for existng replicas and allows you to set the type when creating a replica. Only one way replicas can have a type of either esriModelTypeSimple or esriModelTypeFullGeodatabase. Two way and check-out replicas always have a esriModelTypeFullGeodatabase model type.

The ModelType defines whether to output the data as simple datasets (esriModelTypeSimple) or as they are defined in the parent replica geodatabase (esriModelTypeFullGeodatabase). For example, when creating a replica from data with complex types such as a topologies or a geometric networks, a full model type includes the topolgies and geometric networks while the simple model does not.

By default this property is set to esriModelTypeFullGeodatabase.

Product Availability

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

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

setSingleGeneration

public void setSingleGeneration(boolean singleGeneration)
                         throws IOException,
                                AutomationException
Indicates if the replica is a check-out.

Remarks

Determines whether replica created will be a check-out replica (single generation) or a multi-generation replica (includes two way and one way replicas).

To create a check-out replica set this property to TRUE. By default this is set to TRUE.

When creating a two way or one way replica set this to FALSE. Use the IGPReplicaOptions::AccessType property to specify to create either a two way or one way replica. See the GPReplicaOptions coclass for more information.

Product Availability

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

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

isSingleGeneration

public boolean isSingleGeneration()
                           throws IOException,
                                  AutomationException
Indicates if the replica is a check-out.

Remarks

Returns TRUE if the replica is a check-out replica (single generation replica). Returns FALSE if replica is either a two way or one way replica.

Product Availability

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

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

setSpatialRelation

public void setSpatialRelation(int spatialRelation)
                        throws IOException,
                               AutomationException
Defines how the shape returned by the QueryGeometry property is applied during replication and synchronization.

Remarks

This property defines how the shape returned by the Geometry property is applied during replication. For example, if the geometry is a polygon and the SpatialRelation is esriSpatialRelIntersects, any features that intersect the polygon are replicated.

By default this property is set to esriSpatialRelIntersects. See the esriSpatialRelEnum enumeration for more information.

Product Availability

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

Specified by:
setSpatialRelation in interface IGPReplicaDescription
Parameters:
spatialRelation - A com.esri.arcgis.geodatabase.esriSpatialRelEnum constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSpatialRelation

public int getSpatialRelation()
                       throws IOException,
                              AutomationException
Defines how the shape returned by the QueryGeometry property is applied during replication and synchronization.

Remarks

This property defines how the shape returned by the Geometry property is applied during replication. For example, if the geometry is a polygon and the SpatialRelation is esriSpatialRelIntersects, any features that intersect the polygon are replicated.

By default this property is set to esriSpatialRelIntersects. See the esriSpatialRelEnum enumeration for more information.

Product Availability

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

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

setQueryGeometryByRef

public void setQueryGeometryByRef(IGeometry queryGeometry)
                           throws IOException,
                                  AutomationException
The shape that determines which features are replicated.

Remarks

Set this property if you want to add an association with the specified shape to determine the features to replicate. The association is defined by the SpatialRelation property. For example, if the Geometry is a polygon and the SpatialRelation is esriSpatialRelIntersects, any features that intersect the polygon are replicated.

The SpatialReference of the geometry is significant. Data from the replica feature classes gets projected into this spatial reference when the geometry association is applied. If the spatial reference of the geometry is not set, the features you expect to get replicated may not be included.

By default, the geometry is applied to all datasets in the replica description during replication.

Product Availability

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

Specified by:
setQueryGeometryByRef in interface IGPReplicaDescription
Parameters:
queryGeometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getQueryGeometry

public IGeometry getQueryGeometry()
                           throws IOException,
                                  AutomationException
The shape that determines which features are replicated.

Remarks

This property returns the shape that is used to determine which features are to be replicated. The SpatialRelation property returns how this shape is applied as a filter. For example, if the Geometry is a polygon and the SpatialRelation is esriSpatialRelIntersects, any features that intersect the polygon are replicated.

If a geometry is not used for the replica, nothing is returned.

By default, the geometry is applied to all datasets in the replica description during replication.

Product Availability

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

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

setReplicaDatasetsByRef

public void setReplicaDatasetsByRef(IGPReplicaDatasets replicaDatasets)
                             throws IOException,
                                    AutomationException
The datasets in the replica.

Product Availability

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

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

getReplicaDatasets

public IGPReplicaDatasets getReplicaDatasets()
                                      throws IOException,
                                             AutomationException
The datasets in the replica.

Product Availability

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

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

setTransferRelatedObjects

public void setTransferRelatedObjects(boolean transferRelObjects)
                               throws IOException,
                                      AutomationException
Indicates if related objects are replicated.

Remarks

TransferRelatedObjects determines whether related objects will be replicated.

If this is set to TRUE related objects will be replicated. TransferRelatedObjects is set to TRUE by default. If you don't want to replicate related objects set this property to FALSE.

Product Availability

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

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

isTransferRelatedObjects

public boolean isTransferRelatedObjects()
                                 throws IOException,
                                        AutomationException
Indicates if related objects are replicated.

Remarks

TransferRelatedObjects determines whether related objects will be replicated.

If this is set to TRUE related objects will be replicated. TransferRelatedObjects is set to TRUE by default.

Product Availability

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

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

IGPValue_getDataType

public IGPDataType IGPValue_getDataType()
                                 throws IOException,
                                        AutomationException
The data type of the value object.

Product Availability

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

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

isEmpty

public boolean isEmpty()
                throws IOException,
                       AutomationException
Indicates if the value object is empty.

Remarks

The IsEmpty method returns if this Value object has been set or not.

Product Availability

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

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

empty

public void empty()
           throws IOException,
                  AutomationException
Clears the value object.

Remarks

The Empty method clears this Value object and releases any associated objects.

Product Availability

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

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

getAsText

public String getAsText()
                 throws IOException,
                        AutomationException
Provides the value of the value object.

Remarks

The GetAsText method returns this Value object as a text string. For DataElement value objects it is the NameString. For simple value objects it is the text string for the scalar value.

Product Availability

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

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

setAsText

public IGPMessage setAsText(String text)
                     throws IOException,
                            AutomationException
Provides the value of the value object with the given string value.

Remarks

The SetAsText method sets the value of this Value object as a text string. For DataElement value objects it is the NameString. For simple value objects it is the text string representing the scalar value.

Product Availability

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

Specified by:
setAsText in interface IGPValue
Parameters:
text - The text (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IGPMessage
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.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

save

public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
getSizeMax

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMinNamespaceSupported

public String getMinNamespaceSupported()
                                throws IOException,
                                       AutomationException
The minimum namespace the class can serialize to (eg the 90 namespace).

Product Availability

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

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

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException