com.esri.arcgis.geodatabase
Interface IDomain

All Superinterfaces:
Serializable
All Known Implementing Classes:
CodedValueDomain, RangeDomain

public interface IDomain
extends Serializable

Provides access to members that return and modify domains and their merge and split policies.

Description

IDomain interface maintains information about a specific domain in the specified workspace CoClass. It provides functionality for determining whether a value is a member of this domain and properties for setting attributes about this domain. When creating and assigning a Domain to a particular field, the client is required to set the Name and FieldType properties.

When To Use

The IDomain interface is the interface used for creating new and modifying existing attribute domains in a geodatabase. With IDomain , you can create new domains, specify what field type they apply to, create a description, and assign a split and merge policy.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux


Method Summary
 String getDescription()
          The description of the domain.
 int getDomainID()
          The ID of the domain.
 int getFieldType()
          The field type of the field.
 int getMergePolicy()
          The merge policy.
 String getName()
          The name of the domain.
 String getOwner()
          The owner of the domain.
 int getSplitPolicy()
          The split policy.
 int getType()
          The domain type.
 boolean memberOf(Object value)
          Indicates whether the value is a valid member of the domain.
 void setDescription(String description)
          The description of the domain.
 void setDomainID(int iD)
          The ID of the domain.
 void setFieldType(int fieldType)
          The field type of the field.
 void setMergePolicy(int policy)
          The merge policy.
 void setName(String name)
          The name of the domain.
 void setOwner(String owner)
          The owner of the domain.
 void setSplitPolicy(int policy)
          The split policy.
 

Method Detail

getDomainID

int getDomainID()
                throws IOException,
                       AutomationException
The ID of the domain.

Description

DomainID property returns the ID for the specified domain.

Remarks

This property returns the internal ID of the domain as a Long .

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The iD
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDomainID

void setDomainID(int iD)
                 throws IOException,
                        AutomationException
The ID of the domain.

Description

DomainID property sets the ID for the current domain.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
iD - The iD (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDescription

String getDescription()
                      throws IOException,
                             AutomationException
The description of the domain.

Description

Description property returns the description for the specified domain.

Remarks

This property returns the description for the domain object. Descriptions are strings that can be up to 32 characters long.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The description
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDescription

void setDescription(String description)
                    throws IOException,
                           AutomationException
The description of the domain.

Description

Description property sets the description for the specified domain.

Remarks

This property sets the description for the domain object. The description is a string that can be up to 32 characters long.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
description - The description (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFieldType

int getFieldType()
                 throws IOException,
                        AutomationException
The field type of the field.

Description

FieldType returns the esriFieldType that the specified domain applies to.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.geodatabase.esriFieldType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFieldType

void setFieldType(int fieldType)
                  throws IOException,
                         AutomationException
The field type of the field.

Description

FieldType sets the esriFieldType that the specified domain applies to.

Remarks

This property sets the type of field that the domain applies to, and therefore what fields for a subtype that you can associate the domain to. The field type is an esriFieldType enumeration.



Example:

//Create a new range domain

IRangeDomain pCode = new RangeDomain();

pCode.setMinValue ( "9#");

pCode.setMaxValue ("600000#");

IDomain pDomain = pCode;

pDomain.setName("Area constraint");

pDomain.setFieldType(esriFieldType.esriFieldTypeDouble);

pDomain.setDescription ( "Constrains the area of buildings");

pDomain.setMergePolicy (esriMergePolicyType.esriMPTAreaWeighted);

pDomain.setSplitPolicy (esriSplitPolicyType.esriSPTGeometryRatio);

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
fieldType - A com.esri.arcgis.geodatabase.esriFieldType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMergePolicy

int getMergePolicy()
                   throws IOException,
                          AutomationException
The merge policy.

Description

MergePolicy returns the merge policy for the specified domain.

Remarks

This property sets or returns the merge policy for the domain object. The merge policy describes what happens to the values of the field that the domain is applied to when two objects are merged into a single object. The merge policy is an esriMergePolicyType enumeration.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.geodatabase.esriMergePolicyType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMergePolicy

void setMergePolicy(int policy)
                    throws IOException,
                           AutomationException
The merge policy.

Description

MergePolicy sets the merge policy for the specified domain.

Remarks

This property sets the merge policy for the domain object. The merge policy describes what happens to the values of the field that the domain is applied to when two objects are merged into a single object.





Example:

//Create a new range domain
IRangeDomain pCode = new RangeDomain();
pCode.setMinValue ( "9#");
pCode.setMaxValue ("600000#");

IDomain pDomain = pCode;
pDomain.setName("Area constraint");
pDomain.setFieldType(esriFieldType.esriFieldTypeDouble);
pDomain.setDescription ( "Constrains the area of buildings");
pDomain.setMergePolicy (esriMergePolicyType.esriMPTAreaWeighted);
pDomain.setSplitPolicy (esriSplitPolicyType.esriSPTGeometryRatio);

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
policy - A com.esri.arcgis.geodatabase.esriMergePolicyType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSplitPolicy

int getSplitPolicy()
                   throws IOException,
                          AutomationException
The split policy.

Description

SplitPolicy returns the split policy set for the specified domain.

Remarks

This property returns the split policy for the domain object. The split policy describes what happens to the values of the field that the domain is applied to when an object is split into two objects. The split policy is an esriSplitPolicyType enumeration.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.geodatabase.esriSplitPolicyType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSplitPolicy

void setSplitPolicy(int policy)
                    throws IOException,
                           AutomationException
The split policy.

Description

SplitPolicy sets the split policy set for the specified domain.

Remarks

This property sets the split policy for the domain object. The split policy describes what happens to the values of the field that the domain is applied to when an object is split into two objects. The split policy is an esriSplitPolicyType enumeration.



Example:

//Create a new range domain
IRangeDomain pCode = new RangeDomain();
pCode.setMinValue ( "9#");
pCode.setMaxValue ("600000#");

IDomain pDomain = pCode;
pDomain.setName("Area constraint");
pDomain.setFieldType(esriFieldType.esriFieldTypeDouble);
pDomain.setDescription ( "Constrains the area of buildings");
pDomain.setMergePolicy (esriMergePolicyType.esriMPTAreaWeighted);
pDomain.setSplitPolicy (esriSplitPolicyType.esriSPTGeometryRatio);

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
policy - A com.esri.arcgis.geodatabase.esriSplitPolicyType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

String getName()
               throws IOException,
                      AutomationException
The name of the domain.

Description

Name property returns the name of the specified domain.

Remarks

This property returns the name of the domain object. The domain name is a String the length of which is dependent on the underlying DBMS.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setName

void setName(String name)
             throws IOException,
                    AutomationException
The name of the domain.

Description

Name property sets the name of the specified domain.

Remarks

This property sets the name of the domain object. The domain name is a String the length of which is dependent on the underlying DBMS.



Example:

//Create a new range domain
IRangeDomain pCode = new RangeDomain();
pCode.setMinValue ( "9#");
pCode.setMaxValue ("600000#");

IDomain pDomain = pCode;
pDomain.setName("Area constraint");
pDomain.setFieldType(esriFieldType.esriFieldTypeDouble);
pDomain.setDescription ( "Constrains the area of buildings");
pDomain.setMergePolicy (esriMergePolicyType.esriMPTAreaWeighted);
pDomain.setSplitPolicy (esriSplitPolicyType.esriSPTGeometryRatio);

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getOwner

String getOwner()
                throws IOException,
                       AutomationException
The owner of the domain.

Description

Owner returns the owner of the specified domain.

Remarks

This property returns the owner of the domain as a String . The owner is the DBMS user who created the domain. The domain owner is the only user who can succesfully delete a domain from the database.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The owner
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setOwner

void setOwner(String owner)
              throws IOException,
                     AutomationException
The owner of the domain.

Description

Owner property sets the owner for the specified domain.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
owner - The owner (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getType

int getType()
            throws IOException,
                   AutomationException
The domain type.

Description

Type property returns the esriDomainType of the specified domain.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.geodatabase.esriDomainType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

memberOf

boolean memberOf(Object value)
                 throws IOException,
                        AutomationException
Indicates whether the value is a valid member of the domain.

Description

MemberOf function returns a boolean TRUE if the specified value is a member of this domain or FALSE if it is not.

Remarks

The MemberOf method will tell you if some value is a valid member of an attribute domain. Use this function to determine if some value is valid based on a domain. MemberOf returns a Boolean . If the value is not in the domain, it returns False . If the value is in the domain, it returns True .


Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
value - A Variant (in)
Returns:
The isMember
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.