Class GenericGraph
- java.lang.Object
-
- org.opennms.netmgt.graph.api.generic.GenericElement
-
- org.opennms.netmgt.graph.api.generic.GenericGraph
-
- All Implemented Interfaces:
ImmutableGraph<GenericVertex,GenericEdge>
,GraphInfo
public final class GenericGraph extends GenericElement implements ImmutableGraph<GenericVertex,GenericEdge>
Immutable generic graph.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GenericGraph.GenericGraphBuilder
-
Nested classes/interfaces inherited from class org.opennms.netmgt.graph.api.generic.GenericElement
GenericElement.GenericElementBuilder<T extends GenericElement.GenericElementBuilder>
-
-
Field Summary
-
Fields inherited from class org.opennms.netmgt.graph.api.generic.GenericElement
properties
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GenericGraph
asGenericGraph()
static GenericGraph.GenericGraphBuilder
builder()
boolean
equals(java.lang.Object o)
static GenericGraph.GenericGraphBuilder
from(GenericGraph graph)
java.util.Collection<GenericEdge>
getConnectingEdges(GenericVertex eachVertex)
Focus
getDefaultFocus()
java.lang.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."GenericEdge
getEdge(java.lang.String id)
java.util.List<java.lang.String>
getEdgeIds()
java.util.List<GenericEdge>
getEdges()
GraphInfo
getGraphInfo()
java.lang.String
getLabel()
A user friendly name/label of the graph, e.g.java.util.Collection<GenericVertex>
getNeighbors(GenericVertex eachVertex)
GenericVertex
getVertex(java.lang.String id)
java.util.List<java.lang.String>
getVertexIds()
java.util.List<GenericVertex>
getVertices()
ImmutableGraph<GenericVertex,GenericEdge>
getView(java.util.Collection<GenericVertex> verticesInFocus, int szl)
int
hashCode()
java.util.List<GenericEdge>
resolveEdges(java.util.Collection<java.lang.String> vertexIds)
GenericVertex
resolveVertex(VertexRef vertexRef)
java.util.List<GenericVertex>
resolveVertexRefs(java.util.Collection<VertexRef> vertexRefs)
java.util.List<GenericVertex>
resolveVertices(java.util.Collection<java.lang.String> vertexIds)
java.util.List<GenericVertex>
resolveVertices(NodeRef nodeRef)
-
Methods inherited from class org.opennms.netmgt.graph.api.generic.GenericElement
getId, getNamespace, getProperties, getProperty, getProperty, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opennms.netmgt.graph.api.info.GraphInfo
getNamespace
-
-
-
-
Method Detail
-
asGenericGraph
public GenericGraph asGenericGraph()
- Specified by:
asGenericGraph
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getVertices
public java.util.List<GenericVertex> getVertices()
- Specified by:
getVertices
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getEdges
public java.util.List<GenericEdge> getEdges()
- Specified by:
getEdges
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getGraphInfo
public GraphInfo getGraphInfo()
-
getDescription
public java.lang.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 java.lang.String getLabel()
Description copied from interface:GraphInfo
A user friendly name/label of the graph, e.g. "Business Service Graph"- Specified by:
getLabel
in interfaceGraphInfo
- Overrides:
getLabel
in classGenericElement
-
getDefaultFocus
public Focus getDefaultFocus()
- Specified by:
getDefaultFocus
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
resolveVertices
public java.util.List<GenericVertex> resolveVertices(NodeRef nodeRef)
- Specified by:
resolveVertices
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getVertex
public GenericVertex getVertex(java.lang.String id)
- Specified by:
getVertex
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getEdge
public GenericEdge getEdge(java.lang.String id)
- Specified by:
getEdge
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getVertexIds
public java.util.List<java.lang.String> getVertexIds()
- Specified by:
getVertexIds
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getEdgeIds
public java.util.List<java.lang.String> getEdgeIds()
- Specified by:
getEdgeIds
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
resolveVertices
public java.util.List<GenericVertex> resolveVertices(java.util.Collection<java.lang.String> vertexIds)
- Specified by:
resolveVertices
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
resolveVertex
public GenericVertex resolveVertex(VertexRef vertexRef)
- Specified by:
resolveVertex
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
resolveVertexRefs
public java.util.List<GenericVertex> resolveVertexRefs(java.util.Collection<VertexRef> vertexRefs)
-
resolveEdges
public java.util.List<GenericEdge> resolveEdges(java.util.Collection<java.lang.String> vertexIds)
- Specified by:
resolveEdges
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getNeighbors
public java.util.Collection<GenericVertex> getNeighbors(GenericVertex eachVertex)
- Specified by:
getNeighbors
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getConnectingEdges
public java.util.Collection<GenericEdge> getConnectingEdges(GenericVertex eachVertex)
- Specified by:
getConnectingEdges
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getView
public ImmutableGraph<GenericVertex,GenericEdge> getView(java.util.Collection<GenericVertex> verticesInFocus, int szl)
- Specified by:
getView
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classGenericElement
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classGenericElement
-
builder
public static GenericGraph.GenericGraphBuilder builder()
-
from
public static GenericGraph.GenericGraphBuilder from(GenericGraph graph)
-
-