com.esri.arcgis.geodatabase
Interface IAttributeRule

All Superinterfaces:
IRule, java.io.Serializable
All Known Implementing Classes:
AttributeRule, IAttributeRuleProxy

public interface IAttributeRule
extends IRule, java.io.Serializable

Provides access to members that return, modify and validate attribute rules.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Description

IAttributeRule interface is used to maintain information about attribute rules. Validation of attribute rules is a function of this interface. Setting/retrieving the domain name, fieldname, subtypecode of a particular attribute rule are members of this interface.

When To Use

IAttributeRule is the interface on a AttributeRule object used to get and set the properties of an Attribute Rule. For example, use the IAttributeRule interface when creating a new attribute rule and setting its domain name, field name, and subtype code that it will apply to. You can also use the Validate function of the attribute rule object to validate a particular row against this attribute rule. The validate function returns a boolean value of TRUE if it is valid and FALSE if it was not.

Remarks

IAttributeRule is for setting rules based on attributes for object classes. They describe the legal values for a field in an object class. For example, you might set an attribute rule that specifies wood poles can only be within a certain height range. You do this by establishing a range domain for pole heights and then using an attribute rule to apply this domain to a particular field in the pole object class, probably the height field.

 


Method Summary
 java.lang.String getDomainName()
          The domain name associated with the attribute rule.
 java.lang.String getFieldName()
          The field name associated with the attribute rule.
 int getSubtypeCode()
          The subtype code.
 void setDomainName(java.lang.String name)
          The domain name associated with the attribute rule.
 void setFieldName(java.lang.String name)
          The field name associated with the attribute rule.
 void setSubtypeCode(int value)
          The subtype code.
 boolean validate(IRow row, java.lang.String[] errorMessage)
          Validates the rule.
 
Methods inherited from interface com.esri.arcgis.geodatabase.IRule
getCategory, getHelpstring, getID, getType, setCategory, setHelpstring, setID
 

Method Detail

getDomainName

public java.lang.String getDomainName()
                               throws java.io.IOException,
                                      AutomationException
The domain name associated with the attribute rule.

Supported Platforms

Windows, Solaris, Linux

Description

DomainName property returns the DomainName of the given Attribute rule.

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

setDomainName

public void setDomainName(java.lang.String name)
                   throws java.io.IOException,
                          AutomationException
The domain name associated with the attribute rule.

Supported Platforms

Windows, Solaris, Linux

Description

DomainName property sets the domain name for the given attribute rule.

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

getFieldName

public java.lang.String getFieldName()
                              throws java.io.IOException,
                                     AutomationException
The field name associated with the attribute rule.

Supported Platforms

Windows, Solaris, Linux

Description

FieldName property returns the field name of the given attribute rule.

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

setFieldName

public void setFieldName(java.lang.String name)
                  throws java.io.IOException,
                         AutomationException
The field name associated with the attribute rule.

Supported Platforms

Windows, Solaris, Linux

Description

FieldName property sets the field name that this rule is to apply to.

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

getSubtypeCode

public int getSubtypeCode()
                   throws java.io.IOException,
                          AutomationException
The subtype code.

Supported Platforms

Windows, Solaris, Linux

Description

SubtypeCode property retrieves the subtypecode that this rule will apply to.

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

setSubtypeCode

public void setSubtypeCode(int value)
                    throws java.io.IOException,
                           AutomationException
The subtype code.

Supported Platforms

Windows, Solaris, Linux

Description

SubtypeCode sets the subtypecode that this rule will apply to.

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

validate

public boolean validate(IRow row,
                        java.lang.String[] errorMessage)
                 throws java.io.IOException,
                        AutomationException
Validates the rule.

Supported Platforms

Windows, Solaris, Linux

Description

Validate function validates a row against this attribute rule, placing an error message if any is generated in the error message string parameter. Returns a boolean TRUE if row is valid and FALSE if not.

Parameters:
row - A reference to a com.esri.arcgis.geodatabase.IRow (in)
errorMessage - The errorMessage (out: use single element array)
Returns:
The isValid
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.