| Business Objects and Data Sources > BTS (Base Transceiver Station) > Loading a BTS Object Defined in XML |
Loading a BTS Object Defined in XML |
INDEX
PREVIOUS
NEXT
|
This section shows how to load a BTS object from an XML file in a data source. For detailed information about data sources, see section Data Sources.
All you have to do is create a data source using the default data source implementation defined by IltDefaultDataSource and pass the XML file to the parse method of the data source as shown below:
dataSource = new IltDefaultDataSource();
dataSource.parse("BTSXMLFile.xml");
Below is an example of a BTS object defined in XML format. For details about the XML elements used in this example, see Table 3.1, Elements in an XML Data File.
<cplData> <addObject id="bts1" container="true"> <class>ilog.tgo.model.IltBTS</class> <attribute name="name">BTS 1</attribute> <attribute name="position" javaClass="ilog.cpl.graphic.IlpPoint"> <x>200</x> <y>200</y> </attribute> </addObject> <addObject id="BTSEquipment"> <class>ilog.tgo.model.IltNetworkElement</class> <parent>bts1</parent> <attribute name="name">BTSEquipment</attribute> <attribute name="type">BTSEquipment</attribute> </addObject> <addObject id="antenna1"> <class>ilog.tgo.model.IltBTSAntenna</class> <parent>bts1</parent> <attribute name="name">BTS Antenna 1</attribute> <attribute name="beamDirection">0</attribute> <attribute name="power">100</attribute> <attribute name="beamWidth">60</attribute> </addObject> <addObject id="antenna2"> <class>ilog.tgo.model.IltBTSAntenna</class> <parent>bts1</parent> <attribute name="name">BTS Antenna 2</attribute> <attribute name="beamDirection">60</attribute> <attribute name="power">50</attribute> <attribute name="beamWidth">60</attribute> </addObject> <addObject id="antenna3"> <class>ilog.tgo.model.IltBTSAntenna</class> <parent>bts1</parent> <attribute name="name">BTS Antenna 3</attribute> <attribute name="beamDirection">120</attribute> <attribute name="power">80</attribute> <attribute name="beamWidth">60</attribute> </addObject> <addObject id="antenna4"> <class>ilog.tgo.model.IltBTSAntenna</class> <parent>bts1</parent> <attribute name="name">BTS Antenna 4</attribute> <attribute name="beamDirection">180</attribute> <attribute name="power">20</attribute> <attribute name="beamWidth">60</attribute> </addObject> <addObject id="antenna5"> <class>ilog.tgo.model.IltBTSAntenna</class> <parent>bts1</parent> <attribute name="name">BTS Antenna 5</attribute> <attribute name="beamDirection">240</attribute> <attribute name="power">70</attribute> <attribute name="beamWidth">60</attribute> </addObject> <addObject id="antenna6"> <class>ilog.tgo.model.IltBTSAntenna</class> <parent>bts1</parent> <attribute name="name">BTS Antenna 6</attribute> <attribute name="beamDirection">300</attribute> <attribute name="power">50</attribute> <attribute name="beamWidth">60</attribute> </addObject> </cplData>
The result looks like this:
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. All rights reserved. Legal terms. | PREVIOUS NEXT |