OrderByRestriction.java |
1 /* 2 * OrderByRestriction.java 3 * 4 * Copyright (c) 1998-2005, The University of Sheffield. 5 * 6 * This file is part of GATE (see http://gate.ac.uk/), and is free 7 * software, licenced under the GNU Library General Public License, 8 * Version 2, June 1991 (in the distribution as file licence.html, 9 * and also available at http://gate.ac.uk/gate/licence.html). 10 * 11 * Rosen Marinov, 10/Dec/2001 12 */ 13 package gate.util; 14 15 16 public class OrderByRestriction implements java.io.Serializable{ 17 18 /* Type of operator for cmarision in query*/ 19 public static final int OPERATOR_ASCENDING = 100; 20 public static final int OPERATOR_DESCENDING = 101; 21 22 private String key; 23 private int operator_; 24 25 /** Constructor. 26 * 27 * @param key string value of feature key 28 * @param operator_ type of operator for ordering: ascending or descending 29 */ 30 public OrderByRestriction(String key, int operator_){ 31 this.key = key; 32 this.operator_ = operator_; 33 } 34 35 /** 36 * @return String key of the feature 37 */ 38 public String getKey(){ 39 return key; 40 } 41 42 /** 43 * @return int type of operator for ordering: ascending or descending 44 */ 45 public int getOperator(){ 46 return operator_; 47 } 48 }