01: package org.sakaiproject.citation.util.api;
02:
03: import java.util.Set;
04:
05: public interface InputStringParser {
06:
07: /**
08: * Parse keywords into a Set of Strings. This method recognizes phrases
09: * (marked using quotation marks) and drops common words (i.e. and, or, not,
10: * to, the, etc.) if they are not part of a phrase. Each element of the
11: * resulting Set will be a single term or a phrase.
12: *
13: * @param inputString the input a user has submitted (i.e. from an HTML
14: * input field in a form)
15: * @return a Set containing individual search terms or phrases or null if
16: * inputString is null or empty.
17: */
18: public Set<String> parseInputString(String inputString);
19: }
|