001: /*
002: * Copyright 2004-2006 the original author or authors.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016:
017: package org.compass.core.engine;
018:
019: import org.compass.core.Property;
020: import org.compass.core.Property.TermVector;
021: import org.compass.core.converter.Converter;
022: import org.compass.core.engine.naming.PropertyPath;
023: import org.compass.core.mapping.Mapping;
024: import org.compass.core.mapping.ResourcePropertyMapping;
025: import org.compass.core.mapping.SpellCheckType;
026:
027: /**
028: * @author kimchy
029: */
030: public class MockPropertyMapping implements ResourcePropertyMapping {
031:
032: private float boost = 1.0f;
033:
034: private String name;
035:
036: private PropertyPath path;
037:
038: private boolean isInternal = false;
039:
040: private SpellCheckType spellCheck = SpellCheckType.EXCLUDE;
041:
042: public MockPropertyMapping(String name, PropertyPath path) {
043: this .name = name;
044: this .path = path;
045: }
046:
047: /**
048: * @return Returns the boost.
049: */
050: public float getBoost() {
051: return boost;
052: }
053:
054: /**
055: * @param boost
056: * The boost to set.
057: */
058: public void setBoost(float boost) {
059: this .boost = boost;
060: }
061:
062: /**
063: * @return Returns the name.
064: */
065: public String getName() {
066: return name;
067: }
068:
069: /**
070: * @param name
071: * The name to set.
072: */
073: public void setName(String name) {
074: this .name = name;
075: }
076:
077: /**
078: * @return Returns the isInternal.
079: */
080: public boolean isInternal() {
081: return isInternal;
082: }
083:
084: /**
085: * @param isInternal
086: * The isInternal to set.
087: */
088: public void setInternal(boolean isInternal) {
089: this .isInternal = isInternal;
090: }
091:
092: public Property.Store getStore() {
093: return null;
094: }
095:
096: public Property.Index getIndex() {
097: return null;
098: }
099:
100: public TermVector getTermVector() {
101: return null;
102: }
103:
104: public Mapping copy() {
105: return null;
106: }
107:
108: public void setPath(PropertyPath path) {
109: this .path = path;
110: }
111:
112: public PropertyPath getPath() {
113: return path;
114: }
115:
116: public void addConverterParam(String paramName, String paramValue) {
117: }
118:
119: public boolean controlsObjectNullability() {
120: return false;
121: }
122:
123: public Converter getConverter() {
124: return null;
125: }
126:
127: public String getConverterParam() {
128: return null;
129: }
130:
131: public String getConverterParam(String paramName) {
132: return null;
133: }
134:
135: public void setConverter(Converter converter) {
136: }
137:
138: public String getAnalyzer() {
139: return null;
140: }
141:
142: public ExcludeFromAllType getExcludeFromAll() {
143: return ExcludeFromAllType.NO;
144: }
145:
146: public ReverseType getReverse() {
147: return ReverseType.NO;
148: }
149:
150: public String getConverterName() {
151: return null;
152: }
153:
154: public void setConverterName(String name) {
155:
156: }
157:
158: public boolean isOmitNorms() {
159: return false;
160: }
161:
162: public String getRootAlias() {
163: return null;
164: }
165:
166: public String getNullValue() {
167: return null;
168: }
169:
170: public boolean hasNullValue() {
171: return false;
172: }
173:
174: public SpellCheckType getSpellCheck() {
175: return spellCheck;
176: }
177:
178: public void setSpellCheck(SpellCheckType spellCheck) {
179: this.spellCheck = spellCheck;
180: }
181: }
|