org.apache.slide.search.basic.expression
Class CheckResourceTypeExpression

java.lang.Object
  extended byorg.apache.slide.search.basic.expression.BasicExpression
      extended byorg.apache.slide.search.basic.expression.GenericBasicExpression
          extended byorg.apache.slide.search.basic.expression.CompareExpression
              extended byorg.apache.slide.search.basic.expression.ComparePropertyExpression
                  extended byorg.apache.slide.search.basic.expression.CheckResourceTypeExpression
All Implemented Interfaces:
IBasicExpression
Direct Known Subclasses:
IsCollectionExpression, IsPrincipalExpression

public abstract class CheckResourceTypeExpression
extends ComparePropertyExpression

Represents an expression that check for a specific resourcetype.

Version:
$Revision: 1.4 $

Field Summary
 
Fields inherited from class org.apache.slide.search.basic.expression.ComparePropertyExpression
comparedProperty
 
Fields inherited from class org.apache.slide.search.basic.expression.CompareExpression
propertyProvider, requestedResourcesPool
 
Fields inherited from class org.apache.slide.search.basic.expression.BasicExpression
expressionElement, expressionFactory, resultSet
 
Constructor Summary
CheckResourceTypeExpression(org.jdom.Element e, ComparableResourcesPool requestedResourcesPool)
          Creates a resourcetype expression
 
Method Summary
protected  boolean compare(ComparableResource item)
          checks, if the value of resourcetype contains the specified literal
 
Methods inherited from class org.apache.slide.search.basic.expression.ComparePropertyExpression
getLiteral, toString
 
Methods inherited from class org.apache.slide.search.basic.expression.CompareExpression
execute, getRequestedResourcePool
 
Methods inherited from class org.apache.slide.search.basic.expression.BasicExpression
getFactory, setFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckResourceTypeExpression

public CheckResourceTypeExpression(org.jdom.Element e,
                                   ComparableResourcesPool requestedResourcesPool)
                            throws InvalidQueryException
Creates a resourcetype expression

Parameters:
e - jdom element, that describes the expression
requestedResourcesPool - the pool of resources to apply the expression to.
Method Detail

compare

protected boolean compare(ComparableResource item)
checks, if the value of resourcetype contains the specified literal

Specified by:
compare in class ComparePropertyExpression
Parameters:
item - a BasicDataItem
Returns:
true, if item is a collection