|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRepresentationClass
Provides access to members that control the behavior and properties of a feature class representation.
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.
Use IRepresentationClass to access a feature class representation to either view, copy, or make changes to RepresentationRules, GraphicAttributes and RequireShapeOverride properties.
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 |
---|
int getOverrideFieldIndex() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getRuleIDFieldIndex() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IFeatureClass getFeatureClass() throws IOException, AutomationException
FeatureClass property returns a reference to the feature class to which the representation class belongs.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getID() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IRepresentation getRepresentation(IFeature feature, IMapContext mapContext) throws IOException, AutomationException
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:
feature
- A reference to a com.esri.arcgis.geodatabase.IFeature (in)mapContext
- A reference to a com.esri.arcgis.display.IMapContext (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IRepresentationRules getRepresentationRules() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setRepresentationRulesByRef(IRepresentationRules repRules) throws IOException, AutomationException
repRules
- A reference to a com.esri.arcgis.geodatabase.IRepresentationRules (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IGraphicAttributes getGraphicAttributes() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setGraphicAttributesByRef(IGraphicAttributes attributes) throws IOException, AutomationException
attributes
- A reference to a com.esri.arcgis.display.IGraphicAttributes (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isRequireShapeOverride() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setRequireShapeOverride(boolean requireShapeOverride) throws IOException, AutomationException
requireShapeOverride
- The requireShapeOverride (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void prepareFilter(IQueryFilter filter) throws IOException, AutomationException
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:
filter
- A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |