Package org.opennms.netmgt.graph.domain
Class AbstractDomainGraph<V extends AbstractDomainVertex,E extends AbstractDomainEdge>
- java.lang.Object
-
- org.opennms.netmgt.graph.domain.AbstractDomainGraph<V,E>
-
- All Implemented Interfaces:
ImmutableGraph<V,E>
,GraphInfo
- Direct Known Subclasses:
ApplicationGraph
,BusinessServiceGraph
,CustomGraph
,LegacyGraph
,SimpleDomainGraph
public abstract class AbstractDomainGraph<V extends AbstractDomainVertex,E extends AbstractDomainEdge> extends Object implements ImmutableGraph<V,E>
Acts as a domain specific view on aGenericGraph
. Can be extended by a domain specific graph class. It contains no data of it's own but operates on the data of it's wrappedGenericGraph
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractDomainGraph.AbstractDomainGraphBuilder<T extends AbstractDomainGraph.AbstractDomainGraphBuilder,V extends AbstractDomainVertex,E extends AbstractDomainEdge>
-
Constructor Summary
Constructors Constructor Description AbstractDomainGraph(GenericGraph genericGraph)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description GenericGraph
asGenericGraph()
protected abstract E
convert(GenericEdge edge)
protected abstract ImmutableGraph<V,E>
convert(GenericGraph graph)
protected abstract V
convert(GenericVertex vertex)
boolean
equals(Object o)
Collection<E>
getConnectingEdges(V vertex)
Focus
getDefaultFocus()
String
getDescription()
A short description of the graph to help user's understand what the context of the graph is, e.g.: "This provider shows the hierarchy of the defined Business Services and their computed operational states."E
getEdge(String id)
List<String>
getEdgeIds()
List<E>
getEdges()
String
getLabel()
A user friendly name/label of the graph, e.g.String
getNamespace()
The namespace of the graph.Collection<V>
getNeighbors(V vertex)
V
getVertex(String id)
List<String>
getVertexIds()
List<V>
getVertices()
ImmutableGraph<V,E>
getView(Collection<V> verticesInFocus, int szl)
int
hashCode()
List<E>
resolveEdges(Collection<String> edgeIds)
V
resolveVertex(VertexRef vertexRef)
List<V>
resolveVertices(Collection<String> vertexIds)
List<V>
resolveVertices(NodeRef nodeRef)
String
toString()
-
-
-
Constructor Detail
-
AbstractDomainGraph
public AbstractDomainGraph(GenericGraph genericGraph)
-
-
Method Detail
-
getVertices
public List<V> getVertices()
- Specified by:
getVertices
in interfaceImmutableGraph<V extends AbstractDomainVertex,E extends AbstractDomainEdge>
-
getEdges
public List<E> getEdges()
- Specified by:
getEdges
in interfaceImmutableGraph<V extends AbstractDomainVertex,E extends AbstractDomainEdge>
-
convert
protected abstract ImmutableGraph<V,E> convert(GenericGraph graph)
-
convert
protected abstract V convert(GenericVertex vertex)
-
convert
protected abstract E convert(GenericEdge edge)
-
getVertex
public V getVertex(String id)
- Specified by:
getVertex
in interfaceImmutableGraph<V extends AbstractDomainVertex,E extends AbstractDomainEdge>
-
getEdge
public E getEdge(String id)
- Specified by:
getEdge
in interfaceImmutableGraph<V extends AbstractDomainVertex,E extends AbstractDomainEdge>
-
getVertexIds
public List<String> getVertexIds()
- Specified by:
getVertexIds
in interfaceImmutableGraph<V extends AbstractDomainVertex,E extends AbstractDomainEdge>
-
getEdgeIds
public List<String> getEdgeIds()
- Specified by:
getEdgeIds
in interfaceImmutableGraph<V extends AbstractDomainVertex,E extends AbstractDomainEdge>
-
getView
public ImmutableGraph<V,E> getView(Collection<V> verticesInFocus, int szl)
- Specified by:
getView
in interfaceImmutableGraph<V extends AbstractDomainVertex,E extends AbstractDomainEdge>
-
resolveVertices
public List<V> resolveVertices(NodeRef nodeRef)
- Specified by:
resolveVertices
in interfaceImmutableGraph<V extends AbstractDomainVertex,E extends AbstractDomainEdge>
-
resolveVertices
public List<V> resolveVertices(Collection<String> vertexIds)
- Specified by:
resolveVertices
in interfaceImmutableGraph<V extends AbstractDomainVertex,E extends AbstractDomainEdge>
-
resolveVertex
public V resolveVertex(VertexRef vertexRef)
- Specified by:
resolveVertex
in interfaceImmutableGraph<V extends AbstractDomainVertex,E extends AbstractDomainEdge>
-
resolveEdges
public List<E> resolveEdges(Collection<String> edgeIds)
- Specified by:
resolveEdges
in interfaceImmutableGraph<V extends AbstractDomainVertex,E extends AbstractDomainEdge>
-
getNeighbors
public Collection<V> getNeighbors(V vertex)
- Specified by:
getNeighbors
in interfaceImmutableGraph<V extends AbstractDomainVertex,E extends AbstractDomainEdge>
-
getConnectingEdges
public Collection<E> getConnectingEdges(V vertex)
- Specified by:
getConnectingEdges
in interfaceImmutableGraph<V extends AbstractDomainVertex,E extends AbstractDomainEdge>
-
getDefaultFocus
public Focus getDefaultFocus()
- Specified by:
getDefaultFocus
in interfaceImmutableGraph<V extends AbstractDomainVertex,E extends AbstractDomainEdge>
-
asGenericGraph
public GenericGraph asGenericGraph()
- Specified by:
asGenericGraph
in interfaceImmutableGraph<V extends AbstractDomainVertex,E extends AbstractDomainEdge>
-
getNamespace
public String getNamespace()
Description copied from interface:GraphInfo
The namespace of the graph. Should be unique over all Graphs- Specified by:
getNamespace
in interfaceGraphInfo
-
getDescription
public String getDescription()
Description copied from interface:GraphInfo
A short description of the graph to help user's understand what the context of the graph is, e.g.: "This provider shows the hierarchy of the defined Business Services and their computed operational states."- Specified by:
getDescription
in interfaceGraphInfo
-
getLabel
public String getLabel()
Description copied from interface:GraphInfo
A user friendly name/label of the graph, e.g. "Business Service Graph"
-
-