View Javadoc

1   /* Copyright (2007) Schibsted Søk AS
2    * This file is part of SESAT.
3    *
4    *   SESAT is free software: you can redistribute it and/or modify
5    *   it under the terms of the GNU Affero General Public License as published by
6    *   the Free Software Foundation, either version 3 of the License, or
7    *   (at your option) any later version.
8    *
9    *   SESAT is distributed in the hope that it will be useful,
10   *   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   *   GNU Affero General Public License for more details.
13   *
14   *   You should have received a copy of the GNU Affero General Public License
15   *   along with SESAT.  If not, see <http://www.gnu.org/licenses/>.
16   */
17  /*
18   * SearchResultModule.java
19   */
20  
21  package no.sesat.search.view.output.syndication.modules;
22  
23  import com.sun.syndication.feed.module.Module;
24  
25  /**
26   * This interface describes the additional fields defined in the sesam
27   * syndication feed format.
28   */
29  public interface SearchResultModule extends Module {
30  
31      public static final String URI = "http://www.sesam.no/rss/ns/search/1.0";
32      public static final String PREFIX = "sesam";
33      String ELEM_NUMBER_OF_HITS = "numberOfHits";
34      String ELEM_ARTICLE_AGE = "articleAge";
35      String ELEM_NEWS_SOURCE = "newsSource";
36  
37      /**
38       * Returns the number of hits for the search.
39       */
40      String getNumberOfHits();
41  
42      /**
43       * Sets the number of hits.
44       *
45       * @param numberOfHits The number of hits.
46       */
47      void setNumberOfHits(String numberOfHits);
48  
49      /**
50       * Returns the age of the article.
51       *
52       * @return The age or null if not applicable.
53       */
54      String getArticleAge();
55  
56      /**
57       * Sets the article age.
58       *
59       * @param articleAge The article age.
60       */
61      void setArticleAge(String articleAge);
62  
63      /**
64       * Sets the news source.
65       *
66       * @param newsSource The news source.
67       */
68      void setNewsSource(String newsSource);
69  
70      /**
71       * Returns the news source (newspaper name).
72       *
73       * @return The news paper name or null if not applicable.
74       */
75      String getNewsSource();
76  }