|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.hyades.logging.events.cbe.util.EventFormatter
The EventFormatter
class defines a utility object used for
converting, serializing and de-serializing CommonBaseEvent
and
related objects.
Notes:
serialize()
and deserialize()
APIs in the org.eclipse.hyades.logging.core.XmlUtility
class.
CommonBaseEvent
,
AssociationEngine
,
SAXEventHandler
,
XmlUtility
Constructor Summary | |
---|---|
EventFormatter()
|
Method Summary | |
---|---|
static AssociationEngine |
associationEngineFromCanonicalXML(java.lang.String xmlFragmentString)
Converts an XML fragment to an AssociationEngine object without validation.
|
static AssociationEngine |
associationEngineFromCanonicalXML(java.lang.String xmlFragmentString,
boolean validation)
Potentially validates and converts an XML fragment to an AssociationEngine object.
|
static AssociationEngine[] |
associationEnginesFromCanonicalXMLDoc(org.w3c.dom.Document document)
Converts a Document Object Model (DOM) to an array of AssociationEngine >
objects without validation.
|
static AssociationEngine[] |
associationEnginesFromCanonicalXMLDoc(org.w3c.dom.Document document,
boolean validate)
Potentially validates and converts a Document Object Model (DOM) to an array of AssociationEngine
objects.
|
static AssociationEngine[] |
associationEnginesFromCanonicalXMLDoc(java.io.File file)
Converts an XML document from an File to an array of
AssociationEngine objects without validation.
|
static AssociationEngine[] |
associationEnginesFromCanonicalXMLDoc(java.io.File file,
boolean validate)
Potentially validates and converts an XML document from an File to an array of
AssociationEngine objects.
|
static AssociationEngine[] |
associationEnginesFromCanonicalXMLDoc(org.xml.sax.InputSource inputSource)
Converts an XML document from an InputSource to an array
of AssociationEngine objects without validation.
|
static AssociationEngine[] |
associationEnginesFromCanonicalXMLDoc(org.xml.sax.InputSource inputSource,
boolean validate)
Potentially validates and c onverts an XML document from an InputSource to an array
of AssociationEngine objects.
|
static AssociationEngine[] |
associationEnginesFromCanonicalXMLDoc(java.io.InputStream inputStream)
Converts an XML document from an InputStream to an array
of AssociationEngine objects without validation.
|
static AssociationEngine[] |
associationEnginesFromCanonicalXMLDoc(java.io.InputStream inputStream,
boolean validate)
Potentially validates and converts an XML document from an InputStream to an array
of AssociationEngine objects.
|
static AssociationEngine[] |
associationEnginesFromCanonicalXMLDoc(java.lang.String xmlDocumentString)
Converts an XML document to an array of AssociationEngine
objects without validation.
|
static AssociationEngine[] |
associationEnginesFromCanonicalXMLDoc(java.lang.String xmlDocumentString,
boolean validate)
Potentially validates and c onverts an XML document to an array of AssociationEngine
objects.
|
static CommonBaseEvent |
eventFromCanonicalXML(java.lang.String xmlFragmentString)
Converts an XML fragment to an CommonBaseEvent object without validation.
|
static CommonBaseEvent |
eventFromCanonicalXML(java.lang.String xmlFragmentString,
boolean validate)
Potentially validates and converts an XML fragment to an CommonBaseEvent object.
|
static CommonBaseEvent[] |
eventsFromCanonicalXMLDoc(org.w3c.dom.Document document)
Converts a Document Object Model (DOM) to an array of CommonBaseEvent
objects without validation.
|
static CommonBaseEvent[] |
eventsFromCanonicalXMLDoc(org.w3c.dom.Document document,
boolean validate)
Potentially validates and converts a Document Object Model (DOM) to an array of CommonBaseEvent
objects.
|
static CommonBaseEvent[] |
eventsFromCanonicalXMLDoc(java.io.File file)
Converts an XML document from an File to an array of
CommonBaseEvent objects without validation.
|
static CommonBaseEvent[] |
eventsFromCanonicalXMLDoc(java.io.File file,
boolean validate)
Potentially validates and converts an XML document from an File to an array of
CommonBaseEvent objects.
|
static CommonBaseEvent[] |
eventsFromCanonicalXMLDoc(org.xml.sax.InputSource inputSource)
Converts an XML document from an InputSource to an array
of CommonBaseEvent objects without validation.
|
static CommonBaseEvent[] |
eventsFromCanonicalXMLDoc(org.xml.sax.InputSource inputSource,
boolean validate)
Potentially validates and converts an XML document from an InputSource to an array
of CommonBaseEvent objects.
|
static CommonBaseEvent[] |
eventsFromCanonicalXMLDoc(java.io.InputStream inputStream)
Converts an XML document from an InputStream to an array
of CommonBaseEvent objects without validation.
|
static CommonBaseEvent[] |
eventsFromCanonicalXMLDoc(java.io.InputStream inputStream,
boolean validate)
Potentially validates and converts an XML document from an InputStream to an array
of CommonBaseEvent objects.
|
static CommonBaseEvent[] |
eventsFromCanonicalXMLDoc(java.lang.String xmlDocumentString)
Converts an XML document to an array of CommonBaseEvent
objects without validation.
|
static CommonBaseEvent[] |
eventsFromCanonicalXMLDoc(java.lang.String xmlDocumentString,
boolean validate)
Potentially validates and converts an XML document to an array of CommonBaseEvent
objects.
|
static void |
fromCanonicalXMLDocString(AssociationEngine associationEngine,
java.lang.String xmlDocumentString)
Deprecated. Use associationEnginesFromCanonicalXMLDoc(String) . |
static void |
fromCanonicalXMLDocString(CommonBaseEvent commonBaseEvent,
java.lang.String xmlDocumentString)
Deprecated. Use eventsFromCanonicalXMLDoc(String) . |
static void |
fromCanonicalXMLString(AssociationEngine associationEngine,
java.lang.String xmlFragmentString)
Deprecated. Use associationEngineFromCanonicalXML(String) . |
static void |
fromCanonicalXMLString(CommonBaseEvent commonBaseEvent,
java.lang.String xmlFragmentString)
Deprecated. Use eventFromCanonicalXML(String) . |
static java.lang.String |
toCanonicalXMLDocString(AssociationEngine associationEngine)
Converts an AssociationEngine object into a formatted
serialized XML document.
|
static java.lang.String |
toCanonicalXMLDocString(AssociationEngine[] associationEngines)
Converts an array of AssociationEngine objects into a
formatted serialized XML document.
|
static java.lang.String |
toCanonicalXMLDocString(AssociationEngine[] associationEngines,
boolean format)
Converts an array of AssociationEngine objects into a
serialized XML document. |
static java.lang.String |
toCanonicalXMLDocString(AssociationEngine associationEngine,
boolean format)
Converts an AssociationEngine object into a serialized XML
document. |
static java.lang.String |
toCanonicalXMLDocString(CommonBaseEvent commonBaseEvent)
Converts an CommonBaseEvent object into a formatted
serialized XML document.
|
static java.lang.String |
toCanonicalXMLDocString(CommonBaseEvent[] commonBaseEvents)
Converts an array of CommonBaseEvent objects into a
formatted serialized XML document.
|
static java.lang.String |
toCanonicalXMLDocString(CommonBaseEvent[] commonBaseEvents,
boolean format)
Converts an array of CommonBaseEvent objects into a
serialized XML document. |
static java.lang.String |
toCanonicalXMLDocString(CommonBaseEvent commonBaseEvent,
boolean format)
Converts an CommonBaseEvent object into a serialized XML
document. |
static java.lang.String |
toCanonicalXMLString(AssociationEngine associationEngine)
Converts an AssociationEngine object into a serialized XML
fragment.
|
static java.lang.String |
toCanonicalXMLString(CommonBaseEvent commonBaseEvent)
Converts an CommonBaseEvent object into a formatted
serialized XML fragment.
|
static java.lang.String |
toCanonicalXMLString(CommonBaseEvent commonBaseEvent,
boolean format)
Converts an CommonBaseEvent object into a serialized XML
fragment. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EventFormatter()
Method Detail |
public static java.lang.String toCanonicalXMLDocString(AssociationEngine associationEngine)
AssociationEngine
object into a formatted
serialized XML document.
associationEngine
- The AssociationEngine
to serialize.
AssociationEngine
object.public static java.lang.String toCanonicalXMLDocString(AssociationEngine[] associationEngines)
AssociationEngine
objects into a
formatted serialized XML document.
associationEngines
- The array of AssociationEngine
objects to
serialize.
AssociationEngine
objects.public static java.lang.String toCanonicalXMLDocString(AssociationEngine associationEngine, boolean format)
AssociationEngine
object into a serialized XML
document. Formatting is based on the format parameter.
associationEngine
- The AssociationEngine
to serialize.format
- If the serialized XML document is formatted with
platform-dependent new line(s) and tab(s).
AssociationEngine
object.public static java.lang.String toCanonicalXMLDocString(AssociationEngine[] associationEngines, boolean format)
AssociationEngine
objects into a
serialized XML document. Formatting is based on the format parameter.
associationEngines
- The array of AssociationEngine
objects to
serialize.format
- If the serialized XML document is formatted with
platform-dependent new line(s) and tab(s).
AssociationEngine
objects.public static java.lang.String toCanonicalXMLString(AssociationEngine associationEngine)
AssociationEngine
object into a serialized XML
fragment.
associationEngine
- The AssociationEngine
to serialize.
AssociationEngine
object.public static void fromCanonicalXMLDocString(AssociationEngine associationEngine, java.lang.String xmlDocumentString)
associationEnginesFromCanonicalXMLDoc(String)
.
AssociationEngine
object.
associationEngine
- The AssociationEngine
object to populate.xmlDocumentString
- The XML document containing the information used to populate
the AssociationEngine
object.public static AssociationEngine[] associationEnginesFromCanonicalXMLDoc(java.lang.String xmlDocumentString) throws FormattingException
AssociationEngine
objects without validation.
This API will return null
if no AssociationEngine
fragments
exist in the XML document.
xmlDocumentString
- The XML document to populate the
AssociationEngine
s array.
AssociationEngine
s array to be populated by
the XML document, or null.
FormattingException
- A de-serialization error has occurred.public static AssociationEngine[] associationEnginesFromCanonicalXMLDoc(java.lang.String xmlDocumentString, boolean validate) throws FormattingException
AssociationEngine
objects.
This API will return null
if no AssociationEngine
fragments
exist in the XML document.
xmlDocumentString
- The XML document to populate the
AssociationEngine
s array.validate
- If the XML document is validated using the Common Base Event v1.0.1 schema.
AssociationEngine
s array to be populated by
the XML document, or null.
FormattingException
- A de-serialization error has occurred.public static AssociationEngine[] associationEnginesFromCanonicalXMLDoc(org.xml.sax.InputSource inputSource) throws FormattingException
InputSource
to an array
of AssociationEngine
objects without validation.
This API will return null
if no AssociationEngine
fragments
exist in the XML document.
AssociationEngine
s array to be populated by
the XML document, or null.
FormattingException
- A de-serialization error has occurred.public static AssociationEngine[] associationEnginesFromCanonicalXMLDoc(org.xml.sax.InputSource inputSource, boolean validate) throws FormattingException
InputSource
to an array
of AssociationEngine
objects.
This API will return null
if no AssociationEngine
fragments
exist in the XML document.
validate
- If the XML document is validated using the Common Base Event v1.0.1 schema.
AssociationEngine
s array to be populated by
the XML document, or null.
FormattingException
- A de-serialization error has occurred.public static AssociationEngine[] associationEnginesFromCanonicalXMLDoc(java.io.InputStream inputStream) throws FormattingException
InputStream
to an array
of AssociationEngine
objects without validation.
This API will return null
if no AssociationEngine
fragments
exist in the XML document.
AssociationEngine
s array to be populated by
the XML document, or null.
FormattingException
- A de-serialization error has occurred.public static AssociationEngine[] associationEnginesFromCanonicalXMLDoc(java.io.InputStream inputStream, boolean validate) throws FormattingException
InputStream
to an array
of AssociationEngine
objects.
This API will return null
if no AssociationEngine
fragments
exist in the XML document.
validate
- If the XML document is validated using the Common Base Event v1.0.1 schema.
AssociationEngine
s array to be populated by
the XML document, or null.
FormattingException
- A de-serialization error has occurred.public static AssociationEngine[] associationEnginesFromCanonicalXMLDoc(org.w3c.dom.Document document) throws FormattingException
AssociationEngine
>
objects without validation.
This API will return null
if no AssociationEngine
elements
exist in the Document Object Model (DOM).
document
- The Document Object Model (DOM) to populate the AssociationEngine
s
array.
AssociationEngine
s array to be populated by the
Document Object Model (DOM), or null.
FormattingException
- A de-serialization error has occurred.public static AssociationEngine[] associationEnginesFromCanonicalXMLDoc(org.w3c.dom.Document document, boolean validate) throws FormattingException
AssociationEngine
objects.
This API will return null
if no AssociationEngine
elements
exist in the Document Object Model (DOM).
document
- The Document Object Model (DOM) to populate the AssociationEngine
s
array.validate
- If the Document Object Model (DOM) is validated using the Common Base Event v1.0.1 schema.
AssociationEngine
s array to be populated by the
Document Object Model (DOM), or null.
FormattingException
- A de-serialization error has occurred.public static AssociationEngine[] associationEnginesFromCanonicalXMLDoc(java.io.File file) throws FormattingException
File
to an array of
AssociationEngine
objects without validation.
This API will return null
if no AssociationEngine
fragments
exist in the XML document.
AssociationEngine
s array to be populated by
the XML document, or null.
FormattingException
- A de-serialization error has occurred.public static AssociationEngine[] associationEnginesFromCanonicalXMLDoc(java.io.File file, boolean validate) throws FormattingException
File
to an array of
AssociationEngine
objects.
This API will return null
if no AssociationEngine
fragments
exist in the XML document.
validate
- If the XML document is validated using the Common Base Event v1.0.1 schema.
AssociationEngine
s array to be populated by
the XML document, or null.
FormattingException
- A de-serialization error has occurred.public static void fromCanonicalXMLString(AssociationEngine associationEngine, java.lang.String xmlFragmentString)
associationEngineFromCanonicalXML(String)
.
AssociationEngine
object.
associationEngine
- The AssociationEngine
object to populate.xmlFragmentString
- The XML fragment containing the information used to populate
the AssociationEngine
object.public static AssociationEngine associationEngineFromCanonicalXML(java.lang.String xmlFragmentString) throws FormattingException
AssociationEngine
object without validation.
This API will return null
if no AssociationEngine
fragment
exists in the XML fragment.
xmlFragmentString
- The XML fragment to populate the
AssociationEngine
object.
AssociationEngine
to be populated by the XML
fragment, or null.
FormattingException
- A de-serialization error has occurred.public static AssociationEngine associationEngineFromCanonicalXML(java.lang.String xmlFragmentString, boolean validation) throws FormattingException
AssociationEngine
object.
This API will return null
if no AssociationEngine
fragment
exists in the XML fragment.
xmlFragmentString
- The XML fragment to populate the
AssociationEngine
object.
AssociationEngine
to be populated by the XML
fragment, or null.
FormattingException
- A de-serialization error has occurred.public static java.lang.String toCanonicalXMLDocString(CommonBaseEvent commonBaseEvent)
CommonBaseEvent
object into a formatted
serialized XML document.
commonBaseEvent
- The CommonBaseEvent
to serialize.
CommonBaseEvent
object.public static java.lang.String toCanonicalXMLDocString(CommonBaseEvent[] commonBaseEvents)
CommonBaseEvent
objects into a
formatted serialized XML document.
commonBaseEvents
- The array of CommonBaseEvent
objects to
serialize.
CommonBaseEvent
objects.public static java.lang.String toCanonicalXMLDocString(CommonBaseEvent commonBaseEvent, boolean format)
CommonBaseEvent
object into a serialized XML
document. Formatting is based on the format parameter.
commonBaseEvent
- The CommonBaseEvent
object to serialize.format
- If the serialized XML document is formatted with
platform-dependent new line(s) and tab(s).
CommonBaseEvent
object.public static java.lang.String toCanonicalXMLDocString(CommonBaseEvent[] commonBaseEvents, boolean format)
CommonBaseEvent
objects into a
serialized XML document. Formatting is based on the format parameter.
commonBaseEvents
- The array of CommonBaseEvent
objects to
serialize.format
- If the serialized XML document is formatted with
platform-dependent new line(s) and tab(s).
CommonBaseEvent
objects.public static java.lang.String toCanonicalXMLString(CommonBaseEvent commonBaseEvent)
CommonBaseEvent
object into a formatted
serialized XML fragment.
commonBaseEvent
- The CommonBaseEvent
to serialize.
CommonBaseEvent
object.public static java.lang.String toCanonicalXMLString(CommonBaseEvent commonBaseEvent, boolean format)
CommonBaseEvent
object into a serialized XML
fragment. Formatting is based on the format parameter.
commonBaseEvent
- The CommonBaseEvent
to serialize.format
- If the serialized XML fragment is formatted with
platform-dependent new line(s) and tab(s).
CommonBaseEvent
object.public static void fromCanonicalXMLDocString(CommonBaseEvent commonBaseEvent, java.lang.String xmlDocumentString)
eventsFromCanonicalXMLDoc(String)
.
CommonBaseEvent
object.
If the XML document contains more than one CommonBaseEvent
element, the first CommonBaseEvent
element if used.
commonBaseEvent
- The CommonBaseEvent
to be populated by the XML
document.xmlDocumentString
- The XML document to populate the CommonBaseEvent
object.public static CommonBaseEvent[] eventsFromCanonicalXMLDoc(java.lang.String xmlDocumentString) throws FormattingException
CommonBaseEvent
objects without validation.
This API will return null
if no CommonBaseEvent
fragments
exist in the XML document.
xmlDocumentString
- The XML document to populate the CommonBaseEvent
s
array.
CommonBaseEvent
s array to be populated by the
XML document, or null.
FormattingException
- A de-serialization error has occurred.public static CommonBaseEvent[] eventsFromCanonicalXMLDoc(java.lang.String xmlDocumentString, boolean validate) throws FormattingException
CommonBaseEvent
objects.
This API will return null
if no CommonBaseEvent
fragments
exist in the XML document.
xmlDocumentString
- The XML document to populate the CommonBaseEvent
s
array.validate
- If the XML document is validated using the Common Base Event v1.0.1 schema.
CommonBaseEvent
s array to be populated by the
XML document, or null.
FormattingException
- A de-serialization error has occurred.public static CommonBaseEvent[] eventsFromCanonicalXMLDoc(org.w3c.dom.Document document) throws FormattingException
CommonBaseEvent
objects without validation.
This API will return null
if no CommonBaseEvent
elements
exist in the Document Object Model (DOM).
document
- The Document Object Model (DOM) to populate the CommonBaseEvent
s
array.
CommonBaseEvent
s array to be populated by the
Document Object Model (DOM), or null.
FormattingException
- A de-serialization error has occurred.public static CommonBaseEvent[] eventsFromCanonicalXMLDoc(org.w3c.dom.Document document, boolean validate) throws FormattingException
CommonBaseEvent
objects.
This API will return null
if no CommonBaseEvent
elements
exist in the Document Object Model (DOM).
document
- The Document Object Model (DOM) to populate the CommonBaseEvent
s
array.validate
- If the Document Object Model (DOM) is validated using the Common Base Event v1.0.1 schema.
CommonBaseEvent
s array to be populated by the
Document Object Model (DOM), or null.
FormattingException
- A de-serialization error has occurred.public static CommonBaseEvent[] eventsFromCanonicalXMLDoc(org.xml.sax.InputSource inputSource) throws FormattingException
InputSource
to an array
of CommonBaseEvent
objects without validation.
This API will return null
if no CommonBaseEvent
fragments
exist in the XML document.
CommonBaseEvent
s array to be populated by the
XML document, or null.
FormattingException
- A de-serialization error has occurred.public static CommonBaseEvent[] eventsFromCanonicalXMLDoc(org.xml.sax.InputSource inputSource, boolean validate) throws FormattingException
InputSource
to an array
of CommonBaseEvent
objects.
This API will return null
if no CommonBaseEvent
fragments
exist in the XML document.
validate
- If the XML document is validated using the Common Base Event v1.0.1 schema.
CommonBaseEvent
s array to be populated by the
XML document, or null.
FormattingException
- A de-serialization error has occurred.public static CommonBaseEvent[] eventsFromCanonicalXMLDoc(java.io.InputStream inputStream) throws FormattingException
InputStream
to an array
of CommonBaseEvent
objects without validation.
This API will return null
if no CommonBaseEvent
fragments
exist in the XML document.
CommonBaseEvent
s array to be populated by the
XML document, or null.
FormattingException
- A de-serialization error has occurred.public static CommonBaseEvent[] eventsFromCanonicalXMLDoc(java.io.InputStream inputStream, boolean validate) throws FormattingException
InputStream
to an array
of CommonBaseEvent
objects.
This API will return null
if no CommonBaseEvent
fragments
exist in the XML document.
validate
- If the XML document is validated using the Common Base Event v1.0.1 schema.
CommonBaseEvent
s array to be populated by the
XML document, or null.
FormattingException
- A de-serialization error has occurred.public static CommonBaseEvent[] eventsFromCanonicalXMLDoc(java.io.File file) throws FormattingException
File
to an array of
CommonBaseEvent
objects without validation.
This API will return null
if no CommonBaseEvent
fragments
exist in the XML document.
CommonBaseEvent
s array to be populated by the
XML document, or null.
FormattingException
- A de-serialization error has occurred.public static CommonBaseEvent[] eventsFromCanonicalXMLDoc(java.io.File file, boolean validate) throws FormattingException
File
to an array of
CommonBaseEvent
objects.
This API will return null
if no CommonBaseEvent
fragments
exist in the XML document.
validate
- If the XML document is validated using the Common Base Event v1.0.1 schema.
CommonBaseEvent
s array to be populated by the
XML document, or null.
FormattingException
- A de-serialization error has occurred.public static void fromCanonicalXMLString(CommonBaseEvent commonBaseEvent, java.lang.String xmlFragmentString)
eventFromCanonicalXML(String)
.
CommonBaseEvent
object.
commonBaseEvent
- The CommonBaseEvent
to be populated by the XML
fragment.xmlFragmentString
- The XML fragment to populate the CommonBaseEvent
object.public static CommonBaseEvent eventFromCanonicalXML(java.lang.String xmlFragmentString) throws FormattingException
CommonBaseEvent
object without validation.
This API will return null
if no CommonBaseEvent
fragment
exists in the XML fragment.
xmlFragmentString
- The XML fragment to populate the CommonBaseEvent
object.
CommonBaseEvent
to be populated by the XML
fragment, or null.
FormattingException
- A de-serialization error has occurred.public static CommonBaseEvent eventFromCanonicalXML(java.lang.String xmlFragmentString, boolean validate) throws FormattingException
CommonBaseEvent
object.
This API will return null
if no CommonBaseEvent
fragment
exists in the XML fragment.
xmlFragmentString
- The XML fragment to populate the CommonBaseEvent
object.validate
- If the XML fragment is validated using the Common Base Event v1.0.1 schema.
CommonBaseEvent
to be populated by the XML
fragment, or null.
FormattingException
- A de-serialization error has occurred.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |