source: DCWoRMS/branches/coolemall/src/test/appProfConverter/Network.java @ 1333

Revision 1333, 650 bytes checked in by wojtekp, 11 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1package test.appProfConverter;
2import org.w3c.dom.Element;
3
4public class Network {
5
6        public Network(Element e) throws Exception {
7                LoadElement(e);
8        }
9
10        private void LoadElement(Element e) throws Exception {
11                if (!e.getTagName().equals("Network")) {
12                        throw new Exception("Invalid element tag.");
13                }
14
15                this.MaxBandwidth = Integer.parseInt(e
16                                .getElementsByTagName("MaxBandwidth").item(0).getChildNodes()
17                                .item(0).getNodeValue().trim());
18        }
19
20
21        public Integer MaxBandwidth;
22
23        public String ToString() {
24                String str = "";
25
26                str += "Network:\n";
27
28                str += " MaxBandwidth: " + Integer.toString(this.MaxBandwidth) + "\n";
29
30                return str;
31        }
32
33}
Note: See TracBrowser for help on using the repository browser.