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.metadata.impl;
18:
19: import org.compass.core.metadata.MetaDataGroup;
20:
21: /**
22: * @author kimchy
23: */
24: public abstract class AbstractMetaDataItem {
25:
26: private String id;
27:
28: private String name;
29:
30: private String uri;
31:
32: private String displayName;
33:
34: private String description;
35:
36: private MetaDataGroup group;
37:
38: public String getName() {
39: return name;
40: }
41:
42: public void setName(String name) {
43: this .name = name;
44: }
45:
46: public String getDisplayName() {
47: return displayName;
48: }
49:
50: public String getUri() {
51: return uri;
52: }
53:
54: public void setUri(String uri) {
55: this .uri = uri;
56: }
57:
58: public void setDisplayName(String displayName) {
59: this .displayName = displayName;
60: }
61:
62: public String getDescription() {
63: return description;
64: }
65:
66: public void setDescription(String description) {
67: this .description = description;
68: }
69:
70: public String getId() {
71: return id;
72: }
73:
74: public void setId(String value) {
75: this .id = value;
76: }
77:
78: public MetaDataGroup getGroup() {
79: return group;
80: }
81:
82: public void setGroup(MetaDataGroup group) {
83: this .group = group;
84: }
85:
86: protected void copy(AbstractMetaDataItem item) {
87: item.setName(getName());
88: item.setUri(getUri());
89: item.setDisplayName(getDisplayName());
90: item.setDescription(getDescription());
91: item.setGroup(getGroup());
92: item.setId(getId());
93: }
94:
95: public String toString() {
96: return getGroup().getId() + "/" + getId();
97: }
98:
99: }
|