com.esri.arcgis.geoprocessing
Class GPEnvironment

java.lang.Object
  extended by com.esri.arcgis.geoprocessing.GPEnvironment
All Implemented Interfaces:
IGPEnvironment, com.esri.arcgis.interop.RemoteObjRef, IClone, IPersist, IPersistStream, IXMLSerialize, Externalizable, Serializable

public class GPEnvironment
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IClone, IGPEnvironment, IPersistStream, IXMLSerialize, Externalizable

Geoprocessing Environment object.

Product Availability

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

Supported Platforms

Windows

See Also:
Serialized Form

Constructor Summary
GPEnvironment()
          Constructs a GPEnvironment using ArcGIS Engine.
GPEnvironment(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GPEnvironment theGPEnvironment = (GPEnvironment) obj;
 
Method Summary
 void addDependency(String name)
          Adds the name of an environment that the geoprocessing environment is dependent on.
 void assign(IClone src)
          Assigns the properties of src to the receiver.
 void deserialize(IXMLSerializeData data)
          Deserializes an object from XML.
 boolean equals(Object o)
          Compare this object with another
 IClone esri_clone()
          Clones the receiver and assigns the result to *clone.
 String getCategory()
          Category of the geoprocessing environment.
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 IUID getControlCLSID()
          Class identifier (CLSID) of the ActiveX control to use to edit the geoprocessing environment.
 IGPDataType getDataType()
          Data type of acceptable values of the geoprocessing environment.
 IEnumBSTR getDependencies()
          Enumeration of environment names the geoprocessing environment is dependent on.
 String getDisplayName()
          Display name of the geoprocessing environment.
 int getDisplayOrder()
          Display order of the geoprocessing environment.
 IGPDomain getDomain()
          Domain of the geoprocessing environment.
 String getMetadataFile()
          Name of the (XML) file containing the default metadata for this environment object.
 String getName()
          Name of the geoprocessing environment.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 IGPValue getValue()
          Value of the geoprocessing environment.
 int hashCode()
          the hashcode for this object
 void isDirty()
          isDirty
 boolean isEqual(IClone other)
          Indicates if the receiver and other have the same properties.
 boolean isIdentical(IClone other)
          Indicates if the receiver and other are the same object.
 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.
 void setCategory(String category)
          Category of the geoprocessing environment.
 void setControlCLSID(IUID cLSID)
          Class identifier (CLSID) of the ActiveX control to use to edit the geoprocessing environment.
 void setDataTypeByRef(IGPDataType dataType)
          Data type of acceptable values of the geoprocessing environment.
 void setDependencies(IEnumBSTR dependencies)
          Enumeration of environment names the geoprocessing environment is dependent on.
 void setDisplayName(String name)
          Display name of the geoprocessing environment.
 void setDisplayOrder(int displayOrder)
          Display order of the geoprocessing environment.
 void setDomainByRef(IGPDomain domain)
          Domain of the geoprocessing environment.
 void setMetadataFile(String file)
          Name of the (XML) file containing the default metadata for this environment object.
 void setName(String name)
          Name of the geoprocessing environment.
 void setValueByRef(IGPValue value)
          Value of the geoprocessing environment.
 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

GPEnvironment

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

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

GPEnvironment

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

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

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

esri_clone

public IClone esri_clone()
                  throws IOException,
                         AutomationException
Clones the receiver and assigns the result to *clone.

Product Availability

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

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

assign

public void assign(IClone src)
            throws IOException,
                   AutomationException
Assigns the properties of src to the receiver.

Description

Use Assign method to assign the properties of source object to receiver object. Both objects need to have the same CLSIDs. Both source and receiver objects need to be instantiated.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isEqual

public boolean isEqual(IClone other)
                throws IOException,
                       AutomationException
Indicates if the receiver and other have the same properties.

Description

IsEqual returns True if the receiver and the source have the same properties. Note, this does not imply that the receiver and the source reference the same object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isEqual in interface IClone
Parameters:
other - A reference to a com.esri.arcgis.system.IClone (in)
Returns:
The equal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isIdentical

public boolean isIdentical(IClone other)
                    throws IOException,
                           AutomationException
Indicates if the receiver and other are the same object.

Description

IsIdentical returns true if the receiver and the source reference the same object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isIdentical in interface IClone
Parameters:
other - A reference to a com.esri.arcgis.system.IClone (in)
Returns:
The identical
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

public String getName()
               throws IOException,
                      AutomationException
Name of the geoprocessing environment.

Remarks

The Name property sets the name of an environment setting. This name appears when using the environment at the command line or in scripting. It must be unique and must not contain any spaces.

Product Availability

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

Supported Platforms

Windows

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

setName

public void setName(String name)
             throws IOException,
                    AutomationException
Name of the geoprocessing environment.

Product Availability

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

Supported Platforms

Windows

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

getDisplayName

public String getDisplayName()
                      throws IOException,
                             AutomationException
Display name of the geoprocessing environment.

Remarks

The DisplayName property sets the user-friendly name of an environment setting. It is displayed in the graphic user interface of the Environment Settings dialog. The DisplayName can be internationalized.

Product Availability

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

Supported Platforms

Windows

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

setDisplayName

public void setDisplayName(String name)
                    throws IOException,
                           AutomationException
Display name of the geoprocessing environment.

Product Availability

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

Supported Platforms

Windows

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

getCategory

public String getCategory()
                   throws IOException,
                          AutomationException
Category of the geoprocessing environment.

Remarks

Currently the GPEnvironment object has 5 defined categories. Use the Category property to access one of those categories.

Product Availability

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

Supported Platforms

Windows

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

setCategory

public void setCategory(String category)
                 throws IOException,
                        AutomationException
Category of the geoprocessing environment.

Product Availability

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

Supported Platforms

Windows

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

getValue

public IGPValue getValue()
                  throws IOException,
                         AutomationException
Value of the geoprocessing environment.

Remarks

The Value property returns the value of this environment setting such as the path string for the Current Workspace.

Product Availability

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

Supported Platforms

Windows

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

setValueByRef

public void setValueByRef(IGPValue value)
                   throws IOException,
                          AutomationException
Value of the geoprocessing environment.

Product Availability

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

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

getDomain

public IGPDomain getDomain()
                    throws IOException,
                           AutomationException
Domain of the geoprocessing environment.

Remarks

The Domain property returns the domain of Value objects associated with the environment. It is used during validation to ensure only acceptable values are used.

Product Availability

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

Supported Platforms

Windows

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

setDomainByRef

public void setDomainByRef(IGPDomain domain)
                    throws IOException,
                           AutomationException
Domain of the geoprocessing environment.

Product Availability

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

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

getDataType

public IGPDataType getDataType()
                        throws IOException,
                               AutomationException
Data type of acceptable values of the geoprocessing environment.

Remarks

The DataType property is used to access the DataType object associated with this Environment object.

Product Availability

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

Supported Platforms

Windows

Specified by:
getDataType in interface IGPEnvironment
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.

setDataTypeByRef

public void setDataTypeByRef(IGPDataType dataType)
                      throws IOException,
                             AutomationException
Data type of acceptable values of the geoprocessing environment.

Product Availability

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

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

getDisplayOrder

public int getDisplayOrder()
                    throws IOException,
                           AutomationException
Display order of the geoprocessing environment.

Product Availability

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

Supported Platforms

Windows

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

setDisplayOrder

public void setDisplayOrder(int displayOrder)
                     throws IOException,
                            AutomationException
Display order of the geoprocessing environment.

Product Availability

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

Supported Platforms

Windows

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

getControlCLSID

public IUID getControlCLSID()
                     throws IOException,
                            AutomationException
Class identifier (CLSID) of the ActiveX control to use to edit the geoprocessing environment.

Product Availability

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

Supported Platforms

Windows

Specified by:
getControlCLSID in interface IGPEnvironment
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.

setControlCLSID

public void setControlCLSID(IUID cLSID)
                     throws IOException,
                            AutomationException
Class identifier (CLSID) of the ActiveX control to use to edit the geoprocessing environment.

Product Availability

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

Supported Platforms

Windows

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

getDependencies

public IEnumBSTR getDependencies()
                          throws IOException,
                                 AutomationException
Enumeration of environment names the geoprocessing environment is dependent on.

Description

The Dependencies property returns a list, or enumeration [IEnumBSTR], of environment names the environment is dependent on. Dependency examples are

Product Availability

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

Supported Platforms

Windows

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

setDependencies

public void setDependencies(IEnumBSTR dependencies)
                     throws IOException,
                            AutomationException
Enumeration of environment names the geoprocessing environment is dependent on.

Product Availability

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

Supported Platforms

Windows

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

addDependency

public void addDependency(String name)
                   throws IOException,
                          AutomationException
Adds the name of an environment that the geoprocessing environment is dependent on.

Product Availability

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

Supported Platforms

Windows

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

getMetadataFile

public String getMetadataFile()
                       throws IOException,
                              AutomationException
Name of the (XML) file containing the default metadata for this environment object.

Remarks

The MetadataFile property stores the name of a .xml file with the default metadata for an environment setting. The .xml file supplies parameter descriptions in the help panel of the Environment Settings dialog.

Product Availability

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

Supported Platforms

Windows

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

setMetadataFile

public void setMetadataFile(String file)
                     throws IOException,
                            AutomationException
Name of the (XML) file containing the default metadata for this environment object.

Product Availability

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

Supported Platforms

Windows

Specified by:
setMetadataFile in interface IGPEnvironment
Parameters:
file - The file (in)
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.

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.

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.

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