|
UML Modeling Layer | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.xtools.uml.msl.internal.resources.LogicalUMLResource
public class LogicalUMLResource
Logical UML resource, comprised of the root resource and a number of fragments. The logical resource might be composed of only one resource, in which case it has only the root resource and no fragments.
| Nested Class Summary | |
|---|---|
protected class |
LogicalUMLResource.ResourceSynchronizer
We want to ensure that only one instance of LogicalUMLResource will modify the resource set at the same time so we create an object to use as a mutex |
| Field Summary | |
|---|---|
protected List<Resource> |
allFragments
A list of all the fragments in the resource at some point in time, this is effectively a synchronized resource and should only be accessed through LogicalUMLResource.getAllFragments() as it is likely to change between calls. |
protected List<Resource> |
loadedFragments
Loaded fragments |
protected LogicalUMLResource.ResourceSynchronizer |
resourceSynchronizer
|
protected Resource |
rootResource
The root resource |
| Constructor Summary | |
|---|---|
protected |
LogicalUMLResource()
Protected constructor for subclass use |
|
LogicalUMLResource(Resource rootResource)
Constructor |
| Method Summary | |
|---|---|
protected void |
addChildrenUnits(LogicalUMLUnit unit)
Adds children units to the specified unit. |
protected void |
addFragement(Resource resource)
Adds fragment to the logical resource. |
void |
addFragments(Resource resource,
List<Resource> resourceList,
boolean includeClosed)
Adds fragments of the specified resource to the resource list. |
boolean |
contains(Resource resource)
Tests if the specified resource is part of this logical resource. |
boolean |
equals(Object obj)
|
List<Resource> |
getAllFragments()
Returns list of all fragments (loaded and unloaded). |
List<Resource> |
getAllLoadedResources()
Returns list of all loaded resources in the logical resource. |
List<Resource> |
getAllResources()
Returns list of all resources (loaded and unloaded) in the logical resource. |
ILogicalUnit |
getHierarchicalStructure()
Builds and returns hierarchical structure of the logical resource. |
ILogicalUMLUnit |
getInternalHierarchicalStructure()
Builds and returns UML hierarchical structure of the logical resource. |
List<Resource> |
getLoadedFragments()
Returns list of loaded fragments. |
List<Resource> |
getModifiedResources()
Returns list of modified resources. |
Resource |
getRootResource()
Returns the root resource. |
int |
hashCode()
|
boolean |
isManaged()
|
boolean |
isModified()
Returns indicator if the logical resource is modified. |
protected void |
removeFragement(Resource resource)
Removes fragment from the logical resource. |
protected void |
reset()
Resets the list of loaded fragments of the logical resource. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final LogicalUMLResource.ResourceSynchronizer resourceSynchronizer
protected Resource rootResource
protected List<Resource> loadedFragments
protected List<Resource> allFragments
LogicalUMLResource.getAllFragments() as it is likely to change between calls. See
LogicalUMLResource.getAllFragments() accessor for details.
| Constructor Detail |
|---|
protected LogicalUMLResource()
public LogicalUMLResource(Resource rootResource)
rootResource - The root resource.| Method Detail |
|---|
public Resource getRootResource()
getRootResource in interface ILogicalResourcepublic List<Resource> getLoadedFragments()
getLoadedFragments in interface ILogicalResourcepublic List<Resource> getAllFragments()
getAllFragments in interface ILogicalResourcepublic List<Resource> getAllResources()
getAllResources in interface ILogicalResourcepublic List<Resource> getAllLoadedResources()
getAllLoadedResources in interface ILogicalResourcepublic List<Resource> getModifiedResources()
getModifiedResources in interface ILogicalResourcepublic boolean isModified()
isModified in interface ILogicalResourcepublic boolean contains(Resource resource)
contains in interface ILogicalResourceresource - The resource to be tested
public void addFragments(Resource resource,
List<Resource> resourceList,
boolean includeClosed)
addFragments in interface ILogicalUMLResourceresource - Resource whose fragments are added to the listresourceList - The resource listincludeClosed - The indicator if the closed resources should be included in
the listprotected void addFragement(Resource resource)
resource - Fragment to be addedprotected void removeFragement(Resource resource)
resource - Fragment to be removedpublic int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)protected void reset()
public ILogicalUnit getHierarchicalStructure()
getHierarchicalStructure in interface ILogicalResourcepublic ILogicalUMLUnit getInternalHierarchicalStructure()
getInternalHierarchicalStructure in interface ILogicalUMLResourceprotected void addChildrenUnits(LogicalUMLUnit unit)
unit - Logical unit whose children are calculatedpublic boolean isManaged()
isManaged in interface ILogicalUMLResourceILogicalUMLResource.isManaged()
|
UML Modeling Layer | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||