org.modeshape.jcr.value

## Interface Reference

- All Superinterfaces:
    Comparable<Reference>, Serializable
  All Known Implementing Classes:
    NodeKeyReference, StringReference

      @Immutable
      public interface Reference
      extends Comparable<Reference>, Serializable

  A representation of a reference to another node. Node references may not necessarily resolve to an existing node.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getString()` Get the string form of the Reference.
    `String` | `getString(TextEncoder encoder)` Get the encoded string form of the Reference, using the supplied encoder to encode characters in the reference.
    `boolean` | `isForeign()` Determine whether this reference is a reference to a node which belongs to another source as the owning node.
    `boolean` | `isSimple()` Determine whether this reference is a uni-directional reference
    `boolean` | `isWeak()` Determine whether this reference is considered a weak reference.

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

- - ### Method Detail

    - #### getString

          String getString()

      Get the string form of the Reference. The `default encoder` is used to encode characters in the reference.
      Returns:
        the encoded string
      See Also:
        `getString(TextEncoder)`

    - #### getString

          String getString(TextEncoder encoder)

      Get the encoded string form of the Reference, using the supplied encoder to encode characters in the reference.
      Parameters:
        `encoder` - the encoder to use, or null if the `default encoder` should be used
      Returns:
        the encoded string
      See Also:
        `getString()`

    - #### isWeak

          boolean isWeak()

      Determine whether this reference is considered a weak reference.
      Returns:
        true if this is a weak reference, or false otherwise

    - #### isForeign

          boolean isForeign()

      Determine whether this reference is a reference to a node which belongs to another source as the owning node.
      Returns:
        true if the reference is foreign, false otherwise

    - #### isSimple

          boolean isSimple()

      Determine whether this reference is a uni-directional reference
      Returns:
        true if this is a uni-directional, or false otherwise

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.