This Parser extends the XML Parser, and is designed to read XML from the input stream and convert this XML to a CBE object; alternatively to write XML based on CBE objects as attributes provided. It operates similar to the CBE Function Component, except it is now packaged as a Parser. This means it can be attached to an input and/or output stream as part of a Connector's configuration instead of having to be deployed separately as another component in an AssemblyLine flow.
For example, it is possible you might want to save in a file all CBE objects received in some AssemblyLine; you could use a File system Connector in AddOnly mode with the CBE Parser and pass the CBE object itself to the "event" attribute of the Output Map.
We can read those CBE objects back in again using a File system Connector in Iterator mode with the CBE Parser configured, and you will receive the objects in the "event" attribute of the Input Map.
When the CBE Parser reads from XML it returns all standard CBE attributes and the CBE object as attribute of the Input Map.
When the CBE Parser writes to XML it expects the CBE object to be set to the "event" attribute of the Output Map. In case the "event" is not set the CBE Parser expects that at least all the required CBE attributes are set in the Output Map otherwise an error will be thrown.
The XML passed to this parser should comply with the CBE specification and the CBE schema.
The CBE specification has a complex structure. To enable you to define the attributes, a dotted notation for the attributes is supported in the attribute map for some of the components. To know more about these attributes and their suggested values please refer to the Autonomic Computing Toolkit Developer's Guide at: http://www-128.ibm.com/developerworks/autonomic/books/fpy0mst.html#ToC_91.
The following CBE Attributes list are the attributes that are used to create a CBE event object or the attributes that are going to be filled out from a CBE object provided to the event attribute or to the eventXml attribute of the Output Map.
When working with CBE objects using either the CBE FC or CBE Parser in an AssemblyLine, we will need to deal with Input and Output maps.
Attribute Name | Attribute Type | Description |
---|---|---|
Event | org.eclipse.hyades.logging.events.cbe.CommonBaseEvent | The CBE object converted from the attributes. |
eventXml | String | The XML representation of the converted CBE object. |
Including all the CBE attributes from table Table 34. |
Attribute Name | Attribute Type | Description |
---|---|---|
Event | org.eclipse.hyades.logging.events.cbe.CommonBaseEvent | The CBE object that is going to be converted to attributes. |
eventXml | String | The XML that is going to be parsed to CBE object and then converted to attributes. |
Including all the CBE attributes from table Table 34. |
The CBE Parser uses the following parameters:
When reading XML, this parameter will be used only if the input source does not already have encoding defined.
Since this parser extends the XML Parser, the same considerations as for that Parser apply.