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.mapping.internal;
018:
019: import org.compass.core.Property;
020: import org.compass.core.mapping.AllMapping;
021: import org.compass.core.mapping.SpellCheckType;
022:
023: /**
024: * A set of settings configuring the all mapping.
025: *
026: * @author kimchy
027: */
028: public class DefaultAllMapping implements InternalAllMapping {
029:
030: private Boolean supported;
031:
032: private Boolean excludeAlias;
033:
034: private String property;
035:
036: private Property.TermVector termVector;
037:
038: private Boolean omitNorms;
039:
040: private SpellCheckType spellCheck;
041:
042: private boolean includePropertiesWithNoMappings = true;
043:
044: public AllMapping copy() {
045: DefaultAllMapping allMapping = new DefaultAllMapping();
046: allMapping.setExcludeAlias(isExcludeAlias());
047: allMapping
048: .setIncludePropertiesWithNoMappings(isIncludePropertiesWithNoMappings());
049: allMapping.setOmitNorms(isOmitNorms());
050: allMapping.setProperty(getProperty());
051: allMapping.setSupported(isSupported());
052: allMapping.setTermVector(getTermVector());
053: allMapping.setSpellCheck(getSpellCheck());
054: return allMapping;
055: }
056:
057: public Boolean isSupported() {
058: return supported;
059: }
060:
061: public void setSupported(Boolean supported) {
062: this .supported = supported;
063: }
064:
065: public Boolean isExcludeAlias() {
066: return excludeAlias;
067: }
068:
069: public void setExcludeAlias(Boolean excludeAlias) {
070: this .excludeAlias = excludeAlias;
071: }
072:
073: public String getProperty() {
074: return property;
075: }
076:
077: public void setProperty(String property) {
078: this .property = property;
079: }
080:
081: public Property.TermVector getTermVector() {
082: return termVector;
083: }
084:
085: public void setTermVector(Property.TermVector termVector) {
086: this .termVector = termVector;
087: }
088:
089: public Boolean isOmitNorms() {
090: return omitNorms;
091: }
092:
093: public void setOmitNorms(Boolean omitNorms) {
094: this .omitNorms = omitNorms;
095: }
096:
097: public Boolean isIncludePropertiesWithNoMappings() {
098: return includePropertiesWithNoMappings;
099: }
100:
101: public void setIncludePropertiesWithNoMappings(
102: Boolean includePropertiesWithNoMappings) {
103: this .includePropertiesWithNoMappings = includePropertiesWithNoMappings;
104: }
105:
106: public SpellCheckType getSpellCheck() {
107: return spellCheck;
108: }
109:
110: public void setSpellCheck(SpellCheckType spellCheck) {
111: this.spellCheck = spellCheck;
112: }
113: }
|