public class MergingGraphProvider extends Object implements GraphProvider, VertexListener, EdgeListener, ProviderManager.ProviderListener
| Modifier and Type | Field and Description |
|---|---|
static GraphProvider |
NULL_PROVIDER |
| Constructor and Description |
|---|
MergingGraphProvider(ProviderManager providerManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdgeListener(EdgeListener edgeListener) |
protected void |
addEdgeProvider(EdgeProvider edgeProvider) |
void |
addEdges(Edge... edges) |
Vertex |
addGroup(String label,
String iconKey)
TODO Is this going to work properly?
|
Vertex |
addVertex(int x,
int y)
TODO Is this going to work properly?
|
void |
addVertexListener(VertexListener vertexListener) |
protected void |
addVertexProvider(VertexProvider vertexProvider) |
void |
addVertices(Vertex... vertices) |
void |
clearEdges() |
void |
clearVertices() |
Edge |
connectVertices(VertexRef sourceVertextId,
VertexRef targetVertextId)
TODO Is this going to work properly?
|
boolean |
containsVertexId(String id) |
boolean |
containsVertexId(VertexRef id,
Criteria... criteria) |
boolean |
contributesTo(ContentType type)
Allows the
GraphProvider to define if it
contributes to a certain ContentType. |
boolean |
contributesTo(String namespace)
This boolean returns true if the vertices in this provider are intended
to contribute to or overlay another namespace
|
void |
edgeProviderAdded(EdgeProvider oldProvider,
EdgeProvider newProvider) |
void |
edgeProviderRemoved(EdgeProvider removedProvider) |
void |
edgeSetChanged(EdgeProvider provider) |
void |
edgeSetChanged(EdgeProvider provider,
Collection<? extends Edge> added,
Collection<? extends Edge> updated,
Collection<String> removedEdgeIds) |
protected List<? extends Edge> |
filteredEdges(EdgeProvider edgeProvider,
Criteria[] criteria,
boolean returnAllOnNullFilter) |
protected List<? extends Vertex> |
filteredVertices(VertexProvider vertexProvider,
Criteria[] criteria,
boolean returnAllOnNullFilter) |
protected void |
fireEdgeChanged() |
protected void |
fireVertexChanged() |
protected GraphProvider |
getBaseGraphProvider() |
List<Vertex> |
getChildren(VertexRef group,
Criteria... criteria) |
Criteria |
getDefaultCriteria() |
Edge |
getEdge(EdgeRef reference) |
Edge |
getEdge(String namespace,
String id) |
EdgeRef[] |
getEdgeIdsForVertex(VertexRef vertex)
TODO This will miss edges provided by auxiliary edge providers
|
Map<VertexRef,Set<EdgeRef>> |
getEdgeIdsForVertices(VertexRef... vertices)
TODO This will miss edges provided by auxiliary edge providers
|
String |
getEdgeNamespace()
A string used to identify references belonging to this provider
May only container characters that make for a reasonable java identifier
such as letters digits and underscore (no colons, periods, commans etc.)
|
protected EdgeProvider |
getEdgeProvider(EdgeRef edgeRef) |
protected EdgeProvider |
getEdgeProvider(String namespace) |
List<Edge> |
getEdges(Collection<? extends EdgeRef> references)
Return an immutable list of all edges that match this set of references.
|
List<Edge> |
getEdges(Criteria... criteria)
Return an immutable list of edges that match the criteria.
|
MetaInfo |
getMetaInfo() |
Vertex |
getParent(VertexRef vertex) |
List<Vertex> |
getRootGroup() |
SelectionChangedListener.Selection |
getSelection(List<VertexRef> selectedVertices,
ContentType type)
Converts the provided
selectedVertices to a Selection. |
int |
getSemanticZoomLevel(VertexRef vertex) |
Vertex |
getVertex(String namespace,
String id) |
Vertex |
getVertex(VertexRef reference,
Criteria... criteria) |
String |
getVertexNamespace()
A string used to identify references belonging to this provider
May only contain characters that make for a reasonable Java identifier
such as letters digits and underscore (no colons, periods, commas etc.)
|
protected VertexProvider |
getVertexProvider(String namespace) |
protected VertexProvider |
getVertexProvider(VertexRef vertexRef) |
int |
getVertexTotalCount() |
List<Vertex> |
getVertices(Collection<? extends VertexRef> references,
Criteria... criteria) |
List<Vertex> |
getVertices(Criteria... criteria)
Return an immutable list of vertices that match the criteria.
|
boolean |
groupingSupported()
TODO Is this going to work properly?
|
boolean |
hasChildren(VertexRef group) |
void |
load(String filename) |
void |
refresh() |
void |
removeEdgeListener(EdgeListener edgeListener) |
protected void |
removeEdgeProvider(EdgeProvider edgeProvider) |
void |
removeEdges(EdgeRef... edges) |
void |
removeVertex(VertexRef... vertexId) |
void |
removeVertexListener(VertexListener vertexListener) |
protected void |
removeVertexProvider(VertexProvider vertexProvider) |
void |
resetContainer() |
void |
save() |
protected void |
setBaseGraphProvider(GraphProvider baseGraphProvider) |
boolean |
setParent(VertexRef vertexId,
VertexRef parentId)
This function will always delegate to the base graph provider.
|
void |
vertexProviderAdded(VertexProvider oldProvider,
VertexProvider newProvider) |
void |
vertexProviderRemoved(VertexProvider removedProvider) |
void |
vertexSetChanged(VertexProvider provider) |
void |
vertexSetChanged(VertexProvider provider,
Collection<? extends Vertex> added,
Collection<? extends Vertex> update,
Collection<String> removedVertexIds) |
public static final GraphProvider NULL_PROVIDER
public MergingGraphProvider(ProviderManager providerManager)
public String getVertexNamespace()
VertexProvidergetVertexNamespace in interface VertexProviderpublic String getEdgeNamespace()
EdgeProvidergetEdgeNamespace in interface EdgeProviderpublic boolean contributesTo(String namespace)
VertexProvidercontributesTo in interface EdgeProvidercontributesTo in interface VertexProvidernamespace - the namespace of a providerprotected GraphProvider getBaseGraphProvider()
protected void setBaseGraphProvider(GraphProvider baseGraphProvider)
protected void addVertexProvider(VertexProvider vertexProvider)
protected void removeVertexProvider(VertexProvider vertexProvider)
protected void addEdgeProvider(EdgeProvider edgeProvider)
protected void removeEdgeProvider(EdgeProvider edgeProvider)
protected VertexProvider getVertexProvider(String namespace)
protected VertexProvider getVertexProvider(VertexRef vertexRef)
protected EdgeProvider getEdgeProvider(EdgeRef edgeRef)
protected EdgeProvider getEdgeProvider(String namespace)
public Vertex getVertex(String namespace, String id)
getVertex in interface VertexProviderpublic Vertex getVertex(VertexRef reference, Criteria... criteria)
getVertex in interface VertexProviderpublic int getSemanticZoomLevel(VertexRef vertex)
getSemanticZoomLevel in interface VertexProviderpublic List<Vertex> getVertices(Criteria... criteria)
VertexProvidergetVertices in interface VertexProviderprotected List<? extends Vertex> filteredVertices(VertexProvider vertexProvider, Criteria[] criteria, boolean returnAllOnNullFilter)
public List<Vertex> getVertices(Collection<? extends VertexRef> references, Criteria... criteria)
getVertices in interface VertexProviderpublic List<Vertex> getRootGroup()
getRootGroup in interface VertexProviderpublic boolean hasChildren(VertexRef group)
hasChildren in interface VertexProviderpublic Vertex getParent(VertexRef vertex)
getParent in interface VertexProviderpublic List<Vertex> getChildren(VertexRef group, Criteria... criteria)
getChildren in interface VertexProviderpublic Edge getEdge(String namespace, String id)
getEdge in interface EdgeProviderpublic Edge getEdge(EdgeRef reference)
getEdge in interface EdgeProviderpublic List<Edge> getEdges(Criteria... criteria)
EdgeProvidergetEdges in interface EdgeProviderprotected List<? extends Edge> filteredEdges(EdgeProvider edgeProvider, Criteria[] criteria, boolean returnAllOnNullFilter)
public List<Edge> getEdges(Collection<? extends EdgeRef> references)
EdgeProvidergetEdges in interface EdgeProviderpublic void clearEdges()
clearEdges in interface EdgeProviderpublic void addEdges(Edge... edges)
addEdges in interface GraphProviderpublic boolean groupingSupported()
groupingSupported in interface GraphProviderpublic Vertex addGroup(String label, String iconKey)
addGroup in interface GraphProviderpublic Vertex addVertex(int x, int y)
addVertex in interface GraphProviderpublic void addVertices(Vertex... vertices)
addVertices in interface GraphProviderpublic Edge connectVertices(VertexRef sourceVertextId, VertexRef targetVertextId)
connectVertices in interface GraphProviderpublic Criteria getDefaultCriteria()
getDefaultCriteria in interface GraphProviderpublic EdgeRef[] getEdgeIdsForVertex(VertexRef vertex)
getEdgeIdsForVertex in interface GraphProviderpublic Map<VertexRef,Set<EdgeRef>> getEdgeIdsForVertices(VertexRef... vertices)
getEdgeIdsForVertices in interface GraphProviderpublic void load(String filename)
load in interface GraphProviderpublic void refresh()
refresh in interface GraphProviderpublic void removeEdges(EdgeRef... edges)
removeEdges in interface GraphProviderpublic void removeVertex(VertexRef... vertexId)
removeVertex in interface GraphProviderpublic void resetContainer()
resetContainer in interface GraphProviderpublic void save()
save in interface GraphProviderpublic boolean setParent(VertexRef vertexId, VertexRef parentId)
setParent in interface VertexProviderpublic void clearVertices()
clearVertices in interface VertexProviderpublic int getVertexTotalCount()
getVertexTotalCount in interface VertexProviderpublic boolean containsVertexId(String id)
containsVertexId in interface VertexProviderpublic boolean containsVertexId(VertexRef id, Criteria... criteria)
containsVertexId in interface VertexProviderprotected void fireVertexChanged()
public void vertexSetChanged(VertexProvider provider)
vertexSetChanged in interface VertexListenerpublic void vertexSetChanged(VertexProvider provider, Collection<? extends Vertex> added, Collection<? extends Vertex> update, Collection<String> removedVertexIds)
vertexSetChanged in interface VertexListenerpublic void addVertexListener(VertexListener vertexListener)
addVertexListener in interface VertexProviderpublic void removeVertexListener(VertexListener vertexListener)
removeVertexListener in interface VertexProviderprotected void fireEdgeChanged()
public void edgeSetChanged(EdgeProvider provider)
edgeSetChanged in interface EdgeListenerpublic void edgeSetChanged(EdgeProvider provider, Collection<? extends Edge> added, Collection<? extends Edge> updated, Collection<String> removedEdgeIds)
edgeSetChanged in interface EdgeListenerpublic void addEdgeListener(EdgeListener edgeListener)
addEdgeListener in interface EdgeProviderpublic void removeEdgeListener(EdgeListener edgeListener)
removeEdgeListener in interface EdgeProviderpublic SelectionChangedListener.Selection getSelection(List<VertexRef> selectedVertices, ContentType type)
SelectionAwareselectedVertices to a Selection.
The provided type represents the according browser table.
This method is only invoked if SelectionAware.contributesTo(ContentType) returns to for the provided typegetSelection in interface SelectionAwareselectedVertices - The vertices currently selected in the Topology UI.type - The type to filter for. Represents the according browser table.SelectionChangedListener.Selectionpublic boolean contributesTo(ContentType type)
SelectionAwareGraphProvider to define if it
contributes to a certain ContentType.
If false it is not shown in the browsers tab at allcontributesTo in interface SelectionAwaretype - The type to check if this contribute tothis contributes to the provided typepublic void edgeProviderAdded(EdgeProvider oldProvider, EdgeProvider newProvider)
edgeProviderAdded in interface ProviderManager.ProviderListenerpublic void edgeProviderRemoved(EdgeProvider removedProvider)
edgeProviderRemoved in interface ProviderManager.ProviderListenerpublic void vertexProviderAdded(VertexProvider oldProvider, VertexProvider newProvider)
vertexProviderAdded in interface ProviderManager.ProviderListenerpublic void vertexProviderRemoved(VertexProvider removedProvider)
vertexProviderRemoved in interface ProviderManager.ProviderListenerpublic MetaInfo getMetaInfo()
getMetaInfo in interface GraphProviderCopyright © 2017. All rights reserved.