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 classGenericGraph.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 GenericGraphasGenericGraph()static GenericGraph.GenericGraphBuilderbuilder()booleanequals(java.lang.Object o)static GenericGraph.GenericGraphBuilderfrom(GenericGraph graph)java.util.Collection<GenericEdge>getConnectingEdges(GenericVertex eachVertex)FocusgetDefaultFocus()java.lang.StringgetDescription()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."GenericEdgegetEdge(java.lang.String id)java.util.List<java.lang.String>getEdgeIds()java.util.List<GenericEdge>getEdges()GraphInfogetGraphInfo()java.lang.StringgetLabel()A user friendly name/label of the graph, e.g.java.util.Collection<GenericVertex>getNeighbors(GenericVertex eachVertex)GenericVertexgetVertex(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)inthashCode()java.util.List<GenericEdge>resolveEdges(java.util.Collection<java.lang.String> vertexIds)GenericVertexresolveVertex(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:
asGenericGraphin interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getVertices
public java.util.List<GenericVertex> getVertices()
- Specified by:
getVerticesin interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getEdges
public java.util.List<GenericEdge> getEdges()
- Specified by:
getEdgesin interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getGraphInfo
public GraphInfo getGraphInfo()
-
getDescription
public java.lang.String getDescription()
Description copied from interface:GraphInfoA 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:
getDescriptionin interfaceGraphInfo
-
getLabel
public java.lang.String getLabel()
Description copied from interface:GraphInfoA user friendly name/label of the graph, e.g. "Business Service Graph"- Specified by:
getLabelin interfaceGraphInfo- Overrides:
getLabelin classGenericElement
-
getDefaultFocus
public Focus getDefaultFocus()
- Specified by:
getDefaultFocusin interfaceImmutableGraph<GenericVertex,GenericEdge>
-
resolveVertices
public java.util.List<GenericVertex> resolveVertices(NodeRef nodeRef)
- Specified by:
resolveVerticesin interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getVertex
public GenericVertex getVertex(java.lang.String id)
- Specified by:
getVertexin interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getEdge
public GenericEdge getEdge(java.lang.String id)
- Specified by:
getEdgein interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getVertexIds
public java.util.List<java.lang.String> getVertexIds()
- Specified by:
getVertexIdsin interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getEdgeIds
public java.util.List<java.lang.String> getEdgeIds()
- Specified by:
getEdgeIdsin interfaceImmutableGraph<GenericVertex,GenericEdge>
-
resolveVertices
public java.util.List<GenericVertex> resolveVertices(java.util.Collection<java.lang.String> vertexIds)
- Specified by:
resolveVerticesin interfaceImmutableGraph<GenericVertex,GenericEdge>
-
resolveVertex
public GenericVertex resolveVertex(VertexRef vertexRef)
- Specified by:
resolveVertexin 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:
resolveEdgesin interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getNeighbors
public java.util.Collection<GenericVertex> getNeighbors(GenericVertex eachVertex)
- Specified by:
getNeighborsin interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getConnectingEdges
public java.util.Collection<GenericEdge> getConnectingEdges(GenericVertex eachVertex)
- Specified by:
getConnectingEdgesin interfaceImmutableGraph<GenericVertex,GenericEdge>
-
getView
public ImmutableGraph<GenericVertex,GenericEdge> getView(java.util.Collection<GenericVertex> verticesInFocus, int szl)
- Specified by:
getViewin interfaceImmutableGraph<GenericVertex,GenericEdge>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classGenericElement
-
hashCode
public int hashCode()
- Overrides:
hashCodein classGenericElement
-
builder
public static GenericGraph.GenericGraphBuilder builder()
-
from
public static GenericGraph.GenericGraphBuilder from(GenericGraph graph)
-
-