org.hypergraphdb.atom
Enum HGAtomRef.Mode

java.lang.Object
  extended by java.lang.Enum<HGAtomRef.Mode>
      extended by org.hypergraphdb.atom.HGAtomRef.Mode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<HGAtomRef.Mode>
Enclosing class:
HGAtomRef

public static enum HGAtomRef.Mode
extends java.lang.Enum<HGAtomRef.Mode>


Enum Constant Summary
floating
          This constant define an FLOATING reference mode.
hard
          This constant define a HARD reference mode.
symbolic
          This constant define a SYMBOLIC reference mode.
 
Method Summary
static HGAtomRef.Mode get(byte code)
           
 byte getCode()
           
static HGAtomRef.Mode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static HGAtomRef.Mode[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

hard

public static final HGAtomRef.Mode hard
This constant define a HARD reference mode. This behavior of hard references is like the Unix file system hard links: when all hard references are removed from HyperGraph, the referent is removed as well.


symbolic

public static final HGAtomRef.Mode symbolic
This constant define a SYMBOLIC reference mode. This behavior of symbolic references is like the Unix file system symbolic links: they are just pointers to the referent without an effect on its lifetime.


floating

public static final HGAtomRef.Mode floating
This constant define an FLOATING reference mode. This behavior of floating references is particular to HyperGraph: when removed they will leave the referent as a temporary atom that will eventually be automatically removed from HyperGraph if not used. This behavior relies on the MANAGED system-level atom attribute. If the referent is not managed when the last floating reference is removed, it will be tagged as managed from then on. Thus it is still possible to access the atom by some other means (e.g. a handle to it is kept somewhere or through a query) and re-establish a HGAtomRef to it.

Method Detail

values

public static final HGAtomRef.Mode[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(HGAtomRef.Mode c : HGAtomRef.Mode.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static HGAtomRef.Mode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getCode

public byte getCode()

get

public static HGAtomRef.Mode get(byte code)