IltObject
instance.
IltLinkBundle
class does not define any specific attribute. However, any
attribute defined in business class IltLink can be set in link bundle instances
and will be graphically represented in the link bundle overview.
IltLinkBundle
using its GetIlpClass method. You can handle its
instances as simple IlpObject instances and set and get its
attributes with the generic methods getAttributeValue and setAttributeValue.
parse
method of the data source, as shown below:
dataSource = new IltDefaultDataSource(); dataSource.parse("LinkBundleXMLFile.xml");
<addObject id="Link1"> <class>ilog.tgo.model.IltLink</class> <link> <from>Paris</from> <to>Berlin</to> </link> <attribute name="name">1</attribute> <attribute name="objectState" javaClass="ilog.tgo.model.IltSONETObjectState"> <state> Active </state> </attribute> </addObject> <addObject id="Link2"> <class>ilog.tgo.model.IltLink</class> <link> <from>Paris</from> <to>Berlin</to> </link> <attribute name="name">2</attribute> <attribute name="objectState" javaClass="ilog.tgo.model.IltSONETObjectState"> <state> Active </state> </attribute> </addObject> <addObject id="linkBundle"> <class>ilog.tgo.model.IltLinkBundle</class> <attribute name="name">Bundle</attribute> <link> <from>Paris</from> <to>Berlin</to> </link> <children> <child>Link1</child> <child>Link2</child> </children> </addObject>
<addObject id="linkBundle"> <class>ilog.tgo.model.IltLinkBundle</class> <attribute name="objectState" javaClass="ilog.tgo.model.IltSONETObjectState"> <state> Active </state> </attribute> <link> <from>Oslo</from> <to>Berlin</to> </link> <children> <child>Link1</child> <child>Link2</child> </children> </addObject>
IltLink link1 = new IltLink(new IltSONETObjectState(IltSONET.State.Active), "1", null); IltLink link2 = new IltLink(new IltSONETObjectState(IltSONET.State.Active), "2", null); IltLinkBundle bundle = new IltLinkBundle(); bundle.setName("Bundle"); List objects = new ArrayList(); objects.add(paris); objects.add(berlin); objects.add(link1); objects.add(link2); objects.add(bundle); dataSource.setLink(link1.getIdentifier(), paris.getIdentifier(), berlin.getIdentifier()); dataSource.setLink(link2.getIdentifier(), paris.getIdentifier(), berlin.getIdentifier()); dataSource.setLink(bundle.getIdentifier(), paris.getIdentifier(), berlin.getIdentifier()); dataSource.setParent(link1.getIdentifier(), bundle.getIdentifier()); dataSource.setParent(link2.getIdentifier(), bundle.getIdentifier()); dataSource.addObjects(objects);