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

java.lang.Object
  extended byedu.uky.rch.ept.projectexplorer.model.ProjectItem
      extended byedu.uky.rch.ept.projectexplorer.model.Resource
All Implemented Interfaces:
IProjectItem
Direct Known Subclasses:
Collection, ScanResource

public class Resource
extends ProjectItem

Workspace analog of the file system filedescriptor. Resources are identified by their path they refer to which is similar to a URI, the name of a resource is the last segment of its path.

Author:
sandeep

Constructor Summary
Resource(IProjectItem parent, String name, String address)
          Creates a new resource with the given project item as the parent and the specified name and address.
Resource(Project parent, String name, String address)
          Creates a new Resource with the given project as the parent and the specified name and address.
 
Method Summary
 String getAddress()
          Returns the address of this resource
 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.
 String getLabelText()
          Returns the label to be used for this item in the UI.
 String getName()
          Returns the name of this resource
 boolean hasChildren()
          Checks if the item has any children.
 
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

Resource

public Resource(IProjectItem parent,
                String name,
                String address)
Creates a new resource with the given project item as the parent and the specified name and address.

Parameters:
parent - project Item
name - name of the new resource
address - address of the new resource

Resource

public Resource(Project parent,
                String name,
                String address)
Creates a new Resource with the given project as the parent and the specified name and address.

Parameters:
parent - project
name - name of the new resource
address - address of the new resource
Method Detail

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 ProjectItem

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 ProjectItem

getLabelText

public String getLabelText()
Description copied from interface: IProjectItem
Returns the label to be used for this item in the UI.

Specified by:
getLabelText in interface IProjectItem
Specified by:
getLabelText in class ProjectItem

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 ProjectItem

getAddress

public String getAddress()
Returns the address of this resource

Returns:
address

getName

public String getName()
Returns the name of this resource

Returns:
name