ilog.views.sdm.model
Class IlvDefaultSDMNode

java.lang.Object
  extended by ilog.views.sdm.model.IlvDefaultSDMNode
All Implemented Interfaces:
IlvMutableSDMNode, IlvSDMNode, Serializable
Direct Known Subclasses:
IlvDefaultSDMLink

public class IlvDefaultSDMNode
extends Object
implements IlvMutableSDMNode, Serializable

IlvDefaultSDMNode is a simple implementation of the IlvSDMNode interface that stores the node properties in memory.

This class can be subclassed to create SDM nodes with other built-in properties.

Since:
JViews 4.0
See Also:
IlvDefaultSDMModel, Serialized Form

Field Summary
static byte MOVE_DOWN
          Action of shiftChild(IlvMutableSDMNode, byte)
static byte MOVE_FIRST
          Action of shiftChild(IlvMutableSDMNode, byte)
static byte MOVE_LAST
          Action of shiftChild(IlvMutableSDMNode, byte)
static byte MOVE_UP
          Action of shiftChild(IlvMutableSDMNode, byte)
 
Constructor Summary
IlvDefaultSDMNode(String tag)
          Creates a new node of symbolic type tag.
 
Method Summary
 void addChild(IlvMutableSDMNode child, IlvMutableSDMNode before)
          Adds a child to this object's submodel.
 Enumeration getChildren()
          Returns the children of this data object, that is, the objects contained in the submodel attached to this object.
 int getChildrenCount()
          Returns the number of children of this data object.
 String getID()
          Returns the identifier of the object.
 IlvSDMNode getParent()
          Returns the parent of this data object, that is, the object to which the submodel containing this object is attached.
 Object getProperty(String property)
          Returns the value of a property of the data object, or null if the property does not exist.
 String[] getPropertyNames()
          Returns the names of all the properties of this object.
 String getTag()
          Returns the symbolic type (or "tag") of the object.
 void removeChild(IlvMutableSDMNode child)
          Removes a child from this object's submodel.
 void setID(String id)
          Sets the identifier of the object.
 void setParent(IlvMutableSDMNode parent)
          Sets the parent of this data object, that is, the object to which the submodel containing this object is attached.
 void setProperty(String property, Object value)
          Stores a property in this object's property table.
 void shiftChild(IlvMutableSDMNode child, byte action)
          Moves a child up or down in the children list.
 String toString()
          Returns a String containing the tag and the ID of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MOVE_FIRST

public static final byte MOVE_FIRST
Action of shiftChild(IlvMutableSDMNode, byte)

Since:
Jviews 8.0
See Also:
Constant Field Values
Internal method or field: do not use!

MOVE_LAST

public static final byte MOVE_LAST
Action of shiftChild(IlvMutableSDMNode, byte)

Since:
Jviews 8.0
See Also:
Constant Field Values
Internal method or field: do not use!

MOVE_UP

public static final byte MOVE_UP
Action of shiftChild(IlvMutableSDMNode, byte)

Since:
Jviews 8.0
See Also:
Constant Field Values
Internal method or field: do not use!

MOVE_DOWN

public static final byte MOVE_DOWN
Action of shiftChild(IlvMutableSDMNode, byte)

Since:
Jviews 8.0
See Also:
Constant Field Values
Internal method or field: do not use!
Constructor Detail

IlvDefaultSDMNode

public IlvDefaultSDMNode(String tag)
Creates a new node of symbolic type tag.

Parameters:
tag - The symbolic type of the object.
Method Detail

getTag

public String getTag()
Returns the symbolic type (or "tag") of the object.

Specified by:
getTag in interface IlvSDMNode

setID

public void setID(String id)
Sets the identifier of the object.

Specified by:
setID in interface IlvMutableSDMNode
Parameters:
id - The new identifier.

getID

public String getID()
Returns the identifier of the object.

Specified by:
getID in interface IlvSDMNode

addChild

public void addChild(IlvMutableSDMNode child,
                     IlvMutableSDMNode before)
Adds a child to this object's submodel.

Specified by:
addChild in interface IlvMutableSDMNode
Parameters:
child - The child to add.
before - The object before which the new child must be inserted, or null if the new child must be appended to the list of children.

shiftChild

public void shiftChild(IlvMutableSDMNode child,
                       byte action)
Moves a child up or down in the children list.

Parameters:
child - the child
action - one of MOVE_DOWN, MOVE_UP, MOVE_FIRST, or MOVE_LAST.
Since:
Jviews 8.0
Internal method or field: do not use!

removeChild

public void removeChild(IlvMutableSDMNode child)
Removes a child from this object's submodel.

Specified by:
removeChild in interface IlvMutableSDMNode
Parameters:
child - The child to remove.

getChildren

public Enumeration getChildren()
Returns the children of this data object, that is, the objects contained in the submodel attached to this object.

Specified by:
getChildren in interface IlvSDMNode
Returns:
An enumeration of IlvSDMNodes.

getChildrenCount

public int getChildrenCount()
Returns the number of children of this data object.

Since:
JViews 7.5

setParent

public void setParent(IlvMutableSDMNode parent)
Sets the parent of this data object, that is, the object to which the submodel containing this object is attached.

Specified by:
setParent in interface IlvMutableSDMNode
Parameters:
parent - The parent to set.

getParent

public IlvSDMNode getParent()
Returns the parent of this data object, that is, the object to which the submodel containing this object is attached.

Specified by:
getParent in interface IlvSDMNode

setProperty

public void setProperty(String property,
                        Object value)
Stores a property in this object's property table.

Specified by:
setProperty in interface IlvMutableSDMNode
Parameters:
property - The name of the property.
value - The value of the property.

getProperty

public Object getProperty(String property)
Returns the value of a property of the data object, or null if the property does not exist.

Specified by:
getProperty in interface IlvSDMNode
Parameters:
property - The name of the property.

getPropertyNames

public String[] getPropertyNames()
Returns the names of all the properties of this object.

Specified by:
getPropertyNames in interface IlvSDMNode

toString

public String toString()
Returns a String containing the tag and the ID of the object.

Overrides:
toString in class Object


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.