1
2 /*
3 * The contents of this file are subject to the BT "ZEUS" Open Source
4 * Licence (L77741), Version 1.0 (the "Licence"); you may not use this file
5 * except in compliance with the Licence. You may obtain a copy of the Licence
6 * from $ZEUS_INSTALL/licence.html or alternatively from
7 * http://www.labs.bt.com/projects/agents/zeus/licence.htm
8 *
9 * Except as stated in Clause 7 of the Licence, software distributed under the
10 * Licence is distributed WITHOUT WARRANTY OF ANY KIND, either express or
11 * implied. See the Licence for the specific language governing rights and
12 * limitations under the Licence.
13 *
14 * The Original Code is within the package zeus.*.
15 * The Initial Developer of the Original Code is British Telecommunications
16 * public limited company, whose registered office is at 81 Newgate Street,
17 * London, EC1A 7AJ, England. Portions created by British Telecommunications
18 * public limited company are Copyright 1996-2001. All Rights Reserved.
19 *
20 * THIS NOTICE MUST BE INCLUDED ON ANY COPY OF THIS FILE
21 */
22
23 package zeus.concepts;
24 import java.util.*;
25
26 public class FIPA_Search_Constraints {
27
28
29 private int max_depth = 0;
30 private int max_results = 0;
31
32
33
34 public void setMaxDepth (int max_depth) {
35 this.max_depth = max_depth;
36 }
37
38
39 public void setMaxResults (int max_results) {
40 this.max_results = max_results;
41 }
42
43
44 public int getMaxDepth () {
45 return this.max_depth;
46 }
47
48
49 public int getMaxResults () {
50 return this.max_results;
51 }
52
53
54
55 public String toString () {
56 String retVal = new String("(search-constraints ");
57 if (max_depth >0) {
58 retVal += ":max-depth " + String.valueOf(max_depth) +" ";
59 }
60 if (max_results >0) {
61 retVal += ":max-results " + String.valueOf(max_results) + " ";
62 }
63 retVal += ")";
64 return retVal;
65 }
66
67
68 }