ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/experimental/server/XMLReader/XMLPacket.java
Revision: 1.2
Committed: Tue Nov 14 10:04:01 2000 UTC (23 years, 5 months ago) by pjm2
Branch: MAIN
Changes since 1.1: +4 -0 lines
Log Message:
Incorporated the XMLPacket features into the XMLPacketMaker class.
Now reads simple parameter values from XML into the hash map.

File Contents

# Content
1 import java.util.HashMap;
2
3 // Paul Mutton, pjm2@ukc.ac.uk
4
5 // Object in which to store incoming XML data
6 // to be passed around the CORBA system.
7 public class XMLPacket {
8
9 // Add a key and value pair to the HashMap.
10 public void addParam(String key, String value){
11 params.put(key, value);
12
13 // debug by println ;-)
14 // System.out.println("Adding to hash: " + key + " = " + value);
15 // end debug code
16 }
17
18 // Return the value associated with a particular key.
19 // Returns null if the key does not exist, although
20 // this should not necessarily indicate that the key
21 // does not exist.
22 public String getParam(String key){
23 return (String)params.get(key);
24 }
25
26 private HashMap params = new HashMap();
27
28 }