| DefaultSearchRequest.java |
1 /**
2 * Distribution License:
3 * JSword is free software; you can redistribute it and/or modify it under
4 * the terms of the GNU Lesser General Public License, version 2.1 as published by
5 * the Free Software Foundation. This program is distributed in the hope
6 * that it will be useful, but WITHOUT ANY WARRANTY; without even the
7 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8 * See the GNU Lesser General Public License for more details.
9 *
10 * The License is available on the internet at:
11 * http://www.gnu.org/copyleft/lgpl.html
12 * or by writing to:
13 * Free Software Foundation, Inc.
14 * 59 Temple Place - Suite 330
15 * Boston, MA 02111-1307, USA
16 *
17 * Copyright: 2005
18 * The copyright to this program is held by it's authors.
19 *
20 * ID: $Id:DefaultSearchRequest.java 984 2006-01-23 14:18:33 -0500 (Mon, 23 Jan 2006) dmsmith $
21 */
22 package org.crosswire.jsword.index.search;
23
24
25 /**
26 * A default implementation of a SearchRequest.
27 *
28 * @see gnu.lgpl.License for license details.
29 * The copyright to this program is held by it's authors.
30 * @author DM Smith [dmsmith555 at yahoo dot com]
31 */
32 public class DefaultSearchRequest implements SearchRequest
33 {
34 /**
35 * Create a DefaultSearchRequest for the provided request and
36 * the provided modifiers.
37 * @param theRequest what is being searched
38 * @param theModifier how the search is to be modified
39 */
40 public DefaultSearchRequest(String theRequest, SearchModifier theModifier)
41 {
42 request = theRequest;
43 modifier = theModifier;
44 }
45
46 /**
47 * Create a DefaultSearchRequest for the provided request.
48 * @param theRequest what is being searched
49 */
50 public DefaultSearchRequest(String theRequest)
51 {
52 this(theRequest, null);
53 }
54
55 /* (non-Javadoc)
56 * @see org.crosswire.jsword.index.search.SearchRequest#isRanked()
57 */
58 public SearchModifier getSearchModifier()
59 {
60 return modifier;
61 }
62
63 /* (non-Javadoc)
64 * @see org.crosswire.jsword.index.search.SearchRequest#getRequest()
65 */
66 public String getRequest()
67 {
68 return request;
69 }
70
71 /**
72 * The actual search request
73 */
74 private String request;
75
76 /**
77 * How the search is to be modified
78 */
79 private SearchModifier modifier;
80
81 /**
82 * Serialization ID
83 */
84 private static final long serialVersionUID = -5973134101547369187L;
85 }
86