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
-
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 List<GenericVertex> getVertices()
- Specified by:
getVertices
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getEdges
public List<GenericEdge> getEdges()
- Specified by:
getEdges
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getGraphInfo
public GraphInfo getGraphInfo()
-
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"- Specified by:
getLabel
in interfaceGraphInfo
- Overrides:
getLabel
in classGenericElement
-
getDefaultFocus
public Focus getDefaultFocus()
- Specified by:
getDefaultFocus
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
resolveVertices
public List<GenericVertex> resolveVertices(NodeRef nodeRef)
- Specified by:
resolveVertices
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getVertex
public GenericVertex getVertex(String id)
- Specified by:
getVertex
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getEdge
public GenericEdge getEdge(String id)
- Specified by:
getEdge
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getVertexIds
public List<String> getVertexIds()
- Specified by:
getVertexIds
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getEdgeIds
public List<String> getEdgeIds()
- Specified by:
getEdgeIds
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
resolveVertices
public List<GenericVertex> resolveVertices(Collection<String> vertexIds)
- Specified by:
resolveVertices
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
resolveVertex
public GenericVertex resolveVertex(VertexRef vertexRef)
- Specified by:
resolveVertex
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
resolveVertexRefs
public List<GenericVertex> resolveVertexRefs(Collection<VertexRef> vertexRefs)
-
resolveEdges
public List<GenericEdge> resolveEdges(Collection<String> vertexIds)
- Specified by:
resolveEdges
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getNeighbors
public Collection<GenericVertex> getNeighbors(GenericVertex eachVertex)
- Specified by:
getNeighbors
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getConnectingEdges
public Collection<GenericEdge> getConnectingEdges(GenericVertex eachVertex)
- Specified by:
getConnectingEdges
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getView
public ImmutableGraph<GenericVertex,GenericEdge> getView(Collection<GenericVertex> verticesInFocus, int szl)
- Specified by:
getView
in interfaceImmutableGraph<GenericVertex,GenericEdge>
-
equals
public boolean equals(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)
-
-