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 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 classAbstractDomainGraphContainer.AbstractDomainGraphContainerBuilder<T extends AbstractDomainGraphContainer.AbstractDomainGraphContainerBuilder,G extends AbstractDomainGraph<? extends AbstractDomainVertex,? extends AbstractDomainEdge>>
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDomainGraphContainer(GenericGraphContainer delegate)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description GenericGraphContainerasGenericGraphContainer()Converts theImmutableGraphContainerto its generic counter part.protected abstract Gconvert(GenericGraph graph)booleanequals(Object o)StringgetDescription()GgetGraph(String namespace)Returns the graph with the requested namespace, or null if it does not exist.GraphInfogetGraphInfo(String namespace)List<GraphInfo>getGraphInfos()List<G>getGraphs()Returns the list of graphs provided by the container.StringgetId()StringgetLabel()List<String>getNamespaces()GraphInfogetPrimaryGraphInfo()inthashCode()StringtoString()
-
-
-
Constructor Detail
-
AbstractDomainGraphContainer
protected AbstractDomainGraphContainer(GenericGraphContainer delegate)
-
-
Method Detail
-
convert
protected abstract G convert(GenericGraph graph)
-
getGraphs
public List<G> getGraphs()
Description copied from interface:ImmutableGraphContainerReturns the list of graphs provided by the container. The returned list, should never be null or empty.- Specified by:
getGraphsin interfaceImmutableGraphContainer<G extends AbstractDomainGraph<? extends AbstractDomainVertex,? extends AbstractDomainEdge>>- Returns:
- the provided graphs. Must never be null or empty
-
getGraph
public G getGraph(String namespace)
Description copied from interface:ImmutableGraphContainerReturns the graph with the requested namespace, or null if it does not exist.- Specified by:
getGraphin 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 List<String> getNamespaces()
- Specified by:
getNamespacesin interfaceGraphContainerInfo
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceGraphContainerInfo
-
getLabel
public String getLabel()
- Specified by:
getLabelin interfaceGraphContainerInfo
-
getGraphInfo
public GraphInfo getGraphInfo(String namespace)
- Specified by:
getGraphInfoin interfaceGraphContainerInfo
-
getPrimaryGraphInfo
public GraphInfo getPrimaryGraphInfo()
- Specified by:
getPrimaryGraphInfoin interfaceGraphContainerInfo
-
getGraphInfos
public List<GraphInfo> getGraphInfos()
- Specified by:
getGraphInfosin interfaceGraphContainerInfo
-
getId
public String getId()
- Specified by:
getIdin interfaceGraphContainerInfo
-
asGenericGraphContainer
public GenericGraphContainer asGenericGraphContainer()
Description copied from interface:ImmutableGraphContainerConverts theImmutableGraphContainerto its generic counter part.- Specified by:
asGenericGraphContainerin interfaceImmutableGraphContainer<G extends AbstractDomainGraph<? extends AbstractDomainVertex,? extends AbstractDomainEdge>>
-
-