edu.ucsb.nceas.metacat.dataone.convert

## Class LogV2toV1Converter

- java.lang.Object
- - edu.ucsb.nceas.metacat.dataone.convert.LogV2toV1Converter

-     public class LogV2toV1Converter
      extends java.lang.Object

  This class represents a converter to convert an DataONE v2 Log object to a v1 Log object. It probably will be removed to d1_common_java in the future.
  Author:
    tao

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `LogV2toV1Converter.LogEntryV2toV1Converter` A class to convert a v2 LogEntry object to a v1 LogEntry object
    `static class` | `LogV2toV1Converter.V1LogEntryWrapper` A wrapper class to gap the difference in the signature of setEvent between the v2 and v1 LogEntry objects.
    `static class` | `LogV2toV1Converter.V2LogEntryWrapper` A wrapper class to gap the difference in the signature of setEvent between the v2 and v1 LogEntry objects.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LogV2toV1Converter()` Default constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.dataone.service.types.v1.Log` | `convert(org.dataone.service.types.v2.Log logV2)` Convert a v2 Log object to a v1 Log object

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LogV2toV1Converter

          public LogV2toV1Converter()

      Default constructor

  - ### Method Detail

    - #### convert

          public org.dataone.service.types.v1.Log convert(org.dataone.service.types.v2.Log logV2)
                                                   throws java.lang.InstantiationException,
                                                          java.lang.IllegalAccessException,
                                                          java.lang.reflect.InvocationTargetException,
                                                          org.dataone.exceptions.MarshallingException,
                                                          java.io.IOException

      Convert a v2 Log object to a v1 Log object
      Parameters:
        `logV2` - - the v2 Log object which needs to be converted
      Returns:
        a v1 Log object. If the logV2 is null, null will be returned.
      Throws:
        `java.io.IOException`
        `JiBXException`
        `java.lang.reflect.InvocationTargetException`
        `java.lang.IllegalAccessException`
        `java.lang.InstantiationException`
        `org.dataone.exceptions.MarshallingException`

Copyright © 2020 Regents of the University of California. All Rights Reserved.