org.grinvin.list
Class GraphListElement
java.lang.Object
org.grinvin.list.GraphListElement
- EventListener, GraphBundleListener, HasName
public class GraphListElement
extends java.lang.Object
Represents the elements of a GraphList.
A graph list element combines a graph bundle and a uniform resource
identifier (URI).
Graph list elements cannot be constructed directly but must be created
by the graph list element manager to ensure that no two graph list elements
exist with the same URI.
fireGraphChanged
public void fireGraphChanged()
fireInvariantComputed
public void fireInvariantComputed(Invariant invariant)
fireNameChanged
public void fireNameChanged()
fireURIChanged
public void fireURIChanged()
getBundle
public GraphBundle getBundle()
Return the current GraphBundle, or null if the bundle does not exist.
getInvariant
public InvariantValue getInvariant(Invariant invariant)
Get the requested invariant.
invariant
- the requested invariant
getInvariantLater
public InvariantValue getInvariantLater(Invariant invariant)
Get the requested invariant. Loads the bundle and computes the invariant in the background if not available
invariant
- the requested invariant
getInvariantNow
public InvariantValue getInvariantNow(Invariant invariant)
Get the requested invariant. Loads the bundle and computes the invariant asap if not available
invariant
- the requested invariant
getName
public String getName()
Returns the name of this graph, i.e., the internationalized
property with key graph.name.
- getName in interface HasName
getProperty
public Object getProperty(String property)
Get the requested property. Waits until the bundle is loaded and the property can be returned
property
- the requested property
getURI
public URI getURI()
Get the uri.
gotGraph
public boolean gotGraph()
Check if the bundle contains a graph.
- true if the graph exists, false if not
isDirty
public boolean isDirty()
isNameEditable
public boolean isNameEditable()
Is the name of this graph user editable?
setDirty
public void setDirty(boolean dirty)
setName
public void setName(String name)
Change the name of this graph.
- setName in interface HasName
setURI
public void setURI(URI uri)
Set the URI of this GraphListElement. Use this to set the URI when the
bundle has been saved.
toString
public String toString()