Package org.opennms.netmgt.graph.domain
Class AbstractDomainGraphContainer<G extends AbstractDomainGraph<? extends AbstractDomainVertex,? extends AbstractDomainEdge>>
- java.lang.Object
-
- org.opennms.netmgt.graph.domain.AbstractDomainGraphContainer<G>
-
- All Implemented Interfaces:
ImmutableGraphContainer<G>
,GraphContainerInfo
- Direct Known Subclasses:
CustomGraphContainer
,SimpleDomainGraphContainer
public abstract class AbstractDomainGraphContainer<G extends AbstractDomainGraph<? extends AbstractDomainVertex,? extends AbstractDomainEdge>> extends java.lang.Object implements ImmutableGraphContainer<G>
Acts as a domain specific view on aGenericGraphContainer
. Can be extended by a domain specific graph container class. It contains no data of it's own but operates on the data of it's wrappedGenericGraphContainer
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractDomainGraphContainer.AbstractDomainGraphContainerBuilder<T extends AbstractDomainGraphContainer.AbstractDomainGraphContainerBuilder,G extends AbstractDomainGraph<? extends AbstractDomainVertex,? extends AbstractDomainEdge>>
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDomainGraphContainer(GenericGraphContainer delegate)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description GenericGraphContainer
asGenericGraphContainer()
Converts theImmutableGraphContainer
to its generic counter part.protected abstract G
convert(GenericGraph graph)
boolean
equals(java.lang.Object o)
java.lang.String
getDescription()
G
getGraph(java.lang.String namespace)
Returns the graph with the requested namespace, or null if it does not exist.GraphInfo
getGraphInfo(java.lang.String namespace)
java.util.List<GraphInfo>
getGraphInfos()
java.util.List<G>
getGraphs()
Returns the list of graphs provided by the container.java.lang.String
getId()
java.lang.String
getLabel()
java.util.List<java.lang.String>
getNamespaces()
GraphInfo
getPrimaryGraphInfo()
int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
AbstractDomainGraphContainer
protected AbstractDomainGraphContainer(GenericGraphContainer delegate)
-
-
Method Detail
-
convert
protected abstract G convert(GenericGraph graph)
-
getGraphs
public java.util.List<G> getGraphs()
Description copied from interface:ImmutableGraphContainer
Returns the list of graphs provided by the container. The returned list, should never be null or empty.- Specified by:
getGraphs
in interfaceImmutableGraphContainer<G extends AbstractDomainGraph<? extends AbstractDomainVertex,? extends AbstractDomainEdge>>
- Returns:
- the provided graphs. Must never be null or empty
-
getGraph
public G getGraph(java.lang.String namespace)
Description copied from interface:ImmutableGraphContainer
Returns the graph with the requested namespace, or null if it does not exist.- Specified by:
getGraph
in interfaceImmutableGraphContainer<G extends AbstractDomainGraph<? extends AbstractDomainVertex,? extends AbstractDomainEdge>>
- Parameters:
namespace
- the namespace of the graph to get- Returns:
- the graph with the requested namespace or null if it does not exist
-
getNamespaces
public java.util.List<java.lang.String> getNamespaces()
- Specified by:
getNamespaces
in interfaceGraphContainerInfo
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescription
in interfaceGraphContainerInfo
-
getLabel
public java.lang.String getLabel()
- Specified by:
getLabel
in interfaceGraphContainerInfo
-
getGraphInfo
public GraphInfo getGraphInfo(java.lang.String namespace)
- Specified by:
getGraphInfo
in interfaceGraphContainerInfo
-
getPrimaryGraphInfo
public GraphInfo getPrimaryGraphInfo()
- Specified by:
getPrimaryGraphInfo
in interfaceGraphContainerInfo
-
getGraphInfos
public java.util.List<GraphInfo> getGraphInfos()
- Specified by:
getGraphInfos
in interfaceGraphContainerInfo
-
getId
public java.lang.String getId()
- Specified by:
getId
in interfaceGraphContainerInfo
-
asGenericGraphContainer
public GenericGraphContainer asGenericGraphContainer()
Description copied from interface:ImmutableGraphContainer
Converts theImmutableGraphContainer
to its generic counter part.- Specified by:
asGenericGraphContainer
in interfaceImmutableGraphContainer<G extends AbstractDomainGraph<? extends AbstractDomainVertex,? extends AbstractDomainEdge>>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-