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.osem;
18:
19: import org.compass.core.mapping.AbstractResourcePropertyMapping;
20: import org.compass.core.mapping.Mapping;
21: import org.compass.core.mapping.OverrideByNameMapping;
22:
23: /**
24: * @author kimchy
25: */
26: public class DynamicMetaDataMapping extends
27: AbstractResourcePropertyMapping implements
28: OverrideByNameMapping, OsemMapping {
29:
30: private boolean overrideByName;
31:
32: private String expression;
33:
34: private String format;
35:
36: private Class type;
37:
38: public Mapping copy() {
39: DynamicMetaDataMapping copy = new DynamicMetaDataMapping();
40: super .copy(copy);
41: copy.setOverrideByName(isOverrideByName());
42: copy.setExpression(getExpression());
43: copy.setFormat(getFormat());
44: copy.setType(getType());
45: return copy;
46: }
47:
48: public boolean hasAccessors() {
49: return false;
50: }
51:
52: public boolean isOverrideByName() {
53: return this .overrideByName;
54: }
55:
56: public void setOverrideByName(boolean overrideByName) {
57: this .overrideByName = overrideByName;
58: }
59:
60: public String getExpression() {
61: return expression;
62: }
63:
64: public void setExpression(String expression) {
65: this .expression = expression;
66: }
67:
68: public String getFormat() {
69: return format;
70: }
71:
72: public void setFormat(String format) {
73: this .format = format;
74: }
75:
76: public Class getType() {
77: return type;
78: }
79:
80: public void setType(Class type) {
81: this.type = type;
82: }
83: }
|