1 23 24 package org.apache.slide.search.basic.expression; 25 26 import org.apache.slide.search.InvalidQueryException; 27 import org.apache.slide.search.basic.ComparableResource; 28 import org.apache.slide.search.basic.ComparableResourcesPool; 29 import org.apache.slide.search.basic.Literals; 30 import org.jdom.Element; 31 32 37 public class IsDefinedExpression extends ComparePropertyExpression { 38 39 45 public IsDefinedExpression (Element e, ComparableResourcesPool requestedResourcesPool) throws InvalidQueryException { 46 super(e, requestedResourcesPool, false); 47 comparedProperty.setLiteral(""); 48 } 49 50 58 protected boolean compare (ComparableResource item) { 59 return item.isDefined (comparedProperty.getProperty(), 60 comparedProperty.getPropNamespace()); 61 } 62 63 64 70 public String toString () { 71 return (Literals.ISDEFINED + " (" + comparedProperty.getProperty () + ")"); 72 } 73 } 74 75 | Popular Tags |