KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > lenya > lucene > Publication


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */

17
18 /* $Id: Publication.java 42598 2004-03-01 16:18:28Z gregor $ */
19
20 package org.apache.lenya.lucene;
21
22 import java.util.StringTokenizer JavaDoc;
23
24 /**
25  * Parameters to do a search by Lucene and display results
26  */

27 public class Publication {
28     public String JavaDoc id = null;
29     public String JavaDoc name = null;
30     public String JavaDoc indexDir = null;
31     public String JavaDoc searchFields = null;
32     public String JavaDoc excerptDir = null;
33     public String JavaDoc prefix = null;
34
35     /**
36      *
37      */

38     public String JavaDoc[] getFields() {
39         String JavaDoc[] fields = null;
40         if (searchFields != null) {
41             StringTokenizer JavaDoc st = new StringTokenizer JavaDoc(searchFields, ",");
42             int length = st.countTokens();
43             fields = new String JavaDoc[length];
44             for (int i = 0; i < length; i++) {
45                 fields[i] = st.nextToken();
46             }
47         }
48         return fields;
49     }
50 }
51
Popular Tags