de.uni_paderborn.fujaba.asg
Class ASGDiagram

java.lang.Object
  extended byde.uni_paderborn.fujaba.basic.BasicIncrement
      extended byde.uni_paderborn.fujaba.asg.ASGElement
          extended byde.uni_paderborn.fujaba.asg.ASGDiagram
All Implemented Interfaces:
java.lang.Comparable, FDiagram, FElement, de.uni_kassel.prop.InspectionAware, LogicUnparseInterface, de.tu_bs.coobra.ObjectChangeAware, de.upb.tools.pcs.PropertyChangeClient, de.upb.tools.pcs.PropertyChangeInterface, UniqueIdentifier
Direct Known Subclasses:
UMLDiagram

public abstract class ASGDiagram
extends ASGElement
implements FDiagram

Associations

             0..1   hasCurrentDiagram   0..1
 ASGProject --------------------------------- ASGDiagram
             currentProject   currentDiagram
 

Version:
$Revision: 1.33 $ $Date: 2005/02/14 14:28:03 $
Author:
$Author: cschneid $

Nested Class Summary
 
Nested classes inherited from class de.uni_paderborn.fujaba.asg.ASGElement
ASGElement.SortByNameComparator
 
Field Summary
private  ASGProject currentProject
           0..1 hasCurrentDiagram 0..1 ASGProject --------------------------------- ASGDiagram currentProject currentDiagram
private  de.upb.tools.fca.FPropHashSet elements
          List of all contained diagram items and its manipulating methods The FHashSet returns the containted items in order of adding.
static java.lang.String ELEMENTS_PROPERTY_KEY
          No comment provided by developer, please add a comment to improve documentation.
private  ASGProject project
          the project role of the diagram.
static java.lang.String PROJECT_PROPERTY
          property change event name for property attribute
private  ASGUtility utility
           0..1 utility 1 ASGUtility ---------------------- ASGDiagram utility diagram
 
Fields inherited from class de.uni_paderborn.fujaba.asg.ASGElement
 
Fields inherited from class de.uni_paderborn.fujaba.basic.BasicIncrement
dontUseAccessMethodsInThisClass
 
Fields inherited from interface de.uni_paderborn.fujaba.metamodel.FDiagram
ELEMENTS_PROPERTY
 
Fields inherited from interface de.uni_paderborn.fujaba.metamodel.FElement
ANNOTATIONS_PROPERTY, DIAGRAMS_PROPERTY, ELEMENT_REFERENCES_PROPERTY, GENERATED_PROPERTY, NAME_PROPERTY, TEXT_PROPERTY
 
Constructor Summary
  ASGDiagram()
          Constructor for class ASGDiagram
protected ASGDiagram(boolean coobraPersistent)
          Constructor for class ASGDiagram
 
Method Summary
 boolean addToElements(FElement element)
          add an ASGEelement to the elements attribute
 void addToElements(java.util.Map.Entry entry)
          Access method for an one to n association.
 void delete()
          Deletes the diagram from the project.
 ASGProject getCurrentProject()
           
protected  java.lang.String getElementKey()
          Deprecated. the virtual items attribute will be removed - use elements instead
 FElement getParentElement()
          Query the logical parent of this element (e.g. package of a class, diagram of an object).
 ASGProject getProject()
          Get the project attribute of the UMLDiagram object
 ASGUtility getUtility()
          Get the utility attribute of the ASGDiagram object
 boolean hasInElements(FElement element)
           
 java.util.Iterator iteratorOfElements()
           
 void removeAllFromElements()
          clear elements attribute
 boolean removeFromElements(FElement element)
          remove an ASGElement from the elements attribute
 void removeYou()
          remove all references to other objects
 ASGElement searchID(java.lang.String id)
          Searches the ASG tree for a given id
 boolean setCurrentProject(ASGProject value)
           
 void setProject(ASGProject project)
          Sets the project attribute of the UMLDiagram object
 boolean setUtility(ASGUtility value)
          Sets the utility attribute of the ASGDiagram object
 int sizeOfElements()
           
 
Methods inherited from class de.uni_paderborn.fujaba.asg.ASGElement
acknowledgeChange, addAdditionalListener, addPointToUnparseInformation, addPropertyChangeListener, addPropertyChangeListener, addToAnnotations, addToDiagrams, addToElementReferences, addToElementReferences, addToFsaObjects, addToLocations, addToLocations, addToPropertyChangeListeners, addToPropertyChangeListeners, addToUnparseInformations, addToUnparseInformations, addToUserMessages, createUnparseModuleName, deleteTokens, elementsOfDiagrams, entriesOfElementReferences, entriesOfFsaObjects, entriesOfUnparseInformations, fireEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCoObRAId, getFirstFromFSAObjects, getFirstOOGenToken, getFromElementReferences, getFromFElementReferences, getFromFsaObjects, getFromUnparseInformations, getFSAInterface, getLastModified, getLastOOGenToken, getName, getPointFromUnparseInformation, getPropertyChangeSupport, getRepository, getText, getTransientElements, getUnparseModuleName, getUnparseModuleNameImpl, hasInAnnotations, hasInDiagrams, hasInElementReferences, hasInElementReferences, hasInFsaObjects, hasKeyInElementReferences, hasKeyInFsaObjects, initPersistency, isCoobraPersistent, isInspectableField, isInTransientMode, isReadOnly, iteratorOfAnnotations, iteratorOfDiagrams, iteratorOfElementReferences, iteratorOfFsaObjects, iteratorOfKeyFromUnparseInformations, iteratorOfUnparseInformations, iteratorOfUserMessages, keysOfElementReferences, keysOfFsaObjects, keysOfUnparseInformations, proposeFieldValues, removeAdditionalListener, removeAllFromAnnotations, removeAllFromDiagrams, removeAllFromElementReferences, removeAllFromFsaObjects, removeAllFromUnparseInformations, removeAllFromUserMessages, removeFromAnnotations, removeFromDiagrams, removeFromElementReferences, removeFromElementReferences, removeFromFsaObjects, removeFromPropertyChangeListeners, removeFromPropertyChangeListeners, removeFromUnparseInformations, removeFromUnparseInformations, removeFromUnparseInformations, removeFromUserMessages, removeKeyFromElementReferences, removeKeyFromFsaObjects, removePropertyChangeListener, removePropertyChangeListener, saveFSAProperties, saveLocations, setCoObRAId, setCutCopyPasteParent, setFirstOOGenToken, setGenerated, setInTransientMode, setLastOOGenToken, setName, setRepository, setUnparseModuleName, sizeOfAnnotations, sizeOfDiagrams, sizeOfElementReferences, sizeOfFsaObjects, sizeOfUserMessages, updateFSACollapsed, updateFSALocation, updateKeyInFsaObjects, writeAttributes
 
Methods inherited from class de.uni_paderborn.fujaba.basic.BasicIncrement
compareTo, getID, getUniqueID, getUniqueID, isGenerated, lessUniqueId, readAttributes, readAttributes, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, resetClassInfos, resetFieldWriteMethods, setAttribValue, setAttribValue, setID, setUniqueId, writeClassToStringBuffer, writeClassToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.uni_paderborn.fujaba.metamodel.FElement
addToAnnotations, addToDiagrams, addToElementReferences, addToElementReferences, addToUserMessages, deleteTokens, entriesOfElementReferences, getFirstOOGenToken, getFromFElementReferences, getLastOOGenToken, getName, getText, hasInAnnotations, hasInDiagrams, hasInElementReferences, hasInElementReferences, hasKeyInElementReferences, isCoobraPersistent, isGenerated, iteratorOfAnnotations, iteratorOfDiagrams, iteratorOfElementReferences, iteratorOfUserMessages, keysOfElementReferences, removeAllFromAnnotations, removeAllFromDiagrams, removeAllFromElementReferences, removeAllFromUserMessages, removeFromAnnotations, removeFromDiagrams, removeFromElementReferences, removeFromElementReferences, removeFromUserMessages, removeKeyFromElementReferences, setCutCopyPasteParent, setFirstOOGenToken, setGenerated, setLastOOGenToken, setName, sizeOfAnnotations, sizeOfDiagrams, sizeOfElementReferences, sizeOfUserMessages
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface de.uni_paderborn.fujaba.basic.UniqueIdentifier
getID
 
Methods inherited from interface de.uni_paderborn.fujaba.fsa.unparse.LogicUnparseInterface
getFSAInterface, getUnparseModuleName
 
Methods inherited from interface de.upb.tools.pcs.PropertyChangeInterface
getPropertyChangeSupport
 
Methods inherited from interface de.upb.tools.pcs.PropertyChangeClient
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface de.tu_bs.coobra.ObjectChangeAware
acknowledgeChange, getCoObRAId, getRepository, setCoObRAId, setRepository
 
Methods inherited from interface de.uni_kassel.prop.InspectionAware
isInspectableField, proposeFieldValues
 

Field Detail

PROJECT_PROPERTY

public static final java.lang.String PROJECT_PROPERTY
property change event name for property attribute

See Also:
Constant Field Values

ELEMENTS_PROPERTY_KEY

public static final java.lang.String ELEMENTS_PROPERTY_KEY
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

elements

private de.upb.tools.fca.FPropHashSet elements
List of all contained diagram items and its manipulating methods The FHashSet returns the containted items in order of adding.


project

private ASGProject project
the project role of the diagram.


currentProject

private transient ASGProject currentProject
             0..1   hasCurrentDiagram   0..1
 ASGProject --------------------------------- ASGDiagram
             currentProject   currentDiagram
 


utility

private ASGUtility utility
             0..1    utility    1
 ASGUtility ---------------------- ASGDiagram
             utility      diagram
 

Constructor Detail

ASGDiagram

public ASGDiagram()
Constructor for class ASGDiagram


ASGDiagram

protected ASGDiagram(boolean coobraPersistent)
Constructor for class ASGDiagram

Parameters:
coobraPersistent - No description provided
Method Detail

searchID

public ASGElement searchID(java.lang.String id)
Searches the ASG tree for a given id

Overrides:
searchID in class ASGElement
Parameters:
id - The id to search for.
Returns:
The Element with the given id, null if not found.

sizeOfElements

public int sizeOfElements()
Specified by:
sizeOfElements in interface FDiagram
Returns:
number of elements contained in this diagram

hasInElements

public boolean hasInElements(FElement element)
Specified by:
hasInElements in interface FDiagram
Parameters:
element - ASGElement of interest
Returns:
true when element is in elements attribute

iteratorOfElements

public java.util.Iterator iteratorOfElements()
Specified by:
iteratorOfElements in interface FDiagram
Returns:
iterator through elements (only ASGElements)

addToElements

public boolean addToElements(FElement element)
add an ASGEelement to the elements attribute

Specified by:
addToElements in interface FDiagram
Parameters:
element - ASGElement to be added
Returns:
true when element has been newly added

addToElements

public void addToElements(java.util.Map.Entry entry)
Description copied from interface: FDiagram
Access method for an one to n association.

Specified by:
addToElements in interface FDiagram
Parameters:
entry - The object added.

removeFromElements

public boolean removeFromElements(FElement element)
remove an ASGElement from the elements attribute

Specified by:
removeFromElements in interface FDiagram
Parameters:
element - what to remove
Returns:
true when element was removed (had in elements)

removeAllFromElements

public void removeAllFromElements()
clear elements attribute

Specified by:
removeAllFromElements in interface FDiagram

getProject

public ASGProject getProject()
Get the project attribute of the UMLDiagram object

Returns:
The project value

setProject

public void setProject(ASGProject project)
Sets the project attribute of the UMLDiagram object

Parameters:
project - The new project value

setCurrentProject

public boolean setCurrentProject(ASGProject value)
Parameters:
value - The new currentProject value
Returns:
true when project was set
See Also:
currentProject

getCurrentProject

public ASGProject getCurrentProject()
Returns:
The currentProject value
See Also:
currentProject

removeYou

public void removeYou()
remove all references to other objects

Specified by:
removeYou in interface FElement
Overrides:
removeYou in class ASGElement

getParentElement

public FElement getParentElement()
Query the logical parent of this element (e.g. package of a class, diagram of an object).

Specified by:
getParentElement in interface FElement
Overrides:
getParentElement in class ASGElement
Returns:
the logical parent of this element;

getElementKey

protected java.lang.String getElementKey()
Deprecated. the virtual items attribute will be removed - use elements instead

Get the elementKey for the elements attribute

Returns:
"items"

setUtility

public boolean setUtility(ASGUtility value)
Sets the utility attribute of the ASGDiagram object

Parameters:
value - The new utility value
Returns:
true when utility was changed

getUtility

public ASGUtility getUtility()
Get the utility attribute of the ASGDiagram object

Returns:
The utility value

delete

public void delete()
Deletes the diagram from the project. This method is called by Delete is not implemented for ASGDiagram, sub classes may override it to enable diagram deletion!

See Also:
DeleteDiagramAction