|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IUCElement
This is a basic interface for all objects in the model: project, requirements folder, templates folder, screens folder, use cases, steps, etc. The interface provides basic tree structure of elements (parent, child elements), Visitor pattern entry (accept, childrenAccept) etc.
Method Summary | |
---|---|
void |
accept(IUCElementVisitor visitor,
java.lang.Object data)
Invokes IUCElementVisitor.visit(IUCElement, Object) method giving this as the first parameter, and data as
second parameter. |
void |
childrenAccept(IUCElementVisitor visitor,
java.lang.Object object)
Invokes the accept(IUCElementVisitor, Object) method for
all direct children (@link IUCElement.getChildren()), giving
object as a second parameter. |
boolean |
exists()
Determines if the underlying resource for the element exists. |
IUCElement |
getAncestor(org.ucworkbench.model.UCElementType ancestorType)
Returns the nearest parent object in the hierarchy of the type given as a parameter. |
java.util.Collection<IUCElement> |
getChildren()
Returns the collection of all children objects in the model. |
IResource |
getCorrespondingResource()
Returns the resource that corresponds directly to this element, or null if there is no resource that corresponds to this
element. |
java.lang.String |
getElementName()
Returns the name of this element. |
org.ucworkbench.model.UCElementType |
getElementType()
Returns this element's kind encoded as an integer. |
IUCElement |
getParent()
Returns the element directly containing this element, or null if this element has no parent. |
IPath |
getPath()
Returns the path to the innermost resource enclosing this element. |
IUCProject |
getUCProject()
Returns the UC project this element is contained in, or null
if this element is not contained in any UC project (for instance, the
IUseCase is not contained in any UC project). |
IResource |
getUnderlyingResource()
Returns the smallest underlying resource that contains this element, or null if this element is not contained in a resource. |
Method Detail |
---|
void accept(IUCElementVisitor visitor, java.lang.Object data)
this
as the first parameter, and data
as
second parameter. If recursive execution is needed, you have to call
childrenAccept
in the visit
method.
visitor
- data
- void childrenAccept(IUCElementVisitor visitor, java.lang.Object object)
accept(IUCElementVisitor, Object)
method for
all direct children (@link IUCElement.getChildren()), giving
object
as a second parameter.
visitor
- object
- java.util.Collection<IUCElement> getChildren()
IUCElement
elements of direct
children of the current model element.IUCElement getParent()
null
if this element has no parent. This is a handle-only
method.
null
if this element has no
parentIUCElement getAncestor(org.ucworkbench.model.UCElementType ancestorType)
ancestorType
- the desired type of parent object
null
if no
such parent object existsIUCProject getUCProject()
null
if this element is not contained in any UC project (for instance, the
IUseCase
is not contained in any UC project). This is a
handle-only method.
null
if this element
is not contained in a UC projectboolean exists()
true
if the underlying resource existsIResource getCorrespondingResource()
null
if there is no resource that corresponds to this
element.
For example, the corresponding resource for an UseCase
is
its underlying IFile
. There are no corresponding
resources for IStep
, IExtension
, etc.
null
if none
org.ucworkbench.UCWorkbenchException
- if this element does not exist or if an exception occurs
while accessing its corresponding resourcejava.lang.String getElementName()
org.ucworkbench.model.UCElementType getElementType()
IUCElement
IUCElement
IPath getPath()
IResource getUnderlyingResource()
null
if this element is not contained in a resource.
null
if none
org.ucworkbench.UCWorkbenchException
- if this element does not exist or if an exception occurs
while accessing its underlying resource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |