edu.uky.rch.ept.projectexplorer.model
Class Collection

java.lang.Object
  extended byedu.uky.rch.ept.projectexplorer.model.ProjectItem
      extended byedu.uky.rch.ept.projectexplorer.model.Resource
          extended byedu.uky.rch.ept.projectexplorer.model.Collection
All Implemented Interfaces:
IProjectItem

public class Collection
extends Resource

This class represents a collection. A collection can contain a list of subcollections and resources thus allowing a hierarchical structure similar to most file systems.

Author:
sandeep

Constructor Summary
Collection(IProjectItem parent, String name, String address)
          Creates a new collection under the given parent with the specified name and address
Collection(Project parent, String name, String address)
          Creates a new collection under the given project with the specified name and address
 
Method Summary
 Object[] getChildren()
          Returns the children of this item.
 org.eclipse.jface.resource.ImageDescriptor getLabelImage()
          Returns an ImageDescriptor specifying the icon to be used for this item in the UI.
 boolean hasChildren()
          Checks if the item has any children.
 
Methods inherited from class edu.uky.rch.ept.projectexplorer.model.Resource
getAddress, getLabelText, getName
 
Methods inherited from class edu.uky.rch.ept.projectexplorer.model.ProjectItem
getEditorId, getEditorInput, getParent, getProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Collection

public Collection(IProjectItem parent,
                  String name,
                  String address)
Creates a new collection under the given parent with the specified name and address

Parameters:
parent - the parent of the new collection
name - name of the new collection
address - address of the new collection

Collection

public Collection(Project parent,
                  String name,
                  String address)
Creates a new collection under the given project with the specified name and address

Parameters:
parent - the project under which to create the new collection
name - name of the new collection
address - address of the new collection
Method Detail

getLabelImage

public org.eclipse.jface.resource.ImageDescriptor getLabelImage()
Description copied from interface: IProjectItem
Returns an ImageDescriptor specifying the icon to be used for this item in the UI.

Specified by:
getLabelImage in interface IProjectItem
Overrides:
getLabelImage in class Resource

hasChildren

public boolean hasChildren()
Description copied from interface: IProjectItem
Checks if the item has any children.

Specified by:
hasChildren in interface IProjectItem
Overrides:
hasChildren in class Resource

getChildren

public Object[] getChildren()
Description copied from interface: IProjectItem
Returns the children of this item.

Specified by:
getChildren in interface IProjectItem
Overrides:
getChildren in class Resource