com.supermap.data
Class DatasetGroup
- java.lang.Object
-
- com.supermap.data.InternalHandle
-
- com.supermap.data.DatasetGroup
-
public class DatasetGroup extends InternalHandle
Dataset grouping class. This class provides a logical organizational structure for managing subgroups in a data source.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description int
add(Dataset dataset)
Deprecated.boolean
add(Dataset[] dataset)
Add datasets to the group in batchesvoid
addAddedListener(DatasetGroupItemAddedListener listener)
Add a listener that receives the addition of dataset end events (DatasetGroupItemAddedEvent
) to the dataset grouping.void
addChangedListener(DatasetGroupItemChangedListener listener)
Listeners used to receive dataset grouping, dataset churn end events (DatasetGroupItemChangedEvent
).void
addRemovedListener(DatasetGroupItemRemovedListener listener)
Add a listener to receive the dataset end event (DatasetGroupItemRemovedEvent
) in the deleted dataset grouping.void
addRemovingListener(DatasetGroupItemRemovingListener listener)
Add a listener to receive dataset events (DatasetGroupItemRemovingEvent
) in the deleted dataset grouping.void
addRenamedListener(DatasetGroupRenamedListener listener)
Add a listener to receive dataset grouping rename end events (DatasetGroupRenamedEvent
).void
addRenamingListener(DatasetGroupRenamingListener listener)
Add a listener to receive dataset grouping rename events (DatasetGroupRenamingEvent
).DatasetVector
createDataset(DatasetVectorInfo datasetInfo)
Create vector datasetsboolean
deleteDataset(java.lang.String strDtName)
Delete the dataset based on the dataset nameDataset
get(int index)
Returns the dataset object at the specified index location in the current dataset grouping.Dataset
get(java.lang.String datasetName)
Returns the dataset object with the specified name in the current dataset grouping.java.lang.String
getAvailableGroupName(java.lang.String name)
Get available group namesDatasetGroups
getChildGroups()
Returns the subgroup set of the grouped set of the current dataset.int
getCount()
Returns the total number of dataset objects contained in the current dataset grouping.java.lang.String[]
getDatasetNames()
Get the list of dataset names in the current groupDatasource
getDatasource()
Returns the data source grouped by the current dataset.int
getID()
Get the current group IDjava.lang.String
getName()
Returns the name of the current dataset grouping.DatasetGroup
getParent()
Returns the parent grouping of the current dataset grouping.int
indexOf(Dataset dataset)
Obtain the dataset index under the grouping by datasetint
indexOf(java.lang.String datasetName)
Returns the dataset index with the name specified in the current dataset grouping.boolean
isAvailableGroupName(java.lang.String name)
Check whether the group name is availableboolean
moveDataset(DatasetGroup desGroup, java.lang.String dtName)
Move the dataset to another groupingvoid
refreshChildGroups()
Refresh subgroupsboolean
remove(java.lang.String datasetName)
Deprecated.void
removeAddedListener(DatasetGroupItemAddedListener listener)
Removed a listener that receives the addition of a dataset end event (DatasetGroupItemAddedEvent
) to a dataset grouping.void
removeChangedListener(DatasetGroupItemChangedListener listener)
Removed the listener used to receive the dataset grouping dataset churn end event (DatasetGroupItemChangedEvent
).void
removeRemovedListener(DatasetGroupItemRemovedListener listener)
Removed a listener that receives dataset end events (DatasetGroupItemRemovedEvent
) in the deleted dataset grouping.void
removeRemovingListener(DatasetGroupItemRemovingListener listener)
Removed a listener that receives dataset events (DatasetGroupItemRemovingEvent
) in a grouping of deleted datasets.void
removeRenamedListener(DatasetGroupRenamedListener listener)
Removed a listener that receives dataset grouping rename end events (DatasetGroupRenamedEvent
).void
removeRenamingListener(DatasetGroupRenamingListener listener)
Removed a listener that receives dataset grouping rename events (DatasetGroupRenamingEvent
).boolean
rename(java.lang.String newName)
Rename the groupvoid
setName(java.lang.String newName)
Deprecated.boolean
setParent(DatasetGroup parentGroup)
Set to change the parent group
-
-
-
Method Detail
-
getParent
public DatasetGroup getParent()
Returns the parent grouping of the current dataset grouping.- Returns:
- The parent grouping of the current dataset grouping.
-
setParent
public boolean setParent(DatasetGroup parentGroup)
Set to change the parent group- Parameters:
parentGroup
-- Returns:
- Whether the change was successful
-
refreshChildGroups
public void refreshChildGroups()
Refresh subgroups
-
getChildGroups
public DatasetGroups getChildGroups()
Returns the subgroup set of the grouped set of the current dataset.- Returns:
- A subgroup set of the grouped set of the current dataset.
-
getName
public java.lang.String getName()
Returns the name of the current dataset grouping.- Returns:
- Name of the current dataset grouping.
-
setName
@Deprecated public void setName(java.lang.String newName)
Deprecated.
-
rename
public boolean rename(java.lang.String newName)
Rename the group- Parameters:
newName
- group name- Returns:
- Whether the rename was successful
-
get
public Dataset get(int index)
Returns the dataset object at the specified index location in the current dataset grouping.- Parameters:
index
- specifies the index of the dataset object to be found.- Returns:
- Specifies the dataset object at which the index is located.
-
get
public Dataset get(java.lang.String datasetName)
Returns the dataset object with the specified name in the current dataset grouping.- Parameters:
datasetName
- The name of the dataset to be found- Returns:
- The dataset object to be acquired.
-
getDatasetNames
public java.lang.String[] getDatasetNames()
Get the list of dataset names in the current group- Returns:
- Array of dataset names
-
getID
public int getID()
Get the current group ID- Returns:
- Current group ID
-
add
public boolean add(Dataset[] dataset)
Add datasets to the group in batches- Parameters:
dataset
- dataset array- Returns:
- Whether the addition was successful
-
getDatasource
public Datasource getDatasource()
Returns the data source grouped by the current dataset.- Returns:
- Data source grouped by the current dataset.
-
getCount
public int getCount()
Returns the total number of dataset objects contained in the current dataset grouping.- Returns:
- The total number of dataset objects contained in the current dataset grouping.
-
add
@Deprecated public int add(Dataset dataset)
Deprecated.
-
remove
@Deprecated public boolean remove(java.lang.String datasetName)
Deprecated.
-
indexOf
public int indexOf(java.lang.String datasetName)
Returns the dataset index with the name specified in the current dataset grouping.- Parameters:
datasetName
- specifies the name of the dataset.- Returns:
- The index value of the specified dataset in the current dataset grouping.
-
indexOf
public int indexOf(Dataset dataset)
Obtain the dataset index under the grouping by dataset- Parameters:
dataset
- specified- Returns:
- Index of the dataset
-
createDataset
public DatasetVector createDataset(DatasetVectorInfo datasetInfo)
Create vector datasets- Parameters:
datasetInfo
- vector dataset information- Returns:
- Vector dataset created
-
deleteDataset
public boolean deleteDataset(java.lang.String strDtName)
Delete the dataset based on the dataset name- Parameters:
strDtName
- dataset name- Returns:
- Whether the deletion is successful
-
moveDataset
public boolean moveDataset(DatasetGroup desGroup, java.lang.String dtName)
Move the dataset to another grouping- Parameters:
desGroup
- target dataset groupingdtName
- The name of the dataset to be moved- Returns:
- Whether the move was successful
-
getAvailableGroupName
public java.lang.String getAvailableGroupName(java.lang.String name)
Get available group names- Parameters:
name
- group name- Returns:
- Returns the available group names
-
isAvailableGroupName
public boolean isAvailableGroupName(java.lang.String name)
Check whether the group name is available- Parameters:
name
- group name- Returns:
- Availability
-
addRenamedListener
public void addRenamedListener(DatasetGroupRenamedListener listener)
Add a listener to receive dataset grouping rename end events (DatasetGroupRenamedEvent
).- Parameters:
listener:
- A listener used to receive events that end of a grouping rename of a dataset.
-
removeRenamedListener
public void removeRenamedListener(DatasetGroupRenamedListener listener)
Removed a listener that receives dataset grouping rename end events (DatasetGroupRenamedEvent
).- Parameters:
listener:
- A listener used to receive events that end of a grouping rename of a dataset.
-
addRenamingListener
public void addRenamingListener(DatasetGroupRenamingListener listener)
Add a listener to receive dataset grouping rename events (DatasetGroupRenamingEvent
).- Parameters:
listener
- is a listener used to receive events for grouping renames of datasets.
-
removeRenamingListener
public void removeRenamingListener(DatasetGroupRenamingListener listener)
Removed a listener that receives dataset grouping rename events (DatasetGroupRenamingEvent
).- Parameters:
listener
- is a listener used to receive events for grouping renames of datasets.
-
addAddedListener
public void addAddedListener(DatasetGroupItemAddedListener listener)
Add a listener that receives the addition of dataset end events (DatasetGroupItemAddedEvent
) to the dataset grouping.- Parameters:
listener
- A listener used to receive an event that adds a dataset end event to a dataset grouping.
-
removeAddedListener
public void removeAddedListener(DatasetGroupItemAddedListener listener)
Removed a listener that receives the addition of a dataset end event (DatasetGroupItemAddedEvent
) to a dataset grouping.- Parameters:
listener
- A listener used to receive an event that adds a dataset end event to a dataset grouping.
-
addRemovingListener
public void addRemovingListener(DatasetGroupItemRemovingListener listener)
Add a listener to receive dataset events (DatasetGroupItemRemovingEvent
) in the deleted dataset grouping.- Parameters:
listener
- is a listener that receives events for deleting datasets in a dataset grouping.
-
removeRemovingListener
public void removeRemovingListener(DatasetGroupItemRemovingListener listener)
Removed a listener that receives dataset events (DatasetGroupItemRemovingEvent
) in a grouping of deleted datasets.- Parameters:
listener
- is a listener that receives events for deleting datasets in a dataset grouping.
-
addRemovedListener
public void addRemovedListener(DatasetGroupItemRemovedListener listener)
Add a listener to receive the dataset end event (DatasetGroupItemRemovedEvent
) in the deleted dataset grouping.- Parameters:
listener
- A listener used to receive end-of-dataset events in a deleted dataset grouping.
-
removeRemovedListener
public void removeRemovedListener(DatasetGroupItemRemovedListener listener)
Removed a listener that receives dataset end events (DatasetGroupItemRemovedEvent
) in the deleted dataset grouping.- Parameters:
listener
- A listener used to receive end-of-dataset events in a deleted dataset grouping.
-
addChangedListener
public void addChangedListener(DatasetGroupItemChangedListener listener)
Listeners used to receive dataset grouping, dataset churn end events (DatasetGroupItemChangedEvent
).- Parameters:
listener
- is a listener used to receive events for the end of a dataset change in a dataset grouping.
-
removeChangedListener
public void removeChangedListener(DatasetGroupItemChangedListener listener)
Removed the listener used to receive the dataset grouping dataset churn end event (DatasetGroupItemChangedEvent
).- Parameters:
listener
- is a listener used to receive events for the end of a dataset change in a dataset grouping.
-
-