org.restlet.ext.atom
Enum Relation

java.lang.Object
  extended by java.lang.Enum<Relation>
      extended by org.restlet.ext.atom.Relation
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Relation>

public enum Relation
extends java.lang.Enum<Relation>

Enumeration of relation types.

Author:
Jerome Louvel

Enum Constant Summary
ALTERNATE
          Signifies that the IRI in the value of the href attribute identifies an alternate version of the resource described by the containing element.
EDIT
          Signifies that the IRI in the value of the href attribute identifies a resource that is able to edit the current resource.
ENCLOSURE
          Signifies that the IRI in the value of the href attribute identifies a related resource that is potentially large in size and might require special handling.
FIRST
          Signifies that the IRI in the value of the href attribute identifies the first resource in a series including the current resource.
LAST
          Signifies that the IRI in the value of the href attribute identifies the last resource in a series including the current resource.
NEXT
          Signifies that the IRI in the value of the href attribute identifies the next resource in a series including the current resource.
PREVIOUS
          Signifies that the IRI in the value of the href attribute identifies the previous resource in a series including the current resource.
RELATED
          Signifies that the IRI in the value of the href attribute identifies a resource related to the resource described by the containing element.
SELF
          Signifies that the IRI in the value of the href attribute identifies a resource equivalent to the containing element.
VIA
          Signifies that the IRI in the value of the href attribute identifies a resource that is the source of the information provided in the containing element.
 
Method Summary
static Relation parse(java.lang.String rel)
          Parses a relation name into the equivalent enumeration item.
static java.lang.String toString(Relation rel)
          Return a String object representing the specified Relation.
static Relation valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Relation[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ALTERNATE

public static final Relation ALTERNATE
Signifies that the IRI in the value of the href attribute identifies an alternate version of the resource described by the containing element.


EDIT

public static final Relation EDIT
Signifies that the IRI in the value of the href attribute identifies a resource that is able to edit the current resource.


ENCLOSURE

public static final Relation ENCLOSURE
Signifies that the IRI in the value of the href attribute identifies a related resource that is potentially large in size and might require special handling. For atom:link elements with rel="enclosure", the length attribute SHOULD be provided.


FIRST

public static final Relation FIRST
Signifies that the IRI in the value of the href attribute identifies the first resource in a series including the current resource.


LAST

public static final Relation LAST
Signifies that the IRI in the value of the href attribute identifies the last resource in a series including the current resource.


NEXT

public static final Relation NEXT
Signifies that the IRI in the value of the href attribute identifies the next resource in a series including the current resource.


PREVIOUS

public static final Relation PREVIOUS
Signifies that the IRI in the value of the href attribute identifies the previous resource in a series including the current resource.


RELATED

public static final Relation RELATED
Signifies that the IRI in the value of the href attribute identifies a resource related to the resource described by the containing element.


SELF

public static final Relation SELF
Signifies that the IRI in the value of the href attribute identifies a resource equivalent to the containing element.


VIA

public static final Relation VIA
Signifies that the IRI in the value of the href attribute identifies a resource that is the source of the information provided in the containing element.

Method Detail

values

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

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

valueOf

public static Relation 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
java.lang.NullPointerException - if the argument is null

parse

public static Relation parse(java.lang.String rel)
Parses a relation name into the equivalent enumeration item.

Parameters:
rel - The relation name to parse.
Returns:
The equivalent enumeration item.

toString

public static java.lang.String toString(Relation rel)
Return a String object representing the specified Relation.

Parameters:
rel - The relation to be converted.
Returns:
The String representation of the argument.


Copyright © 2005-2008 Noelios Technologies.