net.dpml.metro.data
Class FeatureDirective

java.lang.Object
  extended by net.dpml.metro.data.AbstractDirective
      extended by net.dpml.metro.data.FeatureDirective
All Implemented Interfaces:
Serializable, Directive

public class FeatureDirective
extends AbstractDirective
implements Directive

A FeatureDirective declares a context entry that is itself a feature of the component including the component uri, name, working directory, or temporary directory.

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

Field Summary
static int NAME
          Constant identifier for the component name feature.
static int TEMP
          Constant identifier for the component temporary directory feature.
static int URI
          Constant identifier for the component uri feature.
static int WORK
          Constant identifier for the component working directory feature.
 
Constructor Summary
FeatureDirective(String key, int feature)
          Create a new feature directive.
 
Method Summary
 boolean equals(Object other)
          Test if the supplied object is equal to this object.
 int getFeature()
          Return the feature id.
static int getFeatureForName(String value)
          Return the feature id givcen a supplied name.
 String getKey()
          Return the feature key.
 int hashCode()
          Return the hashcode for the instance.
 
Methods inherited from class net.dpml.metro.data.AbstractDirective
getPartHandlerURI, setupURI
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final int NAME
Constant identifier for the component name feature.

See Also:
Constant Field Values

URI

public static final int URI
Constant identifier for the component uri feature.

See Also:
Constant Field Values

WORK

public static final int WORK
Constant identifier for the component working directory feature.

See Also:
Constant Field Values

TEMP

public static final int TEMP
Constant identifier for the component temporary directory feature.

See Also:
Constant Field Values
Constructor Detail

FeatureDirective

public FeatureDirective(String key,
                        int feature)
Create a new feature directive.

Parameters:
key - the feature name
feature - the feasture id
Method Detail

getFeatureForName

public static int getFeatureForName(String value)
Return the feature id givcen a supplied name.

Parameters:
value - the feature name
Returns:
the feature id

getKey

public String getKey()
Return the feature key.

Returns:
the feature key

getFeature

public int getFeature()
Return the feature id.

Returns:
the feature id

equals

public boolean equals(Object other)
Test if the supplied object is equal to this object.

Overrides:
equals in class AbstractDirective
Parameters:
other - the object to compare with this instance
Returns:
TRUE if the supplied object is equal to this object

hashCode

public int hashCode()
Return the hashcode for the instance.

Overrides:
hashCode in class AbstractDirective
Returns:
the instance hashcode