Class GraphMLIconRepository
- java.lang.Object
-
- org.opennms.features.topology.plugins.topo.graphml.internal.GraphMLIconRepository
-
- All Implemented Interfaces:
IconRepository
public class GraphMLIconRepository extends java.lang.Object implements IconRepository
SimpleIconRepository
for theGraphMLMetaTopologyProvider
. It should contain the Set of iconIds defined by allGraphMLTopologyProvider
s. This enables users to define custom icons (or using already existing icons) by simply defining them in the GraphML file itself. Please note that multipleGraphMLMetaTopologyProvider
could define identicalGraphMLIconRepository
s. For now this is not relevant. However if the icons should be configurable from the Icon Selection Dialog in the UI, this issue must be addressed.- Author:
- mvrueden
-
-
Constructor Summary
Constructors Constructor Description GraphMLIconRepository(java.util.Set<java.lang.String> knownIconKeys)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(java.lang.String iconKey)
Verifies if a mapping for the provided icon Key is defined.java.lang.String
getSVGIconId(java.lang.String iconKey)
Maps the providediconKey
to an SVG id element.
-
-
-
Method Detail
-
contains
public boolean contains(java.lang.String iconKey)
Description copied from interface:IconRepository
Verifies if a mapping for the provided icon Key is defined.- Specified by:
contains
in interfaceIconRepository
- Parameters:
iconKey
- the icon key- Returns:
- true if a mapping is defined, false otherwise.
-
getSVGIconId
public java.lang.String getSVGIconId(java.lang.String iconKey)
Description copied from interface:IconRepository
Maps the providediconKey
to an SVG id element. If no mapping is defined,null
is returned.- Specified by:
getSVGIconId
in interfaceIconRepository
- Parameters:
iconKey
- The icon key to look up- Returns:
- The icon id, or null if no mapping is defined.
-
-