net.dpml.library
Class Feature

java.lang.Object
  extended bynet.dpml.lang.Enum
      extended bynet.dpml.library.Feature
All Implemented Interfaces:
Serializable

public final class Feature
extends Enum

Enumeration identifying resource features.

Version:
1.1.0
Author:
Digital Product Meta Library
See Also:
Serialized Form

Field Summary
static Feature BASEDIR
          Project basedir.
static Feature DECIMAL
          Resource decimal version.
static Feature FILENAME
          Resource filename.
static Feature GROUP
          Resource group.
static Feature NAME
          Resource name.
static Feature PATH
          Resource path.
static Feature SPEC
          Resource spec.
static Feature URI
          Resource version.
static Feature VERSION
          Resource version.
 
Method Summary
static Feature parse(String value)
          Return a feature.
static String resolve(Resource resource, Feature feature)
          Return the value of a feature.
static String resolve(Resource resource, Feature feature, Type type)
          Return the value of a feature.
static String resolve(Resource resource, Feature feature, Type type, boolean alias)
          Return the value of a feature.
 String toString()
          Return a string representation of the scope.
static Feature[] values()
          Returns an array of activation enum values.
 
Methods inherited from class net.dpml.lang.Enum
equals, getName, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME

public static final Feature NAME
Resource name.


GROUP

public static final Feature GROUP
Resource group.


VERSION

public static final Feature VERSION
Resource version.


DECIMAL

public static final Feature DECIMAL
Resource decimal version.


URI

public static final Feature URI
Resource version.


SPEC

public static final Feature SPEC
Resource spec.


PATH

public static final Feature PATH
Resource path.


FILENAME

public static final Feature FILENAME
Resource filename.


BASEDIR

public static final Feature BASEDIR
Project basedir.

Method Detail

values

public static Feature[] values()
Returns an array of activation enum values.

Returns:
the activation policies array

toString

public String toString()
Return a string representation of the scope.

Overrides:
toString in class Enum
Returns:
the string value

parse

public static Feature parse(String value)
                     throws IllegalArgumentException
Return a feature.

Parameters:
value - the feature name
Returns:
the feature
Throws:
IllegalArgumentException - if the name if not a recognized feature.

resolve

public static String resolve(Resource resource,
                             Feature feature)
Return the value of a feature.

Parameters:
resource - the target resource
feature - the feature
Returns:
the resolved value

resolve

public static String resolve(Resource resource,
                             Feature feature,
                             Type type)
Return the value of a feature.

Parameters:
resource - the target resource
feature - the feature
type - the selected type
Returns:
the resolved value

resolve

public static String resolve(Resource resource,
                             Feature feature,
                             Type type,
                             boolean alias)
Return the value of a feature.

Parameters:
resource - the target resource
feature - the feature
type - the selected type
alias - flag indicated that alias based uri resolution is requested
Returns:
the resolved value