001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.jetspeed.search;
018:
019: import java.util.Map;
020: import java.net.URL;
021:
022: /**
023: * Base parsed object.
024: *
025: * @author <a href="mailto:morciuch@apache.org">Mark Orciuch</a>
026: * @version $Id: BaseParsedObject.java 516448 2007-03-09 16:25:47Z ate $
027: */
028: public class BaseParsedObject implements ParsedObject {
029:
030: private String key;
031: private String type;
032: private String title;
033: private String description;
034: private String content;
035: private String language;
036: private URL url;
037: private String[] keywords;
038: private Map keywordsMap;
039: private Map fields;
040: private float score;
041: private String className;
042:
043: /**
044: * Returns parsed object key
045: *
046: * @return
047: */
048: public String getKey() {
049: return this .key;
050: }
051:
052: /**
053: * Sets parsed object key
054: *
055: * @param content
056: */
057: public void setKey(String key) {
058: this .key = key;
059: }
060:
061: /**
062: * Returns parsed object type
063: *
064: * @return
065: */
066: public String getType() {
067: return this .type;
068: }
069:
070: /**
071: * Sets parsed object type
072: *
073: * @param type
074: */
075: public void setType(String type) {
076: this .type = type;
077: }
078:
079: /**
080: * Returns parsed object content
081: *
082: * @return
083: */
084: public String getContent() {
085: return this .content;
086: }
087:
088: /**
089: * Sets parsed object content
090: *
091: * @param content
092: */
093: public void setContent(String content) {
094: this .content = content;
095: }
096:
097: /**
098: * Returns parsed object description
099: *
100: * @return
101: */
102: public String getDescription() {
103: return this .description;
104: }
105:
106: /**
107: * Sets parsed object description
108: *
109: * @param description
110: */
111: public void setDescription(String description) {
112: this .description = description;
113: }
114:
115: /**
116: * Returns parsed object keywords
117: *
118: * @return
119: */
120: public String[] getKeywords() {
121: return this .keywords;
122: }
123:
124: /**
125: * Sets parsed object keywords
126: *
127: * @param keywords
128: */
129: public void setKeywords(String[] keywords) {
130: this .keywords = keywords;
131: }
132:
133: /**
134: * Returns parsed object title
135: *
136: * @return
137: */
138: public String getTitle() {
139: return this .title;
140: }
141:
142: /**
143: * Sets parsed object title
144: *
145: * @param title
146: */
147: public void setTitle(String title) {
148: this .title = title;
149: }
150:
151: /**
152: * Returns parsed object language
153: *
154: * @return
155: */
156: public String getLanguage() {
157: return this .language;
158: }
159:
160: /**
161: * Sets parsed object language
162: *
163: * @param language
164: */
165: public void setLanguage(String language) {
166: this .language = language;
167: }
168:
169: /**
170: * Returns parsed object searchable fields
171: *
172: * @return
173: */
174: public Map getFields() {
175: return this .fields;
176: }
177:
178: /**
179: * Sets parsed object searchable fields
180: *
181: * @param fields
182: */
183: public void setFields(Map fields) {
184: this .fields = fields;
185: }
186:
187: /**
188: * Returns parsed object URL
189: *
190: * @return
191: */
192: public URL getURL() {
193: return this .url;
194: }
195:
196: /**
197: * Sets parsed object URL
198: *
199: * @param fields
200: */
201: public void setURL(URL url) {
202: this .url = url;
203: }
204:
205: /**
206: * Getter for property score.
207: *
208: * @return Value of property score.
209: */
210: public float getScore() {
211: return this .score;
212: }
213:
214: /**
215: * Setter for property score.
216: *
217: * @param score New value of property score.
218: */
219: public void setScore(float score) {
220: this .score = score;
221: }
222:
223: /**
224: * Getter for property className.
225: *
226: * @return Value of property className.
227: */
228: public String getClassName() {
229: return className;
230: }
231:
232: /**
233: * Setter for property className.
234: *
235: * @param score New value of property className.
236: */
237: public void setClassName(String className) {
238: this .className = className;
239: }
240:
241: /* (non-Javadoc)
242: * @see org.apache.jetspeed.search.ParsedObject#getKeywordsMap()
243: */
244: public Map getKeywordsMap() {
245: return keywordsMap;
246: }
247:
248: /* (non-Javadoc)
249: * @see org.apache.jetspeed.search.ParsedObject#setKeywordsMap(java.util.Map)
250: */
251: public void setKeywordsMap(Map keywordsMap) {
252: this.keywordsMap = keywordsMap;
253: }
254:
255: }
|