|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.geodatabase.RelationshipClass
public class RelationshipClass
ESRI Relationship Class object.
You can create a relationship class with either IRelationshipClassContainer or IFeatureWorkspace. RelationshipClass objects implement IDataset (useful for getting the name or the workspace), but note that they do not implement IClass (unless they are attributed). This is because a non-attributed relationship class does not have any fields of its own.
Constructor Summary | |
---|---|
RelationshipClass(Object obj)
Construct a RelationshipClass using a reference to such an object returned from ArcGIS Engine or Server. |
Method Summary | |
---|---|
void |
addRelationshipRule(IRule rule)
Adds a relationship rule to this relationship class. |
void |
alterBackwardPathLabel(String backwardLabel)
Changes the backward path label for this relationship class. |
void |
alterForwardPathLabel(String forwardLabel)
Changes the forward path label for this relationship class. |
void |
alterIsComposite(boolean isComposite)
Changes the type of this relationship class. |
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. |
IDataset |
copy(String copyName,
IWorkspace copyWorkspace)
Copies this dataset to a new dataset with the specified name. |
IRelationship |
createRelationship(IObject originObject,
IObject destinationObject)
Creates a new relationship between the two specified objects. |
void |
delete()
Deletes this dataset. |
void |
deleteRelationship(IObject originObject,
IObject destinationObject)
Deletes the relationship that associates the two specified objects. |
void |
deleteRelationshipRule(IRule rule)
Deletes a relationship rule from this relationship class. |
void |
deleteRelationshipsForObject(IObject anObject)
Deletes all relationships that apply to a specified object. |
void |
deleteRelationshipsForObjectSet(ISet anObjectSet)
Deletes all relationships that apply to the specified origin or destination object set. |
boolean |
equals(Object o)
Compare this object with another |
String |
getBackwardPathLabel()
The backward path label for the relationship class. |
String |
getBrowseName()
The browse name of the dataset. |
int |
getCardinality()
The cardinality for the relationship class. |
String |
getCategory()
The category of the dataset. |
IObjectClass |
getDestinationClass()
The destination object class. |
String |
getDestinationForeignKey()
The relationship destination foreign Key. |
String |
getDestinationPrimaryKey()
The relationship destination primary Key. |
IFeatureDataset |
getFeatureDataset()
The feature dataset, if any, to which this relationship class belongs. |
String |
getForwardPathLabel()
The forward path label for the relationship class. |
IName |
getFullName()
The associated name object. |
String |
getName()
The name of the Dataset. |
int |
getNotification()
The notification direction for the relationship class. |
IRelClassEnumRowPairs |
getObjectsMatchingObjectArray(IArray srcObjectArray,
IQueryFilter queryFilterAppliedToMatchingObjects,
boolean returnAllObjectMatches)
Gets rows pairs of objects that are related to the specified origin or destination object array, that also meet the query filter expression. |
IRelClassEnumRowPairs |
getObjectsMatchingObjectSet(ISet srcObjectSet)
Gets rows pairs of objects that are related to the specified origin or destination object set. |
IRelClassEnumRowPairs |
getObjectsMatchingObjectSetEx(ISet srcObjectSet,
IQueryFilter queryFilterAppliedToMatchingObjects,
boolean returnAllObjectMatches)
Gets rows pairs of objects that are related to the specified origin or destination object set, that also meet the query filter expression. |
ISet |
getObjectsRelatedToObject(IObject anObject)
Gets the objects that are related to the specified object. |
ISet |
getObjectsRelatedToObjectSet(ISet anObjectSet)
Gets the objects that are related to the specified origin or destination object set. |
IObjectClass |
getOriginClass()
The origin object class. |
String |
getOriginForeignKey()
The relationship origin foreign Key. |
String |
getOriginPrimaryKey()
The relationship origin primary Key. |
IPropertySet |
getPropertySet()
The set of properties for the dataset. |
IRelationship |
getRelationship(IObject originObject,
IObject destinationObject)
Get the relationship that associates the two specified objects. |
int |
getRelationshipClassID()
The relationship class ID. |
IEnumRule |
getRelationshipRules()
The relationship rules that apply to this relationship class. |
IEnumRelationship |
getRelationshipsForObject(IObject anObject)
Get all relationships that apply to a specified object. |
IEnumRelationship |
getRelationshipsForObjectSet(ISet anObjectSet)
Get all relationships that apply to the specified origin or destination object set. |
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 |
boolean |
isAttributed()
Indicates if the relationships in this relationship class have attributes. |
boolean |
isComposite()
Indicates if the relationship class represents a composite relationship in which the origin object class represents the composite object. |
void |
rename(String name)
Renames this Dataset. |
void |
setBrowseName(String name)
The browse name of the dataset. |
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 RelationshipClass(Object obj) throws IOException
obj
to RelationshipClass
. *
RelationshipClass o = (RelationshipClass)obj; // will not work
RelationshipClass o = new RelationshipClass(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server
IOException
- if there are interop problems
RelationshipClass theRelationshipClass = (RelationshipClass) obj;
Method Detail |
---|
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String getOriginPrimaryKey() throws IOException, AutomationException
IRelationshipClassSet pRelationshipClass = null;
pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");
String sPrimaryKeyField = pRelationshipClass.getOriginPrimaryKey();
getOriginPrimaryKey
in interface IRelationshipClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getDestinationPrimaryKey() throws IOException, AutomationException
IRelationshipClass pRelationshipClass = null;
pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");
String sPrimaryKeyField = pRelationshipClass.getDestinationPrimaryKey()
;
getDestinationPrimaryKey
in interface IRelationshipClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getOriginForeignKey() throws IOException, AutomationException
IRelationshipClass pRelationshipClass = null;
pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");
String sPrimaryKeyField = pRelationshipClass.getOriginForeignKey();
getOriginForeignKey
in interface IRelationshipClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getDestinationForeignKey() throws IOException, AutomationException
The DestinationForeignKey property returns the name of the destination foreign key field. This property is null except in the case of attributed relationship classes, in which case it is the name of a field in the relationship table. The values in this field reference values in the field designated as the destination primary key.
IRelationshipClass pRelationshipClass = null;
pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");
String sPrimaryKeyField = pRelationshipClass.getDestinationForeignKey();
getDestinationForeignKey
in interface IRelationshipClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getRelationshipClassID() throws IOException, AutomationException
The RelationshipClassID property returns the ID of the relationship class. This ID uniquely identifies a relationship class within its geodatabase relative to other relationship classes. It is equivalent to IObjectClass::ObjectClassID except that it applies to relationship classes rather than object classes.
IRelationshipClass pRelationshipClass = null;
pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");
long lClassID = pRelationshipClass.getRelationshipClassID();
getRelationshipClassID
in interface IRelationshipClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IObjectClass getOriginClass() throws IOException, AutomationException
When using a relationship class, the OriginClass property is used for returning an interface to the origin objectclass .
getOriginClass
in interface IRelationshipClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IObjectClass getDestinationClass() throws IOException, AutomationException
IRelationshipClass pRelationshipClass = null;
pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");
IObjectClass pObjectClass = pRelationshipClass.getDestinationClass();
getDestinationClass
in interface IRelationshipClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFeatureDataset getFeatureDataset() throws IOException, AutomationException
The FeatureDataset property returns the feature dataset that this relationship class belongs to. If the relationship class exists outside of a feature dataset, a null value will be returned.
IRelationshipClass pRelationshipClass = null;
pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");
IFeatureDataset pFeatureDataset = pRelationshipClass.getFeatureDataset();
getFeatureDataset
in interface IRelationshipClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getForwardPathLabel() throws IOException, AutomationException
The ForwardPathLabel property returns the path label for the forward direction path. An example can be shown by using a relationship between a pump station and its pumps. A forward path label may be something like "Contains". It would be read as a pump station 'Contains' pumps.
IRelationshipClass pRelationshipClass = null;
pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");
String sPathLabel = pRelationshipClass.getForwardPathLabel();
getForwardPathLabel
in interface IRelationshipClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getBackwardPathLabel() throws IOException, AutomationException
The BackwardPathLabel property returns the path label for the backward direction path. An example can be shown by using a relationship between a pump station and its pumps. A backward path label may be something like "Contained by". It would be read as a pump is 'Contained by' the pump station.
IRelationshipClass pRelationshipClass = null;
pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");
String sPathLabel = pRelationshipClass.getBackwardPathLabel();
getBackwardPathLabel
in interface IRelationshipClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getCardinality() throws IOException, AutomationException
The Cardinality property returns the cardinality of the relationship class as an esriRelCardinality enumeration value. It refers to the type of relationship formed between an origin class and a destination class. It can be one of three types: esriRelCardinalityOneToOne (1-1), esriRelCardinalityOneToMany (1-M), or esriRelCardinalityManyToMany (M-N).
IRelationshipClass pRelationshipClass = null;
pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");
esriRelCardinality eCardinality = pRelationshipClass.getCardinality();
getCardinality
in interface IRelationshipClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getNotification() throws IOException, AutomationException
The Notification property returns the relationship class' notification behavior as as esriRelNotification enumeration value. A notification occurs when an event happens, such as a deletion or an edit. It can be one of four type: esriRelNotificationNone, esriRelNotificationForward, esriRelNotificationBackward, or esriRelNotificationBoth. None means no notification will take place, forward means that notification will happen from the origin to the destination, backward means notification occurs from the destination to the origin, and both means notification will happen both ways when an event occurs.
IRelationshipClass pRelationshipClass = null;
pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");
esriRelNotification eNotification = pRelationshipClass.getNotification();
getNotification
in interface IRelationshipClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isAttributed() throws IOException, AutomationException
The IsAttributed property indicates whether this relationship class is attributed or not. An attributed relationship class has extra attributes that are being maintained for each relationship. For example, in a relationship class between parcels and owners, percentage of ownership each particular owner has could be stored as a relationship attribute.
The IsAttributed property will only return true if there are extra relationship attributes beyond those required to relate the objects. In the case of relationship classes with M:N cardinality, there will be a relationship table (see 'AttributedRelationshipClass' in the object model diagram), but IsAttributed will return False, unless there are additional attributes.
isAttributed
in interface IRelationshipClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isComposite() throws IOException, AutomationException
The IsComposite property indicates whether this relationship class is composite or simple. A composite relationship class is one where objects in the origin class control the lifetime of the objects in the destination class. When the origin object is deleted, the related destination object is also deleted. Composite relationship classes are always one to many relationships, but this can be constrained to one to one through the use of relationship rules.
If a relationship class is not composite, it is considered 'simple', and related objects are independent of each other. Simple relationships can be of any cardinality.
isComposite
in interface IRelationshipClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRelationship createRelationship(IObject originObject, IObject destinationObject) throws IOException, AutomationException
The CreateRelationship method creates a relationship between the origin object and the destination object specified in the parameters. By default, when a relationship class is created, a relationship is created between the objects with corresponding primary and foreign key values. When subsequently using CreateRelationship, remember that this operation will write a value into the foreign key field. Therefore, in the case of 1:1 and 1:M relationship classes, it is possible that you could overwrite, and therefore delete, an existing relationship.
This method should be called within an edit session.
IRelationshipClass pRelationshipClass = null;
pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");
ITable pOriginTable = new ITableProxy(pFeatureWorkspace.openTable("origintable"));
ITable pDestinationTable = new ITableProxy(pFeatureWorkspace.openTable("destinationtable"));
IFeature pOriginFeature = new IFeatureProxy(pOriginTable.getRow(2));
IFeature pDestinationFeature = new IFeatureProxy(pDestinationTable.getRow(2));
IWorkspaceEdit pWorkspaceEdit = pWorkspace;
pWorkspaceEdit.startEditing(true);
pWorkspaceEdit.startEditOperation();
IRelationship pRelationship = pRelationshipClass.createRelationship(pOriginFeature, pDestinationFeature);
pWorkspaceEdit.stopEditOperation();
pWorkspaceEdit.stopEditing(true);
createRelationship
in interface IRelationshipClass
originObject
- A reference to a com.esri.arcgis.geodatabase.IObject (in)destinationObject
- A reference to a com.esri.arcgis.geodatabase.IObject (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRelationship getRelationship(IObject originObject, IObject destinationObject) throws IOException, AutomationException
When using a relationship class, the GetRelationship method is used for returning a relationship interface to the relationship between the origin object and destination object specified in the function parameters. This can be used to retrieve the relationship between two objects.
getRelationship
in interface IRelationshipClass
originObject
- A reference to a com.esri.arcgis.geodatabase.IObject (in)destinationObject
- A reference to a com.esri.arcgis.geodatabase.IObject (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteRelationship(IObject originObject, IObject destinationObject) throws IOException, AutomationException
The DeleteRelationship method deletes the relationship between the origin object and destination object specified in the parameters. This will remove the entry for this relationship from the relationship class.
This method should be called within an edit session.
IRelationshipClass pRelationshipClass = null;
pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");
ITable pOriginTable = new ITableProxy(pFeatureWorkspace.openTable("origintable"));
ITable pDestinationTable = new ITableProxy(pFeatureWorkspace.openTable("destinationtable"));
IFeature pOriginFeature = new IFeatureProxy(pOriginTable.getRow(2));
IFeature pDestinationFeature = new IFeatureProxy(pDestinationTable.getRow(2));
pRelationshipClass.deleteRelationship(pOriginFeature, pDestinationFeature);
deleteRelationship
in interface IRelationshipClass
originObject
- A reference to a com.esri.arcgis.geodatabase.IObject (in)destinationObject
- A reference to a com.esri.arcgis.geodatabase.IObject (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISet getObjectsRelatedToObject(IObject anObject) throws IOException, AutomationException
The GetObjectsRelatedToObject method returns a set of Objects (or subtypes of Object, such as features) that are related to the anObject object.
getObjectsRelatedToObject
in interface IRelationshipClass
anObject
- A reference to a com.esri.arcgis.geodatabase.IObject (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumRelationship getRelationshipsForObject(IObject anObject) throws IOException, AutomationException
The GetRelationshipsForObject method returns an IEnumRelationship enumerator containing the relationships that the anObject parameter participates in.
getRelationshipsForObject
in interface IRelationshipClass
anObject
- A reference to a com.esri.arcgis.geodatabase.IObject (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteRelationshipsForObject(IObject anObject) throws IOException, AutomationException
The DeleteRelationshipsForObject method is used for removing all of the relationships in the relationship class that the specified object belongs to. Note that this method is bi-directional; the specified object could belong to the origin class or destination class.
This method should be called within an edit session.
IRelationshipClass pRelationshipClass = null;
pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");
ITable pOriginTable = new ITableProxy(pFeatureWorkspace.openTable("origintable"));
IFeature pOriginFeature = new IFeatureProxy(pOriginTable.getRow(2));
pRelationshipClass.DeleteRelationshipsForObject(pOriginFeature)
deleteRelationshipsForObject
in interface IRelationshipClass
anObject
- A reference to a com.esri.arcgis.geodatabase.IObject (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISet getObjectsRelatedToObjectSet(ISet anObjectSet) throws IOException, AutomationException
The GetObjectsRelatedToObjectSet method returns a set of objects that are related to the objects contained by the anObjectSet parameter. It behaves the same as GetObjectsRelatedToObject, except that it accepts a set of objects as a parameter.
If multiple objects in the input set are related to a common object, that object will only be included once in the returned set.
If the input set is constructed with a cursor, ensure that a non-recycling cursor is used.
getObjectsRelatedToObjectSet
in interface IRelationshipClass
anObjectSet
- A reference to a com.esri.arcgis.system.ISet (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumRelationship getRelationshipsForObjectSet(ISet anObjectSet) throws IOException, AutomationException
The GetRelationshipsForObjectSet method returns an IEnumRelationship enumerator containing the relationships that the objects in anObjectSet parameter participate in.
If the input set is constructed with a cursor, ensure that a non-recycling cursor is used.
getRelationshipsForObjectSet
in interface IRelationshipClass
anObjectSet
- A reference to a com.esri.arcgis.system.ISet (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRelClassEnumRowPairs getObjectsMatchingObjectSet(ISet srcObjectSet) throws IOException, AutomationException
The GetObjectsMatchingObjectSet method returns an enumerator of related object pairs based on the object set provided as a parameter. The enumerator contains a related object pair for each relationship participated in by the input objects. For example, in a relationship class with 1:1 cardinality, passing three objects into this method will return three related object pairs, assuming all three objects participate in a relationship. In a relationship class with 1:M or M:N cardinality, passing in a single object could conceivably result in an enumerator with multiple related object pairs, if the object participates in several relationships.
If the input set is constructed with a cursor, ensure that a non-recycling cursor is used.
getObjectsMatchingObjectSet
in interface IRelationshipClass
srcObjectSet
- A reference to a com.esri.arcgis.system.ISet (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteRelationshipsForObjectSet(ISet anObjectSet) throws IOException, AutomationException
The DeleteRelationshipsForObjectSet method is used for removing all relationships in a particular relationship class for the specified set of objects.
This method works in the same way as the DeleteRelationshipsForObject method, except on a set of objects rather than a single one. If a cursor is used to populate the set with objects, ensure that a non-recycling cursor is used.
This method should be called within an edit session.
IRelationshipClass pRelationshipClass = null;
pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");
ITable pOriginTable = new ITableProxy(pFeatureWorkspace.openTable("origintable"));
IFeature pOriginFeature = new IFeatureProxy(pOriginTable.getRow(2));
ISet pVSet = new ISet();
pVSet.add(pOriginTable.getRow(1));
pVSet.add(pOriginTable.getRow(2));
pVSet.add(pOriginTable.getRow(3));
pVSet.reset();
pRelationshipClass.deleteRelationshipsForObjectSet(pVSet);
pVSet = null;
deleteRelationshipsForObjectSet
in interface IRelationshipClass
anObjectSet
- A reference to a com.esri.arcgis.system.ISet (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumRule getRelationshipRules() throws IOException, AutomationException
The RelationshipRules property retrieves the relationship rules of the relationship class as an IEnumRule enumerator. These rules are used to control which object subtypes from the origin class can be related to which object subtypes in the destination class. They can also be used to specify a valid cardinality range for all permissable subtype pairs. For example, in a feature class containing utility poles divided into wooden and steel subtypes, relationship rules could be used to specify that wooden poles may have one to three transformers attached, but steel poles may have one to five transformers attached.
IRelationshipClass pRelationshipClass = null;
pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");
IEnumRule pEnumRule = pRelationshipClass.getRelationshipRules();
getRelationshipRules
in interface IRelationshipClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addRelationshipRule(IRule rule) throws IOException, AutomationException
The AddRelationshipRule method adds a new relationship rule to the relationship class. Relationship classes can have an associated set of relationship rules. These rules are used to control which object subtypes from the origin class can be related to which object subtypes in the destination class. They can also be used to specify a valid cardinality range for all permissable subtype pairs. For example, in a feature class containing utility poles divided into wooden and steel subtypes, relationship rules could be used to specify that wooden poles may have one to three transformers attached, but steel poles may have one to five transformers attached.
IRelationshipClass pRelationshipClass = null;
pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");
IFeatureClass pPoleFeatureClass = null;
IFeatureClass pPoleFeatureClass = new
IFeatureClassProxy(pFeatureWorkspace.OpenFeatureClass("poles"));
IFeatureClass pTransFeatureClass = null;
IFeatureClass pTransFeatureClass = new
IFeatureClassProxy(pFeatureWorkspace.OpenFeatureClass("transformers"));
IRelationshipRule pRelationshipRule = null;
IRelationshipRule pRelationshipRule = new RelationshipRule();
pRelationshipRule.setDestinationClassID(pTransFeatureClass.getObjectClassID());
pRelationshipRule.setDestinationSubtypeCode (178);
pRelationshipRule.setDestinationMaximumCardinality ( 1);
pRelationshipRule.setDestinationMinimumCardinality ( 5);
pRelationshipRule.setOriginClassID(pPoleFeatureClass.getObjectClassID());
pRelationshipRule.setOriginSubtypeCode ( 101);
pRelationshipRule.setOriginMaximumCardinality ( 1);
pRelationshipRule.setOriginMinimumCardinality ( 1);
pRelationshipClass.addRelationshipRule(pRelationshipRule);
addRelationshipRule
in interface IRelationshipClass
rule
- A reference to a com.esri.arcgis.geodatabase.IRule (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteRelationshipRule(IRule rule) throws IOException, AutomationException
The DeleteRelationshipRule method deletes a relationship rule from the relationship class. Relationship classes can have an associated set of relationship rules. These rules are used to control which object subtypes from the origin class can be related to which object subtypes in the destination class. They can also be used to specify a valid cardinality range for all permissable subtype pairs. For example, in a feature class containing utility poles divided into wooden and steel subtypes, relationship rules could be used to specify that wooden poles may have one to three transformers attached, but steel poles may have one to five transformers attached.
deleteRelationshipRule
in interface IRelationshipClass
rule
- A reference to a com.esri.arcgis.geodatabase.IRule (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 IRelClassEnumRowPairs getObjectsMatchingObjectSetEx(ISet srcObjectSet, IQueryFilter queryFilterAppliedToMatchingObjects, boolean returnAllObjectMatches) throws IOException, AutomationException
The returnAllObjectMatches parameter indicates whether the first matching object or if all matching objects are returned. A value of True will return all object matches.
getObjectsMatchingObjectSetEx
in interface IRelationshipClass2
srcObjectSet
- A reference to a com.esri.arcgis.system.ISet (in)queryFilterAppliedToMatchingObjects
- A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)returnAllObjectMatches
- The returnAllObjectMatches (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRelClassEnumRowPairs getObjectsMatchingObjectArray(IArray srcObjectArray, IQueryFilter queryFilterAppliedToMatchingObjects, boolean returnAllObjectMatches) throws IOException, AutomationException
The returnAllObjectMatches parameter indicates whether the first matching object or if all matching objects are returned. A value of True will return all object matches.
getObjectsMatchingObjectArray
in interface IRelationshipClass2
srcObjectArray
- A reference to a com.esri.arcgis.system.IArray (in)queryFilterAppliedToMatchingObjects
- A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)returnAllObjectMatches
- The returnAllObjectMatches (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void alterForwardPathLabel(String forwardLabel) throws IOException, AutomationException
alterForwardPathLabel
in interface IRelClassSchemaEdit
forwardLabel
- The forwardLabel (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void alterBackwardPathLabel(String backwardLabel) throws IOException, AutomationException
alterBackwardPathLabel
in interface IRelClassSchemaEdit
backwardLabel
- The backwardLabel (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void alterIsComposite(boolean isComposite) throws IOException, AutomationException
alterIsComposite
in interface IRelClassSchemaEdit
isComposite
- The isComposite (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 |