IltNetworkElement subNetwork1 = new IltNetworkElement("SubNetwork1"); subNetwork1.setName("SubNetwork"); subNetwork1.setType(IltNetworkElement.Type.NMW);
List<IlpObject> children = new ArrayList<IlpObject>(); IltNetworkElement subNode1 = new IltNetworkElement("SubNode1"); subNode1.setName("BSC1"); subNode1.setType(IltNetworkElement.Type.BSC); subNode1.setPosition(new IlpPoint(580, 80)); IltAlarmObjectState alarmState = new IltAlarmObjectState(); IltAlarm.State alarms = (IltAlarm.State)alarmState.getAlarmState(); alarms.setNewAlarmCount(IltAlarm.Severity.Warning, 2); subNode1.setObjectState(alarmState); children.add(subNode1);
datasource.setParent(subNode1, subNetwork1);
IltNetworkElement subNode2 = new IltNetworkElement("SubNode2"); subNode2.setName("BTS2"); subNode2.setType(IltNetworkElement.Type.BTS_Image); subNode2.setPosition(new IlpPoint(620, 180)); IltOSIObjectState osiState = new IltOSIObjectState(new IltOSI.State(IltOSI.State.Operational.Enabled, IltOSI.State.Usage.Active, IltOSI.State.Administrative.ShuttingDown)); IltAlarm.State osiAlarms = (IltAlarm.State)osiState.getAlarmState(); osiAlarms.setNewAlarmCount(IltAlarm.Severity.Warning, 4); osiState.set(IltOSI.Procedural.Reporting); osiState.set(IltOSI.Repair.UnderRepair); osiState.set(IltPerformance.SecState.Output, new Float(150)); subNode2.setObjectState(osiState); children.add(subNode2);
datasource.setParent(subNode2, subNetwork1);
IltLink link = new IltLink("SubNode1-SubNode2"); link.setName("InternalLink"); link.setMedia(null); link.setObjectState(new IltBiSONETObjectState(IltSONET.State.ActiveProtecting, null)); children.add(link);
datasource.setParent(link, subNetwork1);
datasource.setLink(link, subNode1, subNode2);
datasource.addObject(subNetwork1); datasource.addObjects(children);