com.kuka.nav.fleet.graph
Class TopologyHelper

java.lang.Object
  extended by com.kuka.nav.fleet.graph.TopologyHelper

public final class TopologyHelper
extends Object

Helper class for topology graph elements.


Field Summary
static String GRAPH_ID
          The graph ID property identifier.
static String GRAPH_NAME
          The graph name property identifier.
static String ID
          The element ID property identifier.
static String MAP_ID
          The map ID property identifier.
static String NAME
          The element name property identifier.
static String TMP_NODE_EDGES
          The temporary node identifier.
 
Method Summary
static int getGraphId(com.kuka.nav.provider.util.ObjectMap<String> object)
          Gets the graph ID entry from an element property map.
static String getGraphName(com.kuka.nav.provider.util.ObjectMap<String> object)
          Gets the graph name entry from an element property map or null.
static int getId(com.kuka.nav.provider.util.ObjectMap<String> object)
          Gets the ID entry from an element property map.
static int getMapId(com.kuka.nav.provider.util.ObjectMap<String> object)
          Gets the map ID entry from an element property map.
static String getName(com.kuka.nav.provider.util.ObjectMap<String> object)
          Gets the topology element name entry from an element property map or null.
static boolean hasGraphName(com.kuka.nav.provider.util.ObjectMap<String> object)
          Checks if the topology element has a graph name property set.
static boolean hasId(com.kuka.nav.provider.util.ObjectMap<String> object)
          Checks if an element property map has an ID entry.
static boolean hasMapId(com.kuka.nav.provider.util.ObjectMap<String> object)
          Checks if an element property map has a map id entry.
static boolean hasName(com.kuka.nav.provider.util.ObjectMap<String> object)
          Checks if the topology element has a name property set.
static boolean isTmpNode(com.kuka.nav.provider.util.ObjectMap<String> object)
          Checks if a node is marked as temporary.
static void setGraphId(com.kuka.nav.provider.util.ObjectMap<String> object, int graphId)
          Sets the graph ID entry in an element property map.
static void setGraphName(com.kuka.nav.provider.util.ObjectMap<String> object, String graphName)
          Sets the graph name entry in an element property map.
static void setId(com.kuka.nav.provider.util.ObjectMap<String> object, int id)
          Sets the element ID entry in an element property map.
static void setMapId(com.kuka.nav.provider.util.ObjectMap<String> object, int mapId)
          Sets the map ID entry in an element property map.
static void setName(com.kuka.nav.provider.util.ObjectMap<String> object, String name)
          Sets the topology element name entry in an element property map.
static void setTmpNode(com.kuka.nav.provider.util.ObjectMap<String> object, Set<TopologyEdge> edges)
          Labels a topology node as temporary.
static Set<TopologyEdge> tryGetEdgesForTmpNode(com.kuka.nav.provider.util.ObjectMap<String> object)
          If the corresponding node is a temporary node the edge between whose source and target the temporary node is located is returned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
The element ID property identifier.

See Also:
Constant Field Values

MAP_ID

public static final String MAP_ID
The map ID property identifier.

See Also:
Constant Field Values

GRAPH_ID

public static final String GRAPH_ID
The graph ID property identifier.

See Also:
Constant Field Values

GRAPH_NAME

public static final String GRAPH_NAME
The graph name property identifier.

See Also:
Constant Field Values

NAME

public static final String NAME
The element name property identifier.

See Also:
Constant Field Values

TMP_NODE_EDGES

public static final String TMP_NODE_EDGES
The temporary node identifier.

See Also:
Constant Field Values
Method Detail

hasId

public static boolean hasId(com.kuka.nav.provider.util.ObjectMap<String> object)
Checks if an element property map has an ID entry.

Parameters:
object - the element property map
Returns:
true, if ID entry exists and is not null

getId

public static int getId(com.kuka.nav.provider.util.ObjectMap<String> object)
Gets the ID entry from an element property map.

Parameters:
object - the element property map
Returns:
the id

setId

public static void setId(com.kuka.nav.provider.util.ObjectMap<String> object,
                         int id)
Sets the element ID entry in an element property map.

Parameters:
object - the element property map
id - the element ID

hasMapId

public static boolean hasMapId(com.kuka.nav.provider.util.ObjectMap<String> object)
Checks if an element property map has a map id entry.

Parameters:
object - the element property map
Returns:
true, if a map id entry exists and is not null.

getMapId

public static int getMapId(com.kuka.nav.provider.util.ObjectMap<String> object)
Gets the map ID entry from an element property map.

Parameters:
object - the element property map
Returns:
the map ID

setMapId

public static void setMapId(com.kuka.nav.provider.util.ObjectMap<String> object,
                            int mapId)
Sets the map ID entry in an element property map.

Parameters:
object - the element property map
mapId - the map ID

hasName

public static boolean hasName(com.kuka.nav.provider.util.ObjectMap<String> object)
Checks if the topology element has a name property set.

Parameters:
object - the element property map
Returns:
true if name is set or false

getName

public static String getName(com.kuka.nav.provider.util.ObjectMap<String> object)
Gets the topology element name entry from an element property map or null.

Parameters:
object - the element property map
Returns:
the name

setName

public static void setName(com.kuka.nav.provider.util.ObjectMap<String> object,
                           String name)
Sets the topology element name entry in an element property map.

Parameters:
object - the element property map
name - the name

getGraphId

public static int getGraphId(com.kuka.nav.provider.util.ObjectMap<String> object)
Gets the graph ID entry from an element property map.

Parameters:
object - the element property map
Returns:
the graph ID

setGraphId

public static void setGraphId(com.kuka.nav.provider.util.ObjectMap<String> object,
                              int graphId)
Sets the graph ID entry in an element property map.

Parameters:
object - the element property map
graphId - the graph ID

hasGraphName

public static boolean hasGraphName(com.kuka.nav.provider.util.ObjectMap<String> object)
Checks if the topology element has a graph name property set.

Parameters:
object - the element property map
Returns:
true if graph name is set or false

getGraphName

public static String getGraphName(com.kuka.nav.provider.util.ObjectMap<String> object)
Gets the graph name entry from an element property map or null.

Parameters:
object - the element property map
Returns:
the graph name

setGraphName

public static void setGraphName(com.kuka.nav.provider.util.ObjectMap<String> object,
                                String graphName)
Sets the graph name entry in an element property map.

Parameters:
object - the element property map
graphName - the graph name

isTmpNode

public static boolean isTmpNode(com.kuka.nav.provider.util.ObjectMap<String> object)
Checks if a node is marked as temporary.

Parameters:
object - the element property map
Returns:
true if node is temporary

setTmpNode

public static void setTmpNode(com.kuka.nav.provider.util.ObjectMap<String> object,
                              Set<TopologyEdge> edges)
Labels a topology node as temporary. A temporary node is located between two nodes. The given edges to which it may recover are s set for the node marking it as temporary.

Parameters:
object - the element property map
edges - the edge to be set

tryGetEdgesForTmpNode

public static Set<TopologyEdge> tryGetEdgesForTmpNode(com.kuka.nav.provider.util.ObjectMap<String> object)
If the corresponding node is a temporary node the edge between whose source and target the temporary node is located is returned. Otherwise, null is returned.

Parameters:
object - the element property map
Returns:
the edge or null as described above.


Copyright © 2019. All rights reserved.