CDMA plugin API  3.1.0
CDMA core library
org.gumtree.data.interfaces.IGroup Interface Reference

The IGroup interface in a IDataset forms a hierarchical tree, like directories on a disk. More...

Inheritance diagram for org.gumtree.data.interfaces.IGroup:
org.gumtree.data.interfaces.IContainer

List of all members.

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< IDataItemgetDataItemList ()
IDataset getDataset ()
List< IDimensiongetDimensionList ()
IGroup findGroup (String shortName)
IGroup findGroup (IKey key)
List< IGroupgetGroupList ()
IContainer findContainer (String shortName)
IContainer findContainerByPath (String path) throws NoResultException
List< IContainerfindAllContainerByPath (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< IContainerfindAllContainers (IKey key) throws NoResultException
List< IContainerfindAllOccurrences (IKey key) throws NoResultException
IContainer findObjectByPath (IPath path)
IGroup clone ()

Detailed Description

The IGroup interface in a IDataset forms a hierarchical tree, like directories on a disk.

Note:
When developing a plug-in consider using the data format engine's implementation. You should redefine this interface implementation, only in case of very specific needs.

pluginAPI 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.

Author:
nxi

Member Function Documentation

Add a data item to the group.

Parameters:
itemIDataItem object

Add a shared IDimension.

Parameters:
dimensionCDMA IDimension object

Add a nested Group.

Parameters:
groupCDMA 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.

Returns:
new IGroup CDMA group object

Implements org.gumtree.data.interfaces.IContainer.

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.

Parameters:
pathfull path of objects in String type
Returns:
a list of CDMA IContainer

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.

Parameters:
keyKey object
Returns:
a list of CDMA IContainer

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.

Parameters:
keyKey object
Returns:
a list of CDMA IContainer
Exceptions:
NoResultException

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.

Parameters:
shortNamein String type
Returns:
IContainer

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.

Parameters:
pathfull path of the object in String type
Returns:
IContainer

Find the IDataItem corresponding to the given key in the dictionary.

Parameters:
keyentry name of the dictionary
Returns:
the first encountered IDataItem that match the key

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.

Parameters:
shortNamein String type
Returns:
CDMA IDataItem

Find the IDataItem corresponding to the given key in the dictionary. The data item will be filtered by the attribute's name and value it must have.

Parameters:
keykey to look for in the dictionary
namename of the attribute the key should have
valuethe attribute value
Returns:
IDataItem object

Get the dictionary from the root group.

Returns:
IDictionary object

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.

Parameters:
shortNamein String type
Returns:
CDMA Group

Find the IGroup corresponding to the given key in the dictionary.

Parameters:
keyentry 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.

Parameters:
keykey to look for in the dictionary
namename of the attribute the group must have
valuethe attribute value

Find the first occurrences of objects referenced by the given path. Those occurrences are from the available entries of the root group.

Parameters:
pathPath object
Returns:
IContainer

Retrieve the IContainer that has the given short name. The object can be either a group or a data item.

Parameters:
shortNameas String object
Returns:
CDMA group or data item

Get the IDataItem with the specified (short) name in this group.

Parameters:
shortNameshort name of IDataItem within this group.
Returns:
the IDataItem, or null if not found

Get a list of IDataItem contained directly in this group.

Returns:
List of type IDataItem; may be empty, not null.

Find the IDataItem that has the specific attribute, with given name and value.

Parameters:
namein String type
valuein String type
Returns:
IDataItem object

Get the Dataset that holds the current Group.

Returns:
CDMA IDataset

Implements org.gumtree.data.interfaces.IContainer.

Retrieve a IDimension using its (short) name. If it does not exist in this group, recursively look in parent groups.

Parameters:
namedimension's name.
Returns:
the dimension, or null if not found

Get the dimensions contained directly in this group.

Returns:
List of IDimension; may be empty, not null.

Get the IGroup with the specified (short) name as a sub-group of the current group.

Parameters:
shortNameshort name of the nested group you are looking for.
Returns:
the IGroup, or null if not found

Get a list of IGroup contained directly in this Group.

Returns:
List of IGroup; may be empty, not null.
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.

Parameters:
attributeNameString object
valuein String type
Returns:
Group object

Get its parent Group, or null if this is the root group.

Returns:
CDMA group object

Implements org.gumtree.data.interfaces.IContainer.

Get the root group of the IDataset that holds the current Group.

Returns:
CDMA Group

Implements org.gumtree.data.interfaces.IContainer.

Map<String, String> org.gumtree.data.interfaces.IGroup.harvestMetadata ( final String  mdStandard) throws IOException

Check if this is an entry group. Entries are immediate sub-group of the root group.

Returns:
true or false

Check if this is the root group.

Returns:
true or false

Remove a IDataItem from this IGroup children list.

Parameters:
itemIDataItem to be removed
Returns:
boolean true if item has been removed

Remove a IDataItem using its (short) name, in this group only.

Parameters:
varNameVariable name.
Returns:
true if IDataItem has been found and removed

Remove a IDimension using its name, in this group only.

Parameters:
nameDimension name
Returns:
true if dimension has been found and removed

Remove a IDimension from the IDimension list.

Parameters:
dimensionCDMA IDimension
Returns:
boolean true if IDimension has been found and removed CDMA

Remove a IGroup from the sub Group list.

Parameters:
groupCDMA IGroup
Returns:
boolean true if IGroup has been found and removed

Remove the IGroup with a certain name in the children list.

Parameters:
namein String type
Returns:
boolean true if IGroup has been found and removed

Set a dictionary to the root group.

Parameters:
dictionarythe dictionary to set

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.

Parameters:
keyin String type
dataItemIDataItem object
Exceptions:
SignalNotAvailableExceptionno signal exception

The documentation for this interface was generated from the following file:
 All Classes Namespaces Files Functions Variables