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

## org.deepfs.fsml.util
Class ParserUtil

    java.lang.Object
      org.deepfs.fsml.util.ParserUtil

    public final class ParserUtil

extends Object

Utility methods for file parsers.

Author:
  Workgroup DBIS, University of Konstanz 2005-10, ISC License, Bastian Lemke

Method Summary
`static XMLGregorianCalendar` | `convertDateTime(Date date)` Converts a date value to an xml date value.
`static XMLGregorianCalendar` | `convertDateTime(GregorianCalendar gc)` Converts a date value to an xml date value.
`static Duration` | `convertDuration(byte[] value)` Checks if the value is of the form `mm:ss` or if it is a milliseconds value and returns a `Duration` instance.
`static Duration` | `convertMsDuration(int milliseconds)` Converts a duration value in milliseconds to an `Duration` instance.
`static XMLGregorianCalendar` | `convertYear(int year)` Converts a year value to an xml date value.

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

Method Detail

### convertMsDuration

    public static Duration convertMsDuration(int milliseconds)

  Converts a duration value in milliseconds to an `Duration` instance.

  Parameters:
    `milliseconds` - the number of milliseconds to convert
  Returns:
    the `Duration` instance or `null` if the conversion fails

### convertDuration

    public static Duration convertDuration(byte[] value)

  Checks if the value is of the form `mm:ss` or if it is a milliseconds value and returns a `Duration` instance.

  Parameters:
    `value` - the byte array to convert
  Returns:
    the `Duration` instance or `null` if the conversion fails

### convertDateTime

    public static XMLGregorianCalendar convertDateTime(GregorianCalendar gc)

  Converts a date value to an xml date value.

  Parameters:
    `gc` - the calendar value to convert
  Returns:
    the calendar

### convertDateTime

    public static XMLGregorianCalendar convertDateTime(Date date)

  Converts a date value to an xml date value.

  Parameters:
    `date` - the `Date` value to convert
  Returns:
    the calendar

### convertYear

    public static XMLGregorianCalendar convertYear(int year)

  Converts a year value to an xml date value.

  Parameters:
    `year` - the year value to convert
  Returns:
    the calendar

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