|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.geodatabase.RepresentationClass
public class RepresentationClass
A Feature Class Representation 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 correspoding to the RuleID which is of type long and Override which is of type binary larger object (blob). RuleID field has information about the RepresentationRule used to represent feature representations. Override field contains information about attribute and shape overrides present for representations. By default, the values in override field are null.
A representation class cannot exist on its own and needs to be created using a feature class. Representation classes will have same number of representations as there are features in the feature class. Deleting a feature class will result in the deletion of all representation classes associated with it. When new features are added to a feature class which already has a representation class, it is the responsibility of the user to update the RuleID value to correctly represent those new representations and add override information if necessary.
Use IRepresentationWorkspaceExtension.CreateRepresentationClass method to create new representation classes. Alternately, Drop Representation geoprocessing tool can be used to remove specific feature class representations.
A new RepresentationRules object has to be created or a reference to an existing representation rules has to be present prior to creation of a representation class. Representation rules are rules based on which feature representations are represented. A complex symbol can be created as a representation rule by combining one or more of basic symbols, geometric effects and marker placement styles.
Constructor Summary | |
---|---|
RepresentationClass(Object obj)
Construct a RepresentationClass using a reference to such an object returned from ArcGIS Engine or Server. |
Method Summary | |
---|---|
boolean |
canCopy()
True if this dataset can be copied. |
boolean |
canDelete()
True if this dataset can be deleted. |
boolean |
canRename()
True if this dataset can be renamed. |
void |
changeSchemaLock(int schemaLock)
Changes a schema lock. |
IDataset |
copy(String copyName,
IWorkspace copyWorkspace)
Copies this dataset to a new dataset with the specified name. |
void |
delete()
Deletes this dataset. |
boolean |
equals(Object o)
Compare this object with another |
String |
getBrowseName()
The browse name of the dataset. |
String |
getCategory()
The category of the dataset. |
void |
getCurrentSchemaLocks(IEnumSchemaLockInfo[] schemaLockInfo)
The list of current locks. |
IDEDataset |
getDataElement()
The data element corresponding to the dataset component. |
IFeatureClass |
getFeatureClass()
Feature class associated with this representation class. |
IName |
getFullName()
The associated name object. |
IGraphicAttributes |
getGraphicAttributes()
General attributes defined at the representation class level. |
int |
getID()
ID of the representation class. |
String |
getName()
The name of the Dataset. |
int |
getOverrideFieldIndex()
Field index of the override field. |
IDataset |
getParent()
The containing parent dataset. |
IPropertySet |
getPropertySet()
The set of properties for the dataset. |
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. |
IEnumDataset |
getSubsets()
Datasets contained within this dataset. |
int |
getType()
The type of the Dataset. |
IWorkspace |
getWorkspace()
The workspace containing this dataset. |
int |
hashCode()
the hashcode for this object |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
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 |
rename(String name)
Renames this Dataset. |
void |
setBrowseName(String name)
The browse name of the dataset. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public RepresentationClass(Object obj) throws IOException
obj
to RepresentationClass
. *
RepresentationClass o = (RepresentationClass)obj; // will not work
RepresentationClass o = new RepresentationClass(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server
IOException
- if there are interop problems
RepresentationClass theRepresentationClass = (RepresentationClass) obj;
Method Detail |
---|
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int getOverrideFieldIndex() throws IOException, AutomationException
getOverrideFieldIndex
in interface IRepresentationClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getRuleIDFieldIndex() throws IOException, AutomationException
getRuleIDFieldIndex
in interface IRepresentationClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFeatureClass getFeatureClass() throws IOException, AutomationException
FeatureClass property returns a reference to the feature class to which the representation class belongs.
getFeatureClass
in interface IRepresentationClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
getID
in interface IRepresentationClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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:
getRepresentation
in interface IRepresentationClass
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.public 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.
getRepresentationRules
in interface IRepresentationClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setRepresentationRulesByRef(IRepresentationRules repRules) throws IOException, AutomationException
setRepresentationRulesByRef
in interface IRepresentationClass
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.public 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.
getGraphicAttributes
in interface IRepresentationClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setGraphicAttributesByRef(IGraphicAttributes attributes) throws IOException, AutomationException
setGraphicAttributesByRef
in interface IRepresentationClass
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.public 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.
isRequireShapeOverride
in interface IRepresentationClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setRequireShapeOverride(boolean requireShapeOverride) throws IOException, AutomationException
setRequireShapeOverride
in interface IRepresentationClass
requireShapeOverride
- The requireShapeOverride (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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:
prepareFilter
in interface IRepresentationClass
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.public String getName() throws IOException, AutomationException
getName
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IName getFullName() throws IOException, AutomationException
getFullName
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getBrowseName() throws IOException, AutomationException
getBrowseName
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setBrowseName(String name) throws IOException, AutomationException
setBrowseName
in interface IDataset
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getType() throws IOException, AutomationException
// Assume we have a reference to an IfeatureClass (pFeatureClass) IDataset pDataset = null;
pDataset = new IDatasetProxy(pFeatureClass);
System.out.println(pDataset.getName() + " " + pDataset.getType());
if(pFeatureClass != null){
pDataset = pFeatureClass.getFeatureDataset();
System.out.println(pDataset.getName() + " " + pDataset.getType());
}
pDataset = new IDatasetProxy(pDataset.getWorkspace());
System.out.println(pDataset.getName() + " " +
pDataset.getType());
getType
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getCategory() throws IOException, AutomationException
IDataset::Category returns a description of the category of the dataset. The description returned from the Category property is the same value that is displayed in the Type column within the Contents tab in ArcCatalog. The value will contain a description of the dataset such as "Topology" prefixed with a description of the type of workspace containing the dataset such as "File Geodatabase".
The description returned from IDataset::Category may change between releases of ArcGIS. In addition to this, returned strings are localized, meaning that code relying on a specific string being provided may fail when deployed with a different version of ArcGIS than it was developed with, or when deployed to a client using a different language than it was developed with.
getCategory
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumDataset getSubsets() throws IOException, AutomationException
The Subsets property returns other Dataset objects contained in this dataset.
IDataset::Subsets is not supported for Graph objects such as a Geometric Network. To return the feature classes contained in a Geometric Network, use the IFeatureClassContainer interface.
getSubsets
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IWorkspace getWorkspace() throws IOException, AutomationException
The Workspace property returns the containing workspace for this dataset.
getWorkspace
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPropertySet getPropertySet() throws IOException, AutomationException
The PropertySet property is used to return any additional intrinsic properties (but not metadata properties) that may apply to the dataset. One use of this property is to distinguish between the types of File Geodatabase datafile formats. If called on a Feature Class or Table in a File Geodatabase the Datafile Format property can either be esriFGDBStandardDatafile or esriFGDBCompressedDatafile.
Most datasets do not implement this property and will either raise an error or return a null value if it's called. There are a handful of exceptions that will return property sets; these include the datasets from file geodatabases (as mentioned above) and coverages.
Examples of intrinsic properties for which explicit methods exist include the SpatialReference and the Extent methods available on the IGeoDataset interface. In most cases this PropertySet will be empty.
IDataset::PropertySet is not supported for Graph objects such as a Geometric Network.
getPropertySet
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean canCopy() throws IOException, AutomationException
The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods. For example, you may not delete a network feature class nor can you use the Copy method on a Geodatabase feature class. To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.
The CanCopy method is supported by:
canCopy
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IDataset copy(String copyName, IWorkspace copyWorkspace) throws IOException, AutomationException
IDataset::Copy should only be used with datasets from file-based data sources, such as shapefiles and coverages.
copy
in interface IDataset
copyName
- The copyName (in)copyWorkspace
- A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean canDelete() throws IOException, AutomationException
The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods. For example, you may not delete a network feature class nor can you use the Copy method on a Geodatabase feature class. To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.
canDelete
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void delete() throws IOException, AutomationException
Certain feature classes, such as network and topology feature classes, cannot be deleted until their containing objects are deleted.
delete
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean canRename() throws IOException, AutomationException
The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods. For example, you may not delete or rename a network feature class nor can you use the Copy method on a Geodatabase feature class. To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.
canRename
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void rename(String name) throws IOException, AutomationException
IDataset::Rename does not support the renaming of Graph objects such as a Geometric Network. In addition, certain feature classes, such as network feature classes, cannot be renamed.
rename
in interface IDataset
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IDEDataset getDataElement() throws IOException, AutomationException
The DataElement method is used to access the data element for this dataset component.
getDataElement
in interface IDatasetComponent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IDataset getParent() throws IOException, AutomationException
Returns the parent of the dataset component. For example, for geodatabase network datasets this will return the containing feature dataset.
getParent
in interface IDatasetComponent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void changeSchemaLock(int schemaLock) throws IOException, AutomationException
changeSchemaLock
in interface ISchemaLock
schemaLock
- A com.esri.arcgis.geodatabase.esriSchemaLock constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getCurrentSchemaLocks(IEnumSchemaLockInfo[] schemaLockInfo) throws IOException, AutomationException
The ISchemaLockInfo interface is used in concert with ISchemaLock to provide information about a schema lock, for example, whether it is shared or exclusive and for ArcSDE geodatabases, the name of the user who has the lock. Note that there will always be at least one schema lock on the dataset. Also note that by checking the schema locks on a dataset a shared schema lock is applied to the data.
getCurrentSchemaLocks
in interface ISchemaLock
schemaLockInfo
- A reference to a com.esri.arcgis.geodatabase.IEnumSchemaLockInfo (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (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 |