skip to main content
TGO > Programmers documentation > Business objects and data sources > BTS (Base Transceiver Station) > Loading a BTS object defined in XML
 
Loading a BTS object defined in XML
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");
For detailed information about data sources, see Data sources.
How to define a BTS object in XML
The following is an example of a BTS object defined in XML format. For details about the XML elements used in this example, see 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:
A BTS as defined in XML

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.