5
5
import org.crosswire.jsword.passage.PassageUtil;
8
* Alter the Passage by calling blur with a
9
* number grabbed from the next word in the search string.
11
* <table border='1' cellPadding='3' cellSpacing='0' width="100%">
12
* <tr><td bgColor='white'class='TableRowColor'><font size='-7'>
13
* Distribution Licence:<br />
14
* Project B is free software; you can redistribute it
15
* and/or modify it under the terms of the GNU General Public License,
16
* version 2 as published by the Free Software Foundation.<br />
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
* General Public License for more details.<br />
21
* The License is available on the internet
22
* <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, by writing to
23
* <i>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
24
* MA 02111-1307, USA</i>, Or locally at the Licence link below.<br />
25
* The copyright to this program is held by it's authors.
26
* </font></td></tr></table>
27
* @see <a href='http://www.eireneh.com/servlets/Web'>Project B Home</a>
28
* @see <{docs.Licence}>
8
* Alter the Passage by calling blur with a
9
* number grabbed from the next word in the search string.
11
* <p><table border='1' cellPadding='3' cellSpacing='0'>
12
* <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
14
* Distribution Licence:<br />
15
* JSword is free software; you can redistribute it
16
* and/or modify it under the terms of the GNU General Public License,
17
* version 2 as published by the Free Software Foundation.<br />
18
* This program is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
* General Public License for more details.<br />
22
* The License is available on the internet
23
* <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, or by writing to:
24
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
25
* MA 02111-1307, USA<br />
26
* The copyright to this program is held by it's authors.
27
* </font></td></tr></table>
29
* @author Joe Walker [joe at eireneh dot com]
31
32
public class BlurCommandWord implements CommandWord
34
* Alter the Passage by calling blur with a
35
* number grabbed from the next word in the search string
36
* @param engine The controller that can provide access to the search
37
* string or a default Bible.
38
* @param ref The Passage to alter (if necessary)
35
* Alter the Passage by calling blur with a
36
* number grabbed from the next word in the search string
37
* @param engine The controller that can provide access to the search string or a default Bible.
38
* @param ref The Passage to alter (if necessary)
40
40
public void updatePassage(Engine engine, Passage ref) throws SearchException
42
if (!engine.elements().hasMoreElements())
42
if (!engine.iterator().hasNext())
43
43
throw new SearchException("search_blur_blank");
45
ParamWord param = (ParamWord) engine.elements().nextElement();
45
ParamWord param = (ParamWord) engine.iterator().next();
46
46
String word = param.getWord(engine);