10 |
|
import javax.xml.parsers.ParserConfigurationException; |
11 |
|
import javax.xml.parsers.SAXParser; |
12 |
|
|
13 |
– |
import uk.ac.ukc.iscream.core.*; |
14 |
– |
|
13 |
|
/** |
14 |
|
* XMLPacketMaker - Creates an XMLPacket object. |
15 |
|
* |
52 |
|
|
53 |
|
} |
54 |
|
catch (Exception e) { |
57 |
– |
_logger.write(this.toString(), Logger.WARNING, "An invalid XML UDP packet has been detected: "+packet.printAll()); |
55 |
|
return null; |
56 |
|
} |
57 |
|
|
62 |
|
* Overrides the {@link java.lang.Object#toString() Object.toString()} |
63 |
|
* method to provide clean logging (every class should have this). |
64 |
|
* |
65 |
+ |
* This uses the uk.ac.ukc.iscream.util.NameFormat class |
66 |
+ |
* to format the toString() |
67 |
+ |
* |
68 |
|
* @return the name of this class and its CVS revision |
69 |
|
*/ |
70 |
|
public String toString() { |
71 |
< |
return this.getClass().getName() + "(" + REVISION.substring(11, REVISION.length() - 2) + ")"; |
71 |
> |
return FormatName.getName( |
72 |
> |
_name, |
73 |
> |
getClass().getName(), |
74 |
> |
REVISION); |
75 |
|
} |
76 |
|
|
77 |
|
//---PRIVATE METHODS--- |
80 |
|
|
81 |
|
//---ATTRIBUTES--- |
82 |
|
|
83 |
+ |
/** |
84 |
+ |
* Holds the xml |
85 |
+ |
*/ |
86 |
|
String _xml; |
87 |
< |
Logger _logger = ReferenceManager.getInstance().getLogger(); |
87 |
> |
|
88 |
> |
/** |
89 |
> |
* This is the friendly identifier of the |
90 |
> |
* component this class is running in. |
91 |
> |
* eg, a Filter may be called "filter1", |
92 |
> |
* If this class does not have an owning |
93 |
> |
* component, a name from the configuration |
94 |
> |
* can be placed here. This name could also |
95 |
> |
* be changed to null for utility classes. |
96 |
> |
*/ |
97 |
> |
private String _name = null; |
98 |
|
|
99 |
|
//---STATIC ATTRIBUTES--- |
100 |
|
|