KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > search > IndexHelperField


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 package org.apache.cocoon.components.search;
17
18 import org.xml.sax.Attributes JavaDoc;
19
20 /**
21  * A helper class for generating a lucene document in a SAX ContentHandler.
22  *
23  * @author <a HREF="mailto:berni_huber@a1.net">Bernhard Huber</a>
24  * @version CVS $Id: IndexHelperField.java 30932 2004-07-29 17:35:38Z vgritsenko $
25  */

26 class IndexHelperField
27 {
28     String JavaDoc localFieldName;
29     String JavaDoc qualifiedFieldName;
30     StringBuffer JavaDoc text;
31     Attributes JavaDoc attributes;
32
33
34     /**
35      *Constructor for the IndexHelperField object
36      *
37      * @param lfn Description of Parameter
38      * @param qfn Description of Parameter
39      * @param atts Description of Parameter
40      * @since
41      */

42     IndexHelperField(String JavaDoc lfn, String JavaDoc qfn, Attributes JavaDoc atts) {
43         this.localFieldName = lfn;
44         this.qualifiedFieldName = qfn;
45         this.attributes = atts;
46         this.text = new StringBuffer JavaDoc();
47     }
48
49
50     /**
51      *Gets the localFieldName attribute of the IndexHelperField object
52      *
53      * @return The localFieldName value
54      * @since
55      */

56     public String JavaDoc getLocalFieldName() {
57         return localFieldName;
58     }
59
60
61     /**
62      *Gets the qualifiedFieldName attribute of the IndexHelperField object
63      *
64      * @return The qualifiedFieldName value
65      * @since
66      */

67     public String JavaDoc getQualifiedFieldName() {
68         return qualifiedFieldName;
69     }
70
71
72     /**
73      *Gets the attributes attribute of the IndexHelperField object
74      *
75      * @return The attributes value
76      * @since
77      */

78     public Attributes JavaDoc getAttributes() {
79         return attributes;
80     }
81
82
83     /**
84      *Gets the text attribute of the IndexHelperField object
85      *
86      * @return The text value
87      * @since
88      */

89     public StringBuffer JavaDoc getText() {
90         return text;
91     }
92
93
94     /**
95      *Description of the Method
96      *
97      * @param text Description of Parameter
98      * @since
99      */

100     public void appendText(String JavaDoc text) {
101         this.text.append(text);
102     }
103
104
105     /**
106      *Description of the Method
107      *
108      * @param str Description of Parameter
109      * @param offset Description of Parameter
110      * @param length Description of Parameter
111      * @since
112      */

113     public void appendText(char[] str, int offset, int length) {
114         this.text.append(str, offset, length);
115     }
116 }
117
118
Popular Tags