ilog.ds.sdm
Class SDMLinkEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--ilog.ds.AbstractDSEvent
              |
              +--ilog.ds.sdm.SDMElementEvent
                    |
                    +--ilog.ds.sdm.SDMLinkEvent
All Implemented Interfaces:
Serializable

public class SDMLinkEvent
extends SDMElementEvent

Event class used for all events happening on a link.

See Also:
Serialized Form

Field Summary
protected  Object _from
           
protected  Object _link
           
protected  Object _to
           
 
Fields inherited from class ilog.ds.sdm.SDMElementEvent
_parent, _tag
 
Fields inherited from class ilog.ds.AbstractDSEvent
_properties, _type, ADD, REMOVE, UPDATE
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
SDMLinkEvent(Object source, Object link)
          Constructor to use when the link is being deleted.
SDMLinkEvent(Object source, Object link, Map properties)
          Constructor to use for updating links.
SDMLinkEvent(Object source, String tag, Object link, Object parent, Object from, Object to, Map properties)
          Constructor to use for creating links.
 
Method Summary
 Object getFrom()
          Gets the origin node (to be used only as a key), only useful for creation.
 Object getLink()
          Gets the link (to be used only as a key)
 Object getTo()
          Gets the target node (to be used only as a key), only useful for creation.
 
Methods inherited from class ilog.ds.sdm.SDMElementEvent
getParent, getTag
 
Methods inherited from class ilog.ds.AbstractDSEvent
getProperties, getType
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_link

protected Object _link

_to

protected Object _to

_from

protected Object _from
Constructor Detail

SDMLinkEvent

public SDMLinkEvent(Object source,
                    String tag,
                    Object link,
                    Object parent,
                    Object from,
                    Object to,
                    Map properties)
Constructor to use for creating links.
Parameters:
source - The first parameter is the source of the event.
link - The link itself. It can be anything, as it is only used as a key.
parent - item The owner of the new link. Can be null for a root element in the SDM model.
from - The origin of the link
to - The target of the link
properties - It contains the named properties of the link, that is, all the properties when the link is created.

SDMLinkEvent

public SDMLinkEvent(Object source,
                    Object link,
                    Map properties)
Constructor to use for updating links.
Parameters:
source - The first parameter is the source of the event.
link - The link itself. It can be anything, as it is only used as a key.
properties - Contains the named properties of the link, that is, all the modified properties. Predefined named properties tag, parent, from and to are used to respectively change tag, parent, origin node and target node of the link.

SDMLinkEvent

public SDMLinkEvent(Object source,
                    Object link)
Constructor to use when the link is being deleted.
Method Detail

getLink

public Object getLink()
Gets the link (to be used only as a key)
Returns:
the subject of this event

getFrom

public Object getFrom()
Gets the origin node (to be used only as a key), only useful for creation.
Returns:
the origin of the link

getTo

public Object getTo()
Gets the target node (to be used only as a key), only useful for creation.
Returns:
the destination of the link