com.esri.arcgis.geodatabase
Interface IRepresentationClass

All Superinterfaces:
Serializable
All Known Implementing Classes:
IRepresentationClassProxy, RepresentationClass

public interface IRepresentationClass
extends Serializable

Provides access to members that control the behavior and properties of a feature class representation.

Remarks

IRepresentationClass interface has properties and methods used to manage the ReresentationClass object.

A RepresentationClass is a feature class that has been enabled with representation capability. Creating a new feature class representation will result in addition of two new fields corresponding to the RuleID and Override fields. RuleID fIeld stores ID values of representation rules which are used to represent individual feature representations. Override field contains information about representation overrides. Default values for overrides are set to null. RuleIDFieldIndex and OverrideFieldIndex properties return field indices for RuleID and Override fields respectively.

FeatureClass property returns a reference to the feature class that the representation class belongs to. A representation class cannot exist on its own. Deleting a feature class will delete all representation classes associated with it. Drop Representation geoprocessing tool can be used to remove feature class representations.

RepresentationRules property can be used to access the collection of representation rules present for a representation class or to create a new representation rules object from scratch. A single representation class can have multiple representation rules.

GraphicAttributes property returns a reference to the graphic attributes present for the representation class namely, visibility. To make changes to this property use IGraphicAttributes interface. Changes made at representation class level are applied to all representations. Individual representation's visibility property can also be overriden using IRepresentation::Value property.

Use GetRepresentation method to get access to representations for individual features within the feature class with respect to a specific MapContext object listed in the esriDisplay library. A MapContext object is defined using Spatial Reference and Reference Scale information.

PrepareFilter method prepares a query filter by adding RuleID, Override and explicit override fields as the sub-fields.

ID property returns the unique identifier that identifies the representation class in a geodatabase.

Use IRepresentationWorkspaceExtension::OpenRepresentationClass method to open a specific representation class given its name within a workspace.

When To Use

Use IRepresentationClass to access a feature class representation to either view, copy, or make changes to RepresentationRules, GraphicAttributes and RequireShapeOverride properties.

Product Availability

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


Method Summary
 IFeatureClass getFeatureClass()
          Feature class associated with this representation class.
 IGraphicAttributes getGraphicAttributes()
          General attributes defined at the representation class level.
 int getID()
          ID of the representation class.
 int getOverrideFieldIndex()
          Field index of the override field.
 IRepresentation getRepresentation(IFeature feature, IMapContext mapContext)
          Returns the representation of a given feature.
 IRepresentationRules getRepresentationRules()
          RepresentationRules Property.
 int getRuleIDFieldIndex()
          Field index of the Rule ID field.
 boolean isRequireShapeOverride()
          Indicates if a shape override is required for feature representations.
 void prepareFilter(IQueryFilter filter)
          Adds the fields used by overrides to the query filter.
 void setGraphicAttributesByRef(IGraphicAttributes attributes)
          General attributes defined at the representation class level.
 void setRepresentationRulesByRef(IRepresentationRules repRules)
          RepresentationRules Property.
 void setRequireShapeOverride(boolean requireShapeOverride)
          Indicates if a shape override is required for feature representations.
 

Method Detail

getOverrideFieldIndex

int getOverrideFieldIndex()
                          throws IOException,
                                 AutomationException
Field index of the override field.

Product Availability

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

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

getRuleIDFieldIndex

int getRuleIDFieldIndex()
                        throws IOException,
                               AutomationException
Field index of the Rule ID field.

Product Availability

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

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

getFeatureClass

IFeatureClass getFeatureClass()
                              throws IOException,
                                     AutomationException
Feature class associated with this representation class.

Description

FeatureClass property returns a reference to the feature class to which the representation class belongs.

Product Availability

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

Returns:
A reference to a com.esri.arcgis.geodatabase.IFeatureClass
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getID

int getID()
          throws IOException,
                 AutomationException
ID of the representation class.

Remarks

The Representation Class ID is a unique ID for the representation class and is used to identify it. Every representation class has an ID associated with it.

Product Availability

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

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

getRepresentation

IRepresentation getRepresentation(IFeature feature,
                                  IMapContext mapContext)
                                  throws IOException,
                                         AutomationException
Returns the representation of a given feature.

Remarks

Use GetRepresentation method to get a reference to the feature representation for any feature with respect to its map context. Same features will have different representations when the map contexts change.

The following code snippet demonstrates the use of PrepareFilter and GetRepresentation methods. Reference to a RepresentationClass must be present to use this code:

Product Availability

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

Parameters:
feature - A reference to a com.esri.arcgis.geodatabase.IFeature (in)
mapContext - A reference to a com.esri.arcgis.display.IMapContext (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRepresentation
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRepresentationRules

IRepresentationRules getRepresentationRules()
                                            throws IOException,
                                                   AutomationException
RepresentationRules Property.

Remarks

Use RepresentationRules property to get access to the members of the representation rules collection on a representation class. IRepresentationRules interface can be used to add, remove or modify rules present in the representation rules collection. To work with a specific rule within the collection, use esriDisplay.IRepresentationRule interface.

Product Availability

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

Returns:
A reference to a com.esri.arcgis.geodatabase.IRepresentationRules
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setRepresentationRulesByRef

void setRepresentationRulesByRef(IRepresentationRules repRules)
                                 throws IOException,
                                        AutomationException
RepresentationRules Property.

Product Availability

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

Parameters:
repRules - A reference to a com.esri.arcgis.geodatabase.IRepresentationRules (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGraphicAttributes

IGraphicAttributes getGraphicAttributes()
                                        throws IOException,
                                               AutomationException
General attributes defined at the representation class level.

Remarks

GraphicAttributes property returns a reference to the graphic attributes present for the representation class namely, visibility. To make changes to this property, use IGraphicAttributes interface.

Changes made at representation class level are applied to all representations. Individual representation's visibility property can also be overriden using IRepresentation::Value property.

Product Availability

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

Returns:
A reference to a com.esri.arcgis.display.IGraphicAttributes
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setGraphicAttributesByRef

void setGraphicAttributesByRef(IGraphicAttributes attributes)
                               throws IOException,
                                      AutomationException
General attributes defined at the representation class level.

Product Availability

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

Parameters:
attributes - A reference to a com.esri.arcgis.display.IGraphicAttributes (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isRequireShapeOverride

boolean isRequireShapeOverride()
                               throws IOException,
                                      AutomationException
Indicates if a shape override is required for feature representations.

Remarks

RequireShapeOverride will return True when the feature representation's shape property can be overridden. Shape overrides are stored into the Override field. If this property returns False, then altering the shape of the feature representation will directly alter the feature's shape.

Note: It is necessary to set this property to True, if you wish to store the shape overrides into Override field rather than alter the actual feature's shape.

Product Availability

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

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

setRequireShapeOverride

void setRequireShapeOverride(boolean requireShapeOverride)
                             throws IOException,
                                    AutomationException
Indicates if a shape override is required for feature representations.

Product Availability

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

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

prepareFilter

void prepareFilter(IQueryFilter filter)
                   throws IOException,
                          AutomationException
Adds the fields used by overrides to the query filter.

Remarks

Use PrepareFilter method to add fields to a query filter which will be used by overrides. This method takes a reference to a QueryFilter and sets the SubFields to RepresentationRuleID (RID) and Override (Override). The returned QueryFilter can be used to filter data based on the Representation information contained in these two fields. Use this method in conjunction with GetRepresentation method to query all representations. Add additional fields to the QueryFilter object using AddField method on IQueryFilter interface.

The following code snippet demonstrates the use of PrepareFilter and GetRepresentation methods. Reference to a RepresentationClass must be present to use this code:

Product Availability

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

Parameters:
filter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.