Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.hyades.logging.events
Class CbeFormatter

    java.lang.Object
      |
      +--org.eclipse.hyades.logging.events.CbeFormatter

public final class CbeFormatter
extends java.lang.Object

The CbeFormatter class defines a utility object used for converting, serializing and deserializing CommonBaseEvent and related objects. It is mostly used by other objects in this API to facilitate shared functionality, but can be used by anyone using the API.

Since:
  1.0
Version:
  1.0.1
Author:
  Richard K. Duggan, Paul E. Slauenwhite, John K. Gerken
See Also:
  `CommonBaseEventImpl`, `AssociationEngineImpl`

Field Summary
`static java.lang.String` | `xml_version` Deprecated. Use ICommonBaseEvent#getVersion() as of 1.0.1.

Constructor Summary
`CbeFormatter()`

Method Summary
`static java.lang.String` | `convertDateToXmlSchemaDateTime(long date)` Converts a long representing UTC in milliseconds to the XML Schema datetime format
`static long` | `convertXmlSchemaDateTimeToDate(java.lang.String dateTime)` 3.2.7.1 Lexical representation A single lexical representation, which is a subset of the lexical representations allowed by [ISO 8601], is allowed for dateTime.
`static void` | `fromCanonicalXMLDocString(IAssociationEngine engine, java.lang.String aXMLDocString)` Internalizes a passed XML document String into a passed IAssociationEngine object.
`static void` | `fromCanonicalXMLDocString(ICommonBaseEvent event, java.lang.String aXMLDocString)` Converts an XML document to an ICommonBaseEvent object.
`static void` | `fromCanonicalXMLString(IAssociationEngine engine, java.lang.String xmlString)` Internalizes a passed XML fragment String into a passed IAssociationEngine object.
`static void` | `fromCanonicalXMLString(ICommonBaseEvent commonBaseEvent, java.lang.String xmlString)` Converts an XML fragment to an ICommonBaseEvent object.
`static java.lang.String` | `getEventFormatterVersion()` Deprecated. Use ICommonBaseEvent#getVersion() as of 1.0.1.
`static java.lang.String` | `toCanonicalXMLDocString(AssociationEngineImpl engine)` Converts an IAssociationEngine object into a formatted serialized XML document.
`static java.lang.String` | `toCanonicalXMLDocString(AssociationEngineImpl engine, boolean format)` Converts an IAssociationEngine object into a serialized XML document.
`static java.lang.String` | `toCanonicalXMLDocString(ICommonBaseEvent commonBaseEvent)` Converts an ICommonBaseEvent object into a formatted serialized XML document.
`static java.lang.String` | `toCanonicalXMLDocString(ICommonBaseEvent commonBaseEvent, boolean format)` Converts an ICommonBaseEvent object into a serialized XML document.
`static java.lang.String` | `toCanonicalXMLString(IAssociationEngine associationEngine)` Converts an IAssociationEngine object into a serialized XML fragment.
`static java.lang.String` | `toCanonicalXMLString(ICommonBaseEvent commonBaseEvent)` Converts an ICommonBaseEvent object into a formatted serialized XML fragment.
`static java.lang.String` | `toCanonicalXMLString(ICommonBaseEvent commonBaseEvent, boolean format)` Converts an ICommonBaseEvent object into a serialized XML fragment.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### xml_version

    public static final java.lang.String xml_version

  Deprecated. Use ICommonBaseEvent#getVersion() as of 1.0.1.

  Public static string version of the Common Base Event XML schema.

  See Also:
    Constant Field Values

Constructor Detail

### CbeFormatter

    public CbeFormatter()

Method Detail

### toCanonicalXMLString

    public static java.lang.String toCanonicalXMLString(IAssociationEngine associationEngine)

  Converts an IAssociationEngine object into a serialized XML fragment.

  Returns:
    An XML fragment String representing the parameter IAssociationEngine object.
  Since:
    1.0

### fromCanonicalXMLString

    public static void fromCanonicalXMLString(IAssociationEngine engine,
                                              java.lang.String xmlString)

  Internalizes a passed XML fragment String into a passed IAssociationEngine object.

  Parameters:
    `engine` - The IAssociationEngine object to populate.
    `xmlString` - The XML fragment containing the information used to populate the Association Engine object.
  Since:
    V 1.0

### fromCanonicalXMLDocString

    public static void fromCanonicalXMLDocString(IAssociationEngine engine,
                                                 java.lang.String aXMLDocString)

  Internalizes a passed XML document String into a passed IAssociationEngine object.

  Parameters:
    `engine` - The IAssociationEngine object to populate.
    `aXMLDocString` - The XML document containing the information used to populate the Association Engine object.
  Since:
    1.0

### toCanonicalXMLDocString

    public static java.lang.String toCanonicalXMLDocString(AssociationEngineImpl engine)

  Converts an IAssociationEngine object into a formatted serialized XML document.

  Parameters:
    `engine` - The IAssociationEngine to serialize.
  Returns:
    An XML document String representing the parameter IAssociationEngine object.
  Since:
    1.0

### toCanonicalXMLDocString

    public static java.lang.String toCanonicalXMLDocString(AssociationEngineImpl engine,
                                                           boolean format)

  Converts an IAssociationEngine object into a serialized XML document. Formatting is based on the format parameter.

  Parameters:
    `engine` - The IAssociationEngine to serialize.
    `format` - If the serialized XML document is formatted with platform-dependent new line(s) and tab(s).
  Returns:
    An XML document String representing the parameter IAssociationEngine object.
  Since:
    1.0

### toCanonicalXMLString

    public static java.lang.String toCanonicalXMLString(ICommonBaseEvent commonBaseEvent)

  Converts an ICommonBaseEvent object into a formatted serialized XML fragment. The structure of the serialized XML fragment is based on the parameter ICommonBaseEvent's version.

  Parameters:
    `commonBaseEvent` - The ICommonBaseEvent to serialize.
  Returns:
    An XML fragment String representing the parameter ICommonBaseEvent object.
  Since:
    1.0

### toCanonicalXMLString

    public static java.lang.String toCanonicalXMLString(ICommonBaseEvent commonBaseEvent,
                                                        boolean format)

  Converts an ICommonBaseEvent object into a serialized XML fragment. The format of the serialized XML fragment is based on the parameter ICommonBaseEvent's version. Formatting is based on the format parameter.

  Parameters:
    `commonBaseEvent` - The ICommonBaseEvent to serialize.
    `format` - If the serialized XML fragment is formatted with platform-dependent new line(s) and tab(s).
  Returns:
    An XML fragment String representing the parameter ICommonBaseEvent object.
  Since:
    1.0

### toCanonicalXMLDocString

    public static java.lang.String toCanonicalXMLDocString(ICommonBaseEvent commonBaseEvent)

  Converts an ICommonBaseEvent object into a formatted serialized XML document. The structure of the serialized XML document is based on the parameter ICommonBaseEvent's version.

  Parameters:
    `commonBaseEvent` - The ICommonBaseEvent to serialize.
  Returns:
    An XML fragment String representing the parameter ICommonBaseEvent object.
  Since:
    1.0

### toCanonicalXMLDocString

    public static java.lang.String toCanonicalXMLDocString(ICommonBaseEvent commonBaseEvent,
                                                           boolean format)

  Converts an ICommonBaseEvent object into a serialized XML document. Formatting is based on the format parameter. The format of the serialized XML document is based on the parameter ICommonBaseEvent's version.

  Parameters:
    `commonBaseEvent` - The ICommonBaseEvent to serialize.
    `format` - If the serialized XML document is formatted with platform-dependent new line(s) and tab(s).
  Returns:
    An XML fragment String representing the parameter ICommonBaseEvent object.
  Since:
    1.0

### fromCanonicalXMLString

    public static void fromCanonicalXMLString(ICommonBaseEvent commonBaseEvent,
                                              java.lang.String xmlString)

  Converts an XML fragment to an ICommonBaseEvent object. The format of the XML fragment is based on the parameter ICommonBaseEvent's version.

  Parameters:
    `commonBaseEvent` - The ICommonBaseEvent to be populated by the XML fragment.
    `xmlString` - The XML fragment to populate the ICommonBaseEvent object.
  Since:
    1.0

### fromCanonicalXMLDocString

    public static void fromCanonicalXMLDocString(ICommonBaseEvent event,
                                                 java.lang.String aXMLDocString)

  Converts an XML document to an ICommonBaseEvent object. The format of the XML document is based on the parameter ICommonBaseEvent's version.

  Since:
    1.0

### convertXmlSchemaDateTimeToDate

    public static long convertXmlSchemaDateTimeToDate(java.lang.String dateTime)

  3.2.7.1 Lexical representation A single lexical representation, which is a subset of the lexical representations allowed by [ISO 8601], is allowed for dateTime. This lexical representation is the [ISO 8601] extended format CCYY-MM-DDThh:mm:ss where "CC" represents the century, "YY" the year, "MM" the month and "DD" the day, preceded by an optional leading "-" sign to indicate a negative number. If the sign is omitted, "+" is assumed. The letter "T" is the date/time separator and "hh", "mm", "ss" represent hour, minute and second respectively. Additional digits can be used to increase the precision of fractional seconds if desired i.e the format ss.ss... with any number of digits after the decimal point is supported. The fractional seconds part is optional; other parts of the lexical form are not optional. To accommodate year values greater than 9999 additional digits can be added to the left of this representation. Leading zeros are required if the year value would otherwise have fewer than four digits; otherwise they are forbidden. The year 0000 is prohibited. The CCYY field must have at least four digits, the MM, DD, SS, hh, mm and ss fields exactly two digits each (not counting fractional seconds); leading zeroes must be used if the field would otherwise have too few digits. This representation may be immediately followed by a "Z" to indicate Coordinated Universal Time (UTC) or, to indicate the time zone, i.e. the difference between the local time and Coordinated Universal Time, immediately followed by a sign, + or -, followed by the difference from UTC represented as hh:mm (note: the minutes part is required). See ISO 8601 Date and Time Formats (?D) for details about legal values in the various fields. If the time zone is included, both hours and minutes must be present. For example, to indicate 1:20 pm on May the 31st, 1999 for Eastern Standard Time which is 5 hours behind Coordinated Universal Time (UTC), one would write: 1999-05-31T13:20:00-05:00.

### convertDateToXmlSchemaDateTime

    public static java.lang.String convertDateToXmlSchemaDateTime(long date)

  Converts a long representing UTC in milliseconds to the XML Schema datetime format

  Parameters:
    `date` - the date in milliseconds
  Returns:
    String the date in the XML Schema datetime format

### getEventFormatterVersion

    public static final java.lang.String getEventFormatterVersion()

  Deprecated. Use ICommonBaseEvent#getVersion() as of 1.0.1.

  Returns the version of the Common Base Event XML schema.

  Returns:
    String The version of the Common Base Event XML schema.

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD