edu.ucsb.nceas.metacat.dataone

## Class D1NodeVersionChecker

- java.lang.Object
- - edu.ucsb.nceas.metacat.dataone.D1NodeVersionChecker

-     public class D1NodeVersionChecker
      extends java.lang.Object

  This class will contact the CN to figure out the version of the service for the given node
  Author:
    tao

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `HIGHESTVERSION`
    `static java.lang.String` | `SECONDHIGHESTVERSION`
    `static java.lang.String` | `V1`
    `static java.lang.String` | `V2`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `D1NodeVersionChecker(org.dataone.service.types.v1.NodeReference nodeId)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getVersion(java.lang.String serviceName)` Get the version of the service name for the node.

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

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

- - ### Field Detail

    - #### V1

          public static final java.lang.String V1

      See Also:
        Constant Field Values

    - #### V2

          public static final java.lang.String V2

      See Also:
        Constant Field Values

    - #### HIGHESTVERSION

          public static final java.lang.String HIGHESTVERSION

      See Also:
        Constant Field Values

    - #### SECONDHIGHESTVERSION

          public static final java.lang.String SECONDHIGHESTVERSION

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### D1NodeVersionChecker

          public D1NodeVersionChecker(org.dataone.service.types.v1.NodeReference nodeId)

      Constructor
      Parameters:
        `nodeId` -

  - ### Method Detail

    - #### getVersion

          public java.lang.String getVersion(java.lang.String serviceName)
                                      throws org.dataone.service.exceptions.ServiceFailure,
                                             org.dataone.service.exceptions.NotImplemented

      Get the version of the service name for the node. If we can't find the service for the node, a NotFound exception will return. The null maybe return.
      Parameters:
        `serviceName` -
      Returns:
        the version of the service
      Throws:
        `org.dataone.service.exceptions.NotImplemented`
        `org.dataone.service.exceptions.ServiceFailure`

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