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