Interface ItemProvider<T>
-
- Type Parameters:
T
- The type of the value which is extracted from the givenOnmsNode
public interface ItemProvider<T>
The ItemProvider is used to extract an element for the givenOnmsNode
in order to createGraphMLNode
s afterwards. EachLayer
must define anItemProvider
. Examples: Very simple provider:new ItemProvider
Provider to extract asset information:() { public OnmsNode getItem(OnmsNode node) { return node; } } new ItemProvider
() { public String getItem(OnmsNode node) { return node.getAssetRecord().getBuilding(); } } - Author:
- mvrueden
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
getItem(OnmsNode node)
Returns the item for the givennode
which is used to createGraphMLNode
s afterwards.
-
-
-
Method Detail
-
getItem
T getItem(OnmsNode node)
Returns the item for the givennode
which is used to createGraphMLNode
s afterwards. IfRestriction
annotations were set correctly to eachLayers
it is not necessary to check for null values and it should be impossible that this method returns null.- Parameters:
node
- The node to extract the value from.- Returns:
- The value extracted from the node. It is very unlikely to be null, but may be null (see above).
-
-