void setLink (Object idOrIlpObject,
Object fromIdOrIlpObject, Object toIdOrIlpObject)
from
business object to the
to
business object. The structural information of the link is
defined by the interface IlpLink.
void setParent (Object idOrIlpObject,
Object parentIdOrIlpObject)
void setChildren (Object
idOrIlpObject, List childrenIdsOrIlpObjects)
setParent
and
setChildren
in a default data source.
IlpObject parent = new IltNetworkElement("NE1"); IlpObject child = new IltNetworkElement("NE1_1"); dataSource.setParent(child, parent); dataSource.addObject(child); dataSource.addObject(parent);
IlpObject parent = new IltNetworkElement("NE1"); IlpObject child1 = new IltNetworkElement("NE1_1"); IlpObject child2 = new IltNetworkElement("NE1_2"); IlpObject child3 = new IltNetworkElement("NE1_3"); List children = new ArrayList(); children.add(child1); children.add(child2); children.add(child3); dataSource.setChildren(parent, children); dataSource.addObjects(children); dataSource.addObject(parent);
setLink
in a default data source.
IlpObject fromEnd = new IltNetworkElement("NE1"); IlpObject toEnd = new IltNetworkElement("NE2"); IlpObject link = new IltLink("NE1<->NE2"); dataSource.setLink (link, fromEnd, toEnd); List objects = new ArrayList(); objects.add(fromEnd); objects.add(toEnd); dataSource.addObjects(objects); dataSource.addObject(link);
dataSource.addObject(object); dataSource.setParent(object, parent);
dataSource.setParent(object, parent); dataSource.addObject(object);
ArrayList objects = new ArrayList(); IltNetworkElement net = new IltNetworkElement("Network"); net.setName("Network"); IltNetworkElement branchA = new IltNetworkElement("BranchA"); branchA.setName("A"); IltNetworkElement branchB = new IltNetworkElement("BranchB"); branchB.setName("B"); objects.add(net); objects.add(branchA); objects.add(branchB); dataSource.setParent(branchA, net); dataSource.setParent(branchB, net); IltNetworkElement leafA = new IltNetworkElement("LeafA"); leafA.setType(IltNetworkElement.Type.NMW); leafA.setPosition(new IlpPoint(100,100)); leafA.setName("Leaf A"); IltNetworkElement leafB = new IltNetworkElement("LeafB"); leafB.setType(IltNetworkElement.Type.NMW); leafB.setPosition(new IlpPoint(250,250)); leafB.setName("Leaf B"); dataSource.setParent(leafA, branchA); dataSource.setParent(leafB, branchB); objects.add(leafA); objects.add(leafB); // Creating the intergraph link IltLink link = new IltLink("LeafA-LeafB"); link.setName("LeafA-LeafB"); dataSource.setLink(link, leafA, leafB); // Setting the link hierarchy level dataSource.setParent(link, net); objects.add(link); dataSource.addObjects(objects);
"network"
business object.
Object getParent(IlpObject object)
, which returns the parent object identifier from the given
business object.
Collection getChildren(IlpObject
object)
, which returns the list of child identifiers from the given
business object.
Object getFrom(IlpObject object)
and
Object getTo(IlpObject object)
.
Collection getLinks(IlpObject
object)
.
IlpChild getChildInterface (Object
childIdOrIlpObject)
IlpContainer getContainerInterface
(Object containerIdOrIlpObject)
IlpLink getLinkInterface (Object
linkIdOrIlpObject)
IlpLinkExtremity
getLinkExtremityInterface (Object linkIdOrIlpObject)
IlpObject getParent (IlpObject
object)
: Returns the parent of the given object.
Collection getChildren (IlpObject
object)
: Returns the collection of child objects for the given
object.
Collection getLinks (IlpObject node)
: Returns the collection of links that have the given node as
an end point.
IlpObject getFrom (IlpObject link)
: Returns the
from
end point of the given link object.
IlpObject getTo (IlpObject link)
: Returns the
to
end point of the given link object.