Interface IdGenerator
-
public interface IdGenerator
Generates ids for eachGraphMLNode
in the generated graph. TheIdGenerator
is necessary, because due to the nature of Assets. Let's assume a hierarchy "Region -> Building" should be created and two nodes from different Regions, but the same building, either two or only oneGraphMLNode
must be drawn. TheIdGenerator
allows to consider the hierarchy anGraphMLNode
is added into. Example:- Node 1, Pittsboro, Building 1
- Node 2, Berlin, Building 1
- Author:
- mvrueden
-
-
Field Summary
Fields Modifier and Type Field Description static IdGenerator
HIERARCHY
The id generated by this generator considers hierarchy by simply concatenating the parent ids with thecurrentId
(generated byNodeDecorator.getId(Object)
).static IdGenerator
SIMPLE
Does not consider hierarchy.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
generateId(List<Layer> processedLayers, OnmsNode currentNode, String currentId)
-
-
-
Field Detail
-
HIERARCHY
static final IdGenerator HIERARCHY
The id generated by this generator considers hierarchy by simply concatenating the parent ids with thecurrentId
(generated byNodeDecorator.getId(Object)
).
-
SIMPLE
static final IdGenerator SIMPLE
Does not consider hierarchy. Simply returns the id generated byNodeDecorator.getId(Object)
(currentId
).
-
-