org.grinvin.list

Class DefaultGraphListModel

Implemented Interfaces:
GraphListModel, List, TypedListModel, GraphList, GraphListElementListener, HasName

public class DefaultGraphListModel
extends ArrayListModel
implements GraphListModel, GraphListElementListener

Default implementation of GraphListModel.

Method Summary

void
add(int index, GraphListElement element)
boolean
add(GraphListElement element)
boolean
addAll(GraphListElement> collection)
boolean
addAll(int index, GraphListElement> collection)
void
addGraphListModelContentsListener(GraphListModelContentsListener listener)
void
addGraphListModelListener(GraphListModelListener listener)
void
clear()
boolean
containsSessionElements()
void
fireGraphListNameChanged()
void
fireInvariantComputed(int index, Invariant invariant)
String
getName()
Get the name of this graph list.
URI
getURI()
Get the uri.
void
graphListElementGraphChanged(GraphListElement element)
void
graphListElementInvariantComputed(GraphListElement element, Invariant invariant)
void
graphListElementNameChanged(GraphListElement element)
void
graphListElementURIChanged(GraphListElement element)
boolean
isDirty()
boolean
remove(Object obj)
GraphListElement
remove(int index)
void
removeGraphListModelListener(GraphListModelListener listener)
protected void
removeRange(int fromIndex, int toIndex)
GraphListElement
set(int index, GraphListElement element)
void
setDirty(boolean dirty)
void
setName(String name)
Set the name of this graph list.
void
setURI(URI uri)
Set the URI of this GraphListElement.

Method Details

add

public void add(int index,
                GraphListElement element)

add

public boolean add(GraphListElement element)

addAll

public boolean addAll(GraphListElement> collection)

addAll

public boolean addAll(int index,
                      GraphListElement> collection)

addGraphListModelContentsListener

public void addGraphListModelContentsListener(GraphListModelContentsListener listener)
Specified by:
addGraphListModelContentsListener in interface GraphListModel

addGraphListModelListener

public void addGraphListModelListener(GraphListModelListener listener)
Specified by:
addGraphListModelListener in interface GraphListModel

clear

public void clear()

containsSessionElements

public boolean containsSessionElements()
Specified by:
containsSessionElements in interface GraphList

fireGraphListNameChanged

public void fireGraphListNameChanged()

fireInvariantComputed

public void fireInvariantComputed(int index,
                                  Invariant invariant)

getName

public String getName()
Get the name of this graph list.
Specified by:
getName in interface HasName
Returns:
the name of the graph list

getURI

public URI getURI()
Get the uri.
Specified by:
getURI in interface GraphList
Returns:
the uri, or null

graphListElementGraphChanged

public void graphListElementGraphChanged(GraphListElement element)
Specified by:
graphListElementGraphChanged in interface GraphListElementListener

graphListElementInvariantComputed

public void graphListElementInvariantComputed(GraphListElement element,
                                              Invariant invariant)
Specified by:
graphListElementInvariantComputed in interface GraphListElementListener

graphListElementNameChanged

public void graphListElementNameChanged(GraphListElement element)
Specified by:
graphListElementNameChanged in interface GraphListElementListener

graphListElementURIChanged

public void graphListElementURIChanged(GraphListElement element)
Specified by:
graphListElementURIChanged in interface GraphListElementListener

isDirty

public boolean isDirty()
Specified by:
isDirty in interface GraphList

remove

public boolean remove(Object obj)

remove

public GraphListElement remove(int index)

removeGraphListModelListener

public void removeGraphListModelListener(GraphListModelListener listener)
Specified by:
removeGraphListModelListener in interface GraphListModel

removeRange

protected void removeRange(int fromIndex,
                           int toIndex)

set

public GraphListElement set(int index,
                            GraphListElement element)

setDirty

public void setDirty(boolean dirty)
Specified by:
setDirty in interface GraphList

setName

public void setName(String name)
Set the name of this graph list.
Specified by:
setName in interface HasName
Parameters:
name - the new name

setURI

public void setURI(URI uri)
Set the URI of this GraphListElement. Use this to set the URI when the bundle has been saved.
Specified by:
setURI in interface GraphList
Parameters:
uri - the URI