| Developing with the SDK > Using and Writing Data Models > NonJavaBeans Example: Abstract Model Variant > The TreeSDMLink Class |
The TreeSDMLink Class |
INDEX
PREVIOUS
NEXT
|
The class TreeSDMLink represents the links of the graph. Its definition is as shown in Code Sample 2.27.
public class TreeSDMLink implements IlvSDMLink { ... |
The link implementation can therefore make use of all the predefined methods of the IlvSDMLink interface.
Each link has a reference to a parent node and a child node, which can be retrieved using the getFrom and getTo methods, see Code Sample 2.28.
The IlvSDMLink interface inherits from the IlvSDMNode interface and so the same methods must be implemented as for a node.
The tag (type) of links is treelink. and this value can be retrieved using the getTag method, see Code Sample 2.29.
public String getTag() { return "treelink"; } |
The remaining methods are mostly empty, since in this example links have no properties.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |