|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.sensorevent.model.generic.converter.GenericConverter
com.ibm.sensorevent.model.converter.Converter
com.ibm.sensorevent.model.converter.XMLConverter
public class XMLConverter
The XMLConverter class converts ISensorEvents and XML strings to other formats. The XML string is in the form of the XML representing a CommonBaseEvent. Specifically, use the XMLConverter class to convert:
XMLConverter creates the XML string without using CommonBaseEvent (CBE) objects.
Event XML created by XMLConverter removes the attribute value limit of 1024 characters. XML with
an attribute value length greater than 1024 characters may not be consumable by other applications that
adhere to the strict 1024 character limit. To create CBE-conforming event XML, use
CBEConverter
.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
static java.lang.String |
XML_SITUATION_TYPE
The CommonBaseEvent situation type used in all XML strings |
Constructor Summary | |
---|---|
XMLConverter()
Constructs an XMLConverter |
Method Summary | |
---|---|
javax.xml.parsers.SAXParser |
createSAXParser()
Create an instance of a SAXParser to use to parse XML events. |
static IGenericConverter |
getInstance()
Factory method to create an XMLConverter instance |
ISensorEvent |
toIBMSensorEvent(javax.xml.parsers.SAXParser sp,
java.lang.String xml)
Converts an XML string in CommonBaseEvent XML format to an ISensorEvent |
ISensorEvent |
toIBMSensorEvent(java.lang.String xml)
Converts an XML string in CommonBaseEvent XML format to an ISensorEvent |
java.lang.String |
toXMLString(ISensorEvent event)
Converts an ISensorEvent to an XML string in CommonBaseEvent XML format |
Methods inherited from class com.ibm.sensorevent.model.generic.converter.GenericConverter |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static java.lang.String XML_SITUATION_TYPE
Constructor Detail |
---|
public XMLConverter()
Method Detail |
---|
public static IGenericConverter getInstance()
public ISensorEvent toIBMSensorEvent(java.lang.String xml) throws SensorEventException
toIBMSensorEvent
in interface IConverter
xml
- - the XML string to convert
SensorEventException
public ISensorEvent toIBMSensorEvent(javax.xml.parsers.SAXParser sp, java.lang.String xml) throws SensorEventException
sp
- - Instance of the SAXParser to use.xml
- - the XML string to convert
SensorEventException
public javax.xml.parsers.SAXParser createSAXParser() throws ConverterException
ConverterException
public java.lang.String toXMLString(ISensorEvent event) throws SensorEventException
toXMLString
in interface IConverter
event
- - the ISensorEvent to convert
SensorEventException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |