|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDataset
Provides access to members that supply dataset information.
Not all of the methods and properties of IDataset are applicable to every type of dataset. For example, the Copy method should only be used on datasets from file-based data sources, and very few datasets will return values from the PropertySet property (coverages being a notable exception).
IGPDataType.getFullName()
,
IWorkspace
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. |
IDataset |
copy(String copyName,
IWorkspace copyWorkspace)
Copies this dataset to a new dataset with the specified name. |
void |
delete()
Deletes this dataset. |
String |
getBrowseName()
The browse name of the dataset. |
String |
getCategory()
The category of the dataset. |
IName |
getFullName()
The associated name object. |
String |
getName()
The name of the Dataset. |
IPropertySet |
getPropertySet()
The set of properties for the dataset. |
IEnumDataset |
getSubsets()
Datasets contained within this dataset. |
int |
getType()
The type of the Dataset. |
IWorkspace |
getWorkspace()
The workspace containing this dataset. |
void |
rename(String name)
Renames this Dataset. |
void |
setBrowseName(String name)
The browse name of the dataset. |
Method Detail |
---|
String getName() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IName getFullName() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getBrowseName() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setBrowseName(String name) throws IOException, AutomationException
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.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());
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IWorkspace getWorkspace() throws IOException, AutomationException
The Workspace property returns the containing workspace for this dataset.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.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:
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.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.
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.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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void delete() throws IOException, AutomationException
Certain feature classes, such as network and topology feature classes, cannot be deleted until their containing objects are deleted.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.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.
name
- The name (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 |