|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Dictionary | +--java.util.Hashtable | +--ch.elca.dependency.core.DependencyModel
It's the model in the MVC Design Pattern.
This class contains the filtered graph model as well as the statistic data
and the lists for generating the corresponding views. For every kind of data
there are methods for getting this data to the view.
A set of observers are there for updating all the views attached to this
model. Every time the model is changed by the controller, automatically all
the views registred as an Observer
are updated with the changed
data.
If there are very serious changes performed on the model there is the
possibility for disable the automated update mechanismus. This makes sense
for example at startup when the whole model must be created or when a new
filter is applicated which causes the model to change a lot.
View
,
ch.elca.dependency.rawmodel.RawModel
,
Serialized FormNested Class Summary |
Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
Field Summary | |
protected Perspective[] |
m_perspectives
Available Perspectives. |
protected StatusListenerSupport |
m_statusListenerSupport
Support for StatusListeners. |
static java.lang.String |
MAIN_FRAME_KEY
A key used to store and retrieve the MainFrame. |
Constructor Summary | |
DependencyModel()
Creates a new DependencyModel instance. |
|
DependencyModel(DependencyContext dependencyContext)
Creates a new DependencyModel instance. |
Method Summary | |
void |
add(java.util.ArrayList classInfoList,
java.lang.String pack)
Adds the specified Classinfo to the model. |
void |
add(Edge edge)
Adds the specified Edge to the model. |
void |
add(Node node)
Adds the specified Node to the model. |
void |
attach(Observer observer)
Attaches the observers to the model. |
void |
clearClassInfos()
Clears all the ClassInfo objects in the list of the
DependencyModel . |
void |
clearGraph()
Clears all the Vertices and Edges from the
current DependencyModel . |
void |
clearSelection()
Clears all the selections in all the views. |
void |
create(DependencyContext dependencyContext)
Create this DependencyModel accordingly to the specified DependencyContext. |
void |
detach(Observer observer)
Detaches the observers from the model. |
void |
disableNotification()
Sets the notification flag false. |
void |
enableNotification()
Sets the notification flag true and notifies the observer. |
DependencyContext |
getDependencyContext()
Get the DependencyContext which was used to create this DependencyModel. |
static DependencyModel |
getDependencyModel()
Get an instance of the DependencyModel , which is
an singletong and must be creaated by the means of this method
only. |
java.util.HashMap |
getFilteredClassInfos()
Gets the filtered ClassInfo objects. |
Graph |
getFilteredGraph()
Gets the filtered Graph object. |
Statistic |
getFilteredStatistic()
Gets the filtered Statistic object. |
java.util.HashSet |
getLastSelection()
Gets the list with the last selected packages. |
java.util.ArrayList |
getNodeList()
Get the list of all nodes representing packages in the analyzed project. |
java.util.HashMap |
getPackDepend()
Get all Package dependencies from this DependencyModel. |
Perspective[] |
getPerspectives()
Get all Perspectives specified in a perspectives config file. |
java.io.File |
getProjectRoot()
Get the Project Root. |
java.util.HashMap |
getRawClassInfos()
Get RawClassInfos from this DependencyModel. |
Graph |
getRawGraph()
Get the RawGraph from this DependencyModel. |
RawModel |
getRawModel()
Get the RawModel from this DependencyModel. |
java.util.HashSet |
getRemovedEdges()
Get the Set with the removed Edges . |
java.util.HashMap |
getRemovedNodes()
Get the HashTable with the removed Node . |
boolean |
isCreated()
Is this DependencyModel created already? It might be possible that this DependencyModel is created as an Object, but is not really created. |
void |
notifyObserver()
Iterates over all the observer objects and calls the update method. |
void |
selectPackages(java.util.ArrayList selectList)
Select the same packages in each view. |
void |
setStatusListener(StatusListener statusListener)
Append a StatusListeners to this DependencyModel. |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String MAIN_FRAME_KEY
protected StatusListenerSupport m_statusListenerSupport
protected Perspective[] m_perspectives
Constructor Detail |
public DependencyModel()
DependencyModel
instance. Notice
that altough an DependencyModel instance is created here, the
DependencyModel is not created. Use isCreated() to check,
whether this DependencyModel has really been created.
public DependencyModel(DependencyContext dependencyContext) throws AnalyseException, java.lang.CloneNotSupportedException, java.io.IOException, java.lang.ClassNotFoundException
DependencyModel
instance. The
specified DependencyContext will be used to create this
DependencyModel.
dependencyContext
- a DependencyContext
value
AnalyseException
- if an error occurs
java.lang.CloneNotSupportedException
- if an error occurs
java.io.IOException
- if an error occurs
java.lang.ClassNotFoundException
- if an error occursMethod Detail |
public static DependencyModel getDependencyModel()
DependencyModel
, which is
an singletong and must be creaated by the means of this method
only.
DependencyModel
valuepublic void create(DependencyContext dependencyContext) throws AnalyseException, java.lang.CloneNotSupportedException, java.io.IOException, java.lang.ClassNotFoundException
dependencyContext
- a DependencyContext
value
AnalyseException
- if an error occurs
java.lang.CloneNotSupportedException
- if an error occurs
java.io.IOException
- if an error occurs
java.lang.ClassNotFoundException
- if an error occurspublic boolean isCreated()
true
.
boolean
valuepublic DependencyContext getDependencyContext()
DependencyContext
valuepublic Perspective[] getPerspectives()
Perspective[]
valuepublic void attach(Observer observer)
observer
- Observer
Interface which is implemented by
all the views ofthe DependencyTool.public void detach(Observer observer)
observer
- Observer
Interface which is implemented by
all the views ofthe DependencyTool.public java.util.HashMap getFilteredClassInfos()
ClassInfo
objects.
ClassInfo
objects.public Graph getFilteredGraph()
Graph
object.
Graph
object.public Statistic getFilteredStatistic()
Statistic
object.
Statistic
object.public void selectPackages(java.util.ArrayList selectList)
selectPackages
in interface Selection
selectList
- List containing all the selected packages.public void clearSelection()
clearSelection
in interface Selection
public java.util.HashSet getLastSelection()
HashSet
valuepublic void notifyObserver()
public void disableNotification()
public void enableNotification()
public void clearClassInfos()
ClassInfo
objects in the list of the
DependencyModel
.
public void clearGraph()
Vertices
and Edges
from the
current DependencyModel
.
public void add(java.util.ArrayList classInfoList, java.lang.String pack)
Classinfo
to the model.
classInfoList
- Information object of one class of the project.pack
- a String
valuepublic void add(Node node)
Node
to the model.
node
- Node to be added.public void add(Edge edge)
Edge
to the model.
edge
- Edge to add to the model.public java.util.HashSet getRemovedEdges()
Edges
.
Edge
elements.public java.util.HashMap getRemovedNodes()
HashTable
with the removed Node
.
Node
elements.public void setStatusListener(StatusListener statusListener)
statusListener
- a StatusListener
valuepublic java.util.HashMap getRawClassInfos()
HashMap
valuepublic Graph getRawGraph()
Graph
valuepublic java.util.HashMap getPackDepend()
HashMap
valuepublic java.io.File getProjectRoot()
File
valuepublic java.util.ArrayList getNodeList()
ArrayList
valuepublic RawModel getRawModel()
RawModel
value
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |