Package com.onwbp.adaptation

# Class AdaptationReference

java.lang.Object
com.onwbp.adaptation.AdaptationName
com.onwbp.adaptation.AdaptationReference

public final class AdaptationReference extends AdaptationName
Uniquely identifies a dataset in a given dataspace or snapshot. The dataset reference is persistent.

See Also:
  - `Adaptation.getDatasetReference()`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `MAX_LENGTH`
  Maximum length of a reference string: 64.
  `static final String`
  `REFERENCE_PATTERN`
  Regular expression that controls the syntax of a dataset reference.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `checkAdaptationReferenceStringName(String stringName)`
  Throws an `IllegalArgumentException` if the syntax of the `String` parameter is not valid for the creation of an `AdaptationReference`.
  `boolean`
  `equals(Object x)`
  `static AdaptationReference`
  `forPersistentName(String aPublicName)`
  Returns a reference to a dataset given its name.
  `String`
  `getStringName()`
  Returns the string name.
  `int`
  `hashCode()`

  ### Methods inherited from class com.onwbp.adaptation.AdaptationName

  `forName, toString`

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

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### MAX_LENGTH

    public static final int MAX_LENGTH
    Maximum length of a reference string: 64.
    See Also:
      - Constant Field Values

  - ### REFERENCE_PATTERN

    public static final String REFERENCE_PATTERN
    Regular expression that controls the syntax of a dataset reference. The regular expression is:

    > "[a-zA-Z_][-a-zA-Z0-9_.]*"

    See Also:
      - Constant Field Values

- ## Method Details

  - ### checkAdaptationReferenceStringName

    public static void checkAdaptationReferenceStringName(String stringName)
    Throws an `IllegalArgumentException` if the syntax of the `String` parameter is not valid for the creation of an `AdaptationReference`.

  - ### forPersistentName

    public static AdaptationReference forPersistentName(String aPublicName)
    Returns a reference to a dataset given its name.

  - ### equals

    public boolean equals(Object x)
    Overrides:
      `equals` in class `Object`

  - ### getStringName

    public String getStringName()
    Description copied from class: `AdaptationName`
    Returns the string name.
    Specified by:
      `getStringName` in class `AdaptationName`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`