net.dpml.library.info
Class FilterDirective

java.lang.Object
  extended bynet.dpml.lang.AbstractDirective
      extended bynet.dpml.library.info.FilterDirective
All Implemented Interfaces:
Filter, Serializable
Direct Known Subclasses:
FeatureFilterDirective, SimpleFilterDirective

public abstract class FilterDirective
extends AbstractDirective
implements Filter

Base class for filter directives.

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

Constructor Summary
FilterDirective(String token)
          Creation of a new anonymous resource directive.
 
Method Summary
 boolean equals(Object other)
          Compare this object with another for equality.
 String getToken()
          Return the filter token.
abstract  String getValue(Resource resource)
          Return the filter value.
 int hashCode()
          Compute the hash value.
 
Methods inherited from class net.dpml.lang.AbstractDirective
equals, hashArray, hashValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterDirective

public FilterDirective(String token)
Creation of a new anonymous resource directive.

Parameters:
token - the filter token
Method Detail

getToken

public String getToken()
Return the filter token.

Specified by:
getToken in interface Filter
Returns:
the token

getValue

public abstract String getValue(Resource resource)
                         throws ResourceNotFoundException
Return the filter value.

Specified by:
getValue in interface Filter
Parameters:
resource - the enclosing resource
Returns:
the resolved value
Throws:
ResourceNotFoundException - if the feature references a resource that is unknown

equals

public boolean equals(Object other)
Compare this object with another for equality.

Overrides:
equals in class AbstractDirective
Parameters:
other - the other object
Returns:
true if equal

hashCode

public int hashCode()
Compute the hash value.

Overrides:
hashCode in class AbstractDirective
Returns:
the hashcode value