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;
18:
19: /**
20: * @author kimchy
21: */
22: public class ContractMapping extends AbstractMultipleMapping implements
23: AliasMapping {
24:
25: private String alias;
26:
27: private String[] extendedAliases = new String[0];
28:
29: private String[] extendingAliases = new String[0];
30:
31: private String analyzer;
32:
33: public Mapping copy() {
34: AliasMapping contractMapping = shallowCopy();
35: super .copy(contractMapping);
36: return contractMapping;
37: }
38:
39: public AliasMapping shallowCopy() {
40: ContractMapping contractMapping = new ContractMapping();
41: contractMapping.setAlias(getAlias());
42: contractMapping.setExtendedAliases(getExtendedAliases());
43: contractMapping.setExtendingAliases(getExtendingAliases());
44: return contractMapping;
45: }
46:
47: public String getAlias() {
48: return alias;
49: }
50:
51: public void setAlias(String alias) {
52: this .alias = alias;
53: }
54:
55: public String[] getExtendedAliases() {
56: return extendedAliases;
57: }
58:
59: public void setExtendedAliases(String[] extendedMappings) {
60: this .extendedAliases = extendedMappings;
61: }
62:
63: public String[] getExtendingAliases() {
64: return extendingAliases;
65: }
66:
67: public void setExtendingAliases(String[] extendingAliases) {
68: this .extendingAliases = extendingAliases;
69: }
70:
71: public String getAnalyzer() {
72: return analyzer;
73: }
74:
75: public void setAnalyzer(String analyzer) {
76: this.analyzer = analyzer;
77: }
78: }
|