|
CDMA client API
3.1.0
CDMA core library
|
The IGroup interface in a IDataset forms a hierarchical tree, like directories on a disk. More...
Public Member Functions | |
| void | addDataItem (IDataItem item) |
| Map< String, String > | harvestMetadata (final String mdStandard) throws IOException |
| IGroup | getParentGroup () |
| IGroup | getRootGroup () |
| void | addOneDimension (IDimension dimension) |
| void | addSubgroup (IGroup group) |
| IDataItem | getDataItem (String shortName) |
| IDataItem | findDataItem (IKey key) |
| IDataItem | getDataItemWithAttribute (String name, String value) |
| IDataItem | findDataItemWithAttribute (IKey key, String name, String attribute) throws NoResultException |
| IGroup | findGroupWithAttribute (IKey key, String name, String value) |
| IDimension | getDimension (String name) |
| IContainer | getContainer (String shortName) |
| IGroup | getGroup (String shortName) |
| IGroup | getGroupWithAttribute (String attributeName, String value) |
| IDataItem | findDataItem (String shortName) |
| List< IDataItem > | getDataItemList () |
| IDataset | getDataset () |
| List< IDimension > | getDimensionList () |
| IGroup | findGroup (String shortName) |
| IGroup | findGroup (IKey key) |
| List< IGroup > | getGroupList () |
| IContainer | findContainer (String shortName) |
| IContainer | findContainerByPath (String path) throws NoResultException |
| List< IContainer > | findAllContainerByPath (String path) throws NoResultException |
| boolean | removeDataItem (IDataItem item) |
| boolean | removeDataItem (String varName) |
| boolean | removeDimension (String name) |
| boolean | removeGroup (IGroup group) |
| boolean | removeGroup (String name) |
| boolean | removeDimension (IDimension dimension) |
| void | updateDataItem (String key, IDataItem dataItem) throws SignalNotAvailableException |
| void | setDictionary (IDictionary dictionary) |
| IDictionary | findDictionary () |
| boolean | isRoot () |
| boolean | isEntry () |
| List< IContainer > | findAllContainers (IKey key) throws NoResultException |
| List< IContainer > | findAllOccurrences (IKey key) throws NoResultException |
| IContainer | findObjectByPath (IPath path) |
| IGroup | clone () |
The IGroup interface in a IDataset forms a hierarchical tree, like directories on a disk.
The IGroup has a name, contains one or mode IDataItem and one or more IGroup. This can have optionally a set of IAttribute objects containing its metadata.
It used to browse the dataset following its physical structure.
| void org.gumtree.data.interfaces.IGroup.addDataItem | ( | IDataItem | item | ) |
Add a data item to the group.
| item | IDataItem object |
| void org.gumtree.data.interfaces.IGroup.addOneDimension | ( | IDimension | dimension | ) |
Add a shared IDimension.
| dimension | CDMA IDimension object |
| void org.gumtree.data.interfaces.IGroup.addSubgroup | ( | IGroup | group | ) |
Add a nested Group.
| group | CDMA IGroup object |
Returns a clone of this IGroup object. The tree structure is new. However the data items are shallow copies that share the same storages with the original ones.
Implements org.gumtree.data.interfaces.IContainer.
| List<IContainer> org.gumtree.data.interfaces.IGroup.findAllContainerByPath | ( | String | path | ) | throws NoResultException |
Get all IContainer by searching the path from the root group. Targeted objects are not necessary to be directly under the current IGroup. Objects can be a IGroups, IDataItems.
| path | full path of objects in String type |
| List<IContainer> org.gumtree.data.interfaces.IGroup.findAllContainers | ( | IKey | key | ) | throws NoResultException |
The CDMA dictionary allows multiple occurrences of a single key. This method finds all the objects referenced by the given key string. If there is an entry wildcard, it will return the objects in the current entry.
| key | Key object |
| List<IContainer> org.gumtree.data.interfaces.IGroup.findAllOccurrences | ( | IKey | key | ) | throws NoResultException |
Find all the occurrences of objects referenced by the first path for the given key in the dictionary. Those occurrences are from the available entries of the root group.
| key | Key object |
| NoResultException |
| IContainer org.gumtree.data.interfaces.IGroup.findContainer | ( | String | shortName | ) |
Find the IContainer by searching the path in the dictionary with the given name. The targeted IContainer is not necessary to be under the current Group. It can be a IGroup or IDataItem. If there are more than one paths associated with the same key word, use the order of their appearance in the dictionary to find the first not null object. If there is an entry wildcard, it will return the object in the current entry.
| shortName | in String type |
| IContainer org.gumtree.data.interfaces.IGroup.findContainerByPath | ( | String | path | ) | throws NoResultException |
Get the IContainer by searching the path in the root group. The target object is not necessary to be under the current IGroup. The Object can be a IGroup or a IDataItem.
| path | full path of the object in String type |
| IDataItem org.gumtree.data.interfaces.IGroup.findDataItem | ( | String | shortName | ) |
Get the IDataItem by searching the path in the dictionary with the given name. The target IDataItem is not necessary to be under the current data item. If there are more than one paths associated with the same key word, use the order of their appearance in the dictionary to find the first not null object. If there is an entry wildcard, it will return the data item in the current entry.
| shortName | in String type |
| IDataItem org.gumtree.data.interfaces.IGroup.findDataItemWithAttribute | ( | IKey | key, |
| String | name, | ||
| String | attribute | ||
| ) | throws NoResultException |
Get the dictionary from the root group.
| IGroup org.gumtree.data.interfaces.IGroup.findGroup | ( | String | shortName | ) |
Get the IGroup by searching the path in the dictionary with the given name. The target Group is not necessary to be under the current Group. If there are more than one paths associated with the key word, find the first not null group in these paths.
| shortName | in String type |
Find the IGroup corresponding to the given key in the dictionary.
| key | entry name of the dictionary |
| IGroup org.gumtree.data.interfaces.IGroup.findGroupWithAttribute | ( | IKey | key, |
| String | name, | ||
| String | value | ||
| ) |
Find the Group corresponding to the given key in the dictionary. The group will be filtered by the attribute's name and value it must have.
| key | key to look for in the dictionary |
| name | name of the attribute the group must have |
| value | the attribute value |
Find the first occurrences of objects referenced by the given path. Those occurrences are from the available entries of the root group.
| path | Path object |
| IContainer org.gumtree.data.interfaces.IGroup.getContainer | ( | String | shortName | ) |
Retrieve the IContainer that has the given short name. The object can be either a group or a data item.
| shortName | as String object |
| IDataItem org.gumtree.data.interfaces.IGroup.getDataItem | ( | String | shortName | ) |
| IDataItem org.gumtree.data.interfaces.IGroup.getDataItemWithAttribute | ( | String | name, |
| String | value | ||
| ) |
Get the Dataset that holds the current Group.
Implements org.gumtree.data.interfaces.IContainer.
| IDimension org.gumtree.data.interfaces.IGroup.getDimension | ( | String | name | ) |
Retrieve a IDimension using its (short) name. If it does not exist in this group, recursively look in parent groups.
| name | dimension's name. |
Get the dimensions contained directly in this group.
| IGroup org.gumtree.data.interfaces.IGroup.getGroup | ( | String | shortName | ) |
| IGroup org.gumtree.data.interfaces.IGroup.getGroupWithAttribute | ( | String | attributeName, |
| String | value | ||
| ) |
Get the IGroup that has the specific attribute, with the name and value given.
| attributeName | String object |
| value | in String type |
Get its parent Group, or null if this is the root group.
Implements org.gumtree.data.interfaces.IContainer.
Get the root group of the IDataset that holds the current Group.
Implements org.gumtree.data.interfaces.IContainer.
| Map<String, String> org.gumtree.data.interfaces.IGroup.harvestMetadata | ( | final String | mdStandard | ) | throws IOException |
| boolean org.gumtree.data.interfaces.IGroup.isEntry | ( | ) |
Check if this is an entry group. Entries are immediate sub-group of the root group.
| boolean org.gumtree.data.interfaces.IGroup.isRoot | ( | ) |
Check if this is the root group.
| boolean org.gumtree.data.interfaces.IGroup.removeDataItem | ( | IDataItem | item | ) |
| boolean org.gumtree.data.interfaces.IGroup.removeDataItem | ( | String | varName | ) |
| boolean org.gumtree.data.interfaces.IGroup.removeDimension | ( | String | name | ) |
Remove a IDimension using its name, in this group only.
| name | Dimension name |
| boolean org.gumtree.data.interfaces.IGroup.removeDimension | ( | IDimension | dimension | ) |
Remove a IDimension from the IDimension list.
| dimension | CDMA IDimension |
| boolean org.gumtree.data.interfaces.IGroup.removeGroup | ( | IGroup | group | ) |
| boolean org.gumtree.data.interfaces.IGroup.removeGroup | ( | String | name | ) |
| void org.gumtree.data.interfaces.IGroup.setDictionary | ( | IDictionary | dictionary | ) |
Set a dictionary to the root group.
| dictionary | the dictionary to set |
| void org.gumtree.data.interfaces.IGroup.updateDataItem | ( | String | key, |
| IDataItem | dataItem | ||
| ) | throws SignalNotAvailableException |
Update the data item in the location labeled by the key with a new data item. If the previous data item labeled by the key doesn't exist, it will put the data item in the location. This will also update the parent reference of the data item to the new one. If the key can not be found in the dictionary, or the parent path referred by the dictionary doesn't exist, raise an exception.
| key | in String type |
| dataItem | IDataItem object |
| SignalNotAvailableException | no signal exception |