You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by wa...@apache.org on 2002/03/22 16:03:27 UTC

cvs commit: jakarta-slide/src/share/org/apache/slide/search CompareHint.java

wam         02/03/22 07:03:27

  Modified:    src/share/org/apache/slide/search/basic
                        IsDefinedExpression.java
                        IsCollectionExpression.java
               src/share/org/apache/slide/search CompareHint.java
  Log:
  doc enhancements
  
  Revision  Changes    Path
  1.2       +9 -9      jakarta-slide/src/share/org/apache/slide/search/basic/IsDefinedExpression.java
  
  Index: IsDefinedExpression.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/basic/IsDefinedExpression.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IsDefinedExpression.java	22 Mar 2002 14:32:37 -0000	1.1
  +++ IsDefinedExpression.java	22 Mar 2002 15:03:27 -0000	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/basic/IsDefinedExpression.java,v 1.1 2002/03/22 14:32:37 wam Exp $
  - * $Revision: 1.1 $
  - * $Date: 2002/03/22 14:32:37 $
  + * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/basic/IsDefinedExpression.java,v 1.2 2002/03/22 15:03:27 wam Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/03/22 15:03:27 $
    *
    * ====================================================================
    *
  @@ -70,15 +70,15 @@
   import java.util.Set;
   
   /**
  - * Represents an EQUALS expression.
  + * Represents an isdefined expression.
    *
    * @author <a href="mailto:martin.wallmer@softwareag.com">Martin Wallmer</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class IsDefinedExpression extends CompareExpression {
       
       /**
  -     * Creates an EQ expression according to Element e
  +     * Creates an isdefined expression according to Element e
        *
        * @param e jdom element, that describes the expression
        *
  @@ -90,9 +90,9 @@
       }
       
       /**
  -     * Checks item for equality against <prop><literal> of this expression.
  +     * Checks if property is defined in the resource
        *
  -     * @param    item                a  BasicDataItem
  +     * @param    item                a  RequestedResource
        *
        * @return   a boolean
        *
  @@ -109,7 +109,7 @@
        *
        */
       public String toString () {
  -        return super.toString (Literals.EQ);
  +        return (Literals.ISDEFINED + " (" + property + ")");
       }
   }
   
  
  
  
  1.2       +4 -4      jakarta-slide/src/share/org/apache/slide/search/basic/IsCollectionExpression.java
  
  Index: IsCollectionExpression.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/basic/IsCollectionExpression.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IsCollectionExpression.java	22 Mar 2002 14:32:37 -0000	1.1
  +++ IsCollectionExpression.java	22 Mar 2002 15:03:27 -0000	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/basic/IsCollectionExpression.java,v 1.1 2002/03/22 14:32:37 wam Exp $
  - * $Revision: 1.1 $
  - * $Date: 2002/03/22 14:32:37 $
  + * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/basic/IsCollectionExpression.java,v 1.2 2002/03/22 15:03:27 wam Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/03/22 15:03:27 $
    *
    * ====================================================================
    *
  @@ -73,7 +73,7 @@
    * Represents an EQUALS expression.
    *
    * @author <a href="mailto:martin.wallmer@softwareag.com">Martin Wallmer</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class IsCollectionExpression extends CompareExpression {
       
  
  
  
  1.2       +95 -3     jakarta-slide/src/share/org/apache/slide/search/CompareHint.java
  
  Index: CompareHint.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/CompareHint.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CompareHint.java	22 Mar 2002 14:32:37 -0000	1.1
  +++ CompareHint.java	22 Mar 2002 15:03:27 -0000	1.2
  @@ -1,29 +1,121 @@
  -/**
  - * OrderByHint.java
  +/*
  + * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/CompareHint.java,v 1.2 2002/03/22 15:03:27 wam Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/03/22 15:03:27 $
  + *
  + * ====================================================================
  + *
  + * The Apache Software License, Version 1.1
  + *
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution, if
  + *    any, must include the following acknowlegement:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowlegement may appear in the software itself,
  + *    if and wherever such third-party acknowlegements normally appear.
  + *
  + * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
  + *    Foundation" must not be used to endorse or promote products derived
  + *    from this software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache"
  + *    nor may "Apache" appear in their names without prior written
  + *    permission of the Apache Group.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + *
  + * [Additional notices, if required by prior licensing conditions]
    *
  - * @author Created by Omnicore CodeGuide
    */
   
   package org.apache.slide.search;
   
  +/**
  + * Gives some hints to a comparator, that compares resources. You can specify,
  + * if compare is case sensitive, ascending or descending, and the resource's
  + * property, on which the compare shall take place.
  + *
  + * @author <a href="mailto:martin.wallmer@softwareag.com">Martin Wallmer</a>
  + * @version $Revision: 1.2 $
  + */
   public class CompareHint {
       
  +    /** the name of the p�roperty, which shall be compared */
       private String property;
  +    
  +    /** if the associated comparator is used for sort, ascending or descending? */
       private boolean ascending;
  +    
  +    /** is compare case sensitive or not */
       private boolean caseSensitive;
       
  +    
  +    /**
  +     * Method getProperty
  +     *
  +     * @return   a String
  +     *
  +     */
       public String getProperty () {
           return property;
       }
       
  +    /**
  +     * Method isAscending
  +     *
  +     * @return   a boolean
  +     *
  +     */
       public boolean isAscending () {
           return ascending;
       }
       
  +    /**
  +     * Method isCaseSensitive
  +     *
  +     * @return   a boolean
  +     *
  +     */
       public boolean isCaseSensitive () {
           return caseSensitive;
       }
       
  +    /**
  +     * constructs a CompareHint
  +     */
       public CompareHint (String property, boolean ascending, boolean caseSensitive) {
           this.property = property;
           this.ascending = ascending;
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>