com.esri.arcgis.geodatabase
Interface ICodedValueDomain

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
CodedValueDomain, ICodedValueDomainProxy

public interface ICodedValueDomain
extends java.io.Serializable

Provides access to members that return and modify coded value domain values.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Description

ICodedValueDomain interface maintains information about specific coded value domains that belong to the workspace domains. It provides functionality for adding and deleting codes from this domain and properties for retrieving information about this coded value domain.

When To Use

ICodedValueDomain is the interface on a CodedValueDomain object used to get and set the properties of a coded value domain object. For example, use the ICodedValueDomain interface when creating a new CodedValueDomain to add and remove valid coded values, and get a count of the number of valid values.



Method Summary
 void addCode(java.lang.Object value, java.lang.String name)
          Adds a (value, name) code.
 void deleteCode(java.lang.Object value)
          Deletes a code with the specified value.
 int getCodeCount()
          The number of codes for the associated attribute.
 java.lang.String getName(int index)
          The code name for the specified code index.
 java.lang.Object getValue(int index)
          The value for the specified code index.
 

Method Detail

getCodeCount

public int getCodeCount()
                 throws java.io.IOException,
                        AutomationException
The number of codes for the associated attribute.

Supported Platforms

Windows, Solaris, Linux

Description

CodeCount property returns the count of the number of codes belonging to this coded value domain as a long type.

Remarks

This property returns the number of valid coded values for the coded value domain. The return value is a Long.

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

getName

public java.lang.String getName(int index)
                         throws java.io.IOException,
                                AutomationException
The code name for the specified code index.

Supported Platforms

Windows, Solaris, Linux

Description

Name returns the name associated with a given coded value belonging to this domain by the index parameter passed in. The return value is a string type.

Remarks

This property returns the name of valid coded value for the ith coded value in the coded value domain, where i is the index of the coded value as a Long . The name is returned as a String .

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

getValue

public java.lang.Object getValue(int index)
                          throws java.io.IOException,
                                 AutomationException
The value for the specified code index.

Supported Platforms

Windows, Solaris, Linux

Remarks

This property returns the coded value for the specified position in the coded value domain.

The Object type returned depends on the field type which can be determined by calling IDomain::FieldType.

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

addCode

public void addCode(java.lang.Object value,
                    java.lang.String name)
             throws java.io.IOException,
                    AutomationException
Adds a (value, name) code.

Supported Platforms

Windows, Solaris, Linux

Description

AddCode function adds the code to the other codes belonging to this domain by the value and name parameters passed in.

Remarks

The AddCode function adds a new coded value to the coded value domain. AddCode requires a value for the coded value as a Variant, and the name of the coded value, which is a user friendly description for that coded value, as a String.

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

deleteCode

public void deleteCode(java.lang.Object value)
                throws java.io.IOException,
                       AutomationException
Deletes a code with the specified value.

Supported Platforms

Windows, Solaris, Linux

Description

DeleteCode function removes the coded value from this domain by the value parameter passed in.

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