org.netxms.client.maps
Class NetworkMapPage

java.lang.Object
  extended by org.netxms.client.maps.NetworkMapPage

public class NetworkMapPage
extends java.lang.Object

Network map object representation used by visualisation tools


Constructor Summary
NetworkMapPage()
          Create empty unnamed page
NetworkMapPage(java.lang.String name)
          Create empty named page
 
Method Summary
 void addAllElements(java.util.Collection<NetworkMapElement> set)
          Add all elements from given collection
 void addAllLinks(java.util.Collection<NetworkMapLink> set)
          Add all links from given collection
 void addElement(NetworkMapElement element)
          Add element to map
 void addLink(NetworkMapLink link)
          Add link between elements to map
 boolean areObjectsConnected(long objectId1, long objectId2)
          Checks if two objects are connected
 long createElementId()
          Create new unique element ID
 NetworkMapLink findLink(NetworkMapElement source, NetworkMapElement destination)
          Find link from source to destination
 NetworkMapObject findObjectElement(long objectId)
          Find object element by NeTXMS object ID.
 NetworkMapElement[] getConnectedElements(long root)
          Get all elements connected to given element
 java.util.Collection<NetworkMapElement> getElements()
           
 java.lang.Object[] getElementsAndLinks()
          Get objects and links in one array
 java.util.Collection<NetworkMapLink> getLinks()
           
 java.lang.String getName()
           
 void removeElement(long elementId)
          Remove element from map
 void removeObjectElement(long objectId)
          Remove map element representing NetXMS object by NetXMS object ID.
 void setName(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkMapPage

public NetworkMapPage()
Create empty unnamed page


NetworkMapPage

public NetworkMapPage(java.lang.String name)
Create empty named page

Method Detail

addElement

public void addElement(NetworkMapElement element)
Add element to map


addAllElements

public void addAllElements(java.util.Collection<NetworkMapElement> set)
Add all elements from given collection

Parameters:
set -

addLink

public void addLink(NetworkMapLink link)
Add link between elements to map


addAllLinks

public void addAllLinks(java.util.Collection<NetworkMapLink> set)
Add all links from given collection

Parameters:
set -

removeElement

public void removeElement(long elementId)
Remove element from map

Parameters:
elementId - map element ID

removeObjectElement

public void removeObjectElement(long objectId)
Remove map element representing NetXMS object by NetXMS object ID.

Parameters:
objectId - NetXMS object ID

getName

public java.lang.String getName()
Returns:
the name

setName

public void setName(java.lang.String name)
Parameters:
name - the name to set

getElements

public java.util.Collection<NetworkMapElement> getElements()
Returns:
the objects

getLinks

public java.util.Collection<NetworkMapLink> getLinks()
Returns:
the links

createElementId

public long createElementId()
Create new unique element ID

Returns:

findObjectElement

public NetworkMapObject findObjectElement(long objectId)
Find object element by NeTXMS object ID.

Parameters:
objectId - NetXMS object ID
Returns:
object element or null

findLink

public NetworkMapLink findLink(NetworkMapElement source,
                               NetworkMapElement destination)
Find link from source to destination

Parameters:
source - source element
destination - destination element
Returns:
link between source and destination or null if there are no such link

areObjectsConnected

public boolean areObjectsConnected(long objectId1,
                                   long objectId2)
Checks if two objects are connected

Parameters:
objectId1 - ID of first map object
objectId2 - ID of second map object
Returns:
true if given objects are connected

getElementsAndLinks

public java.lang.Object[] getElementsAndLinks()
Get objects and links in one array

Returns:
Objects and links in one array

getConnectedElements

public NetworkMapElement[] getConnectedElements(long root)
Get all elements connected to given element

Parameters:
root - Root element id
Returns:
All elements connected to given element


Copyright © 2011. All Rights Reserved.