01: /*
02: * Copyright 2004-2006 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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: package org.compass.core.mapping.rsem;
18:
19: import org.compass.core.Property;
20: import org.compass.core.Property.Index;
21: import org.compass.core.Property.Store;
22: import org.compass.core.mapping.Mapping;
23: import org.compass.core.mapping.ResourceAnalyzerController;
24:
25: /**
26: *
27: * @author kimchy
28: *
29: */
30: public class RawResourcePropertyAnalyzerController extends
31: RawResourcePropertyMapping implements
32: ResourceAnalyzerController {
33:
34: private String nullAnalyzer;
35:
36: public Mapping copy() {
37: RawResourcePropertyAnalyzerController analyzerController = new RawResourcePropertyAnalyzerController();
38: super .copy(analyzerController);
39: analyzerController.setNullAnalyzer(getNullAnalyzer());
40: return analyzerController;
41: }
42:
43: public String getAnalyzerResourcePropertyName() {
44: return getPath().getPath();
45: }
46:
47: public Index getIndex() {
48: return Property.Index.UN_TOKENIZED;
49: }
50:
51: public Store getStore() {
52: return Property.Store.YES;
53: }
54:
55: public String getNullAnalyzer() {
56: return nullAnalyzer;
57: }
58:
59: public void setNullAnalyzer(String nullAnalyzer) {
60: this .nullAnalyzer = nullAnalyzer;
61: }
62:
63: public boolean hasNullAnalyzer() {
64: return nullAnalyzer != null;
65: }
66: }
|