01: /*
02: * Project: AMODA - Abstract Modeled Application
03: * Class: de.gulden.framework.amoda.generic.metadata.GenericMetadataEntry
04: * Version: snapshot-beautyj-1.1
05: *
06: * Date: 2004-09-29
07: *
08: * This is a snapshot version of the AMODA 0.2 development branch,
09: * it is not released as a seperate version.
10: * For AMODA, see http://amoda.berlios.de/.
11: *
12: * This is licensed under the GNU Lesser General Public License (LGPL)
13: * and comes with NO WARRANTY.
14: *
15: * Author: Jens Gulden
16: * Email: amoda@jensgulden.de
17: */
18:
19: package de.gulden.framework.amoda.generic.metadata;
20:
21: import de.gulden.framework.amoda.generic.data.*;
22: import de.gulden.framework.amoda.model.metadata.*;
23: import de.gulden.framework.amoda.model.metadata.MetadataEntry;
24: import java.lang.*;
25: import java.util.*;
26:
27: /**
28: * Class GenericMetadataEntry.
29: *
30: * @author Jens Gulden
31: * @version snapshot-beautyj-1.1
32: */
33: public class GenericMetadataEntry extends GenericValue implements
34: MetadataEntry {
35:
36: // ------------------------------------------------------------------------
37: // --- fields ---
38: // ------------------------------------------------------------------------
39:
40: protected String source;
41:
42: public GenericMetadata genericMetadata;
43:
44: // ------------------------------------------------------------------------
45: // --- constructors ---
46: // ------------------------------------------------------------------------
47:
48: public GenericMetadataEntry() {
49: // your code here
50: }
51:
52: public GenericMetadataEntry(String name, Object value) {
53: setName(name);
54: set(value);
55: }
56:
57: // ------------------------------------------------------------------------
58: // --- methods ---
59: // ------------------------------------------------------------------------
60:
61: public GenericMetadata getGenericMetadata() {
62: return genericMetadata;
63: }
64:
65: public void setGenericMetadata(GenericMetadata genericMetadata) {
66: if (this .genericMetadata != genericMetadata) {
67: if (this .genericMetadata != null)
68: this .genericMetadata.removeGenericMetadataEntry(this );
69: this .genericMetadata = genericMetadata;
70: if (genericMetadata != null)
71: genericMetadata.addGenericMetadataEntry(this );
72: }
73: }
74:
75: public MetadataSchema getSchema() {
76: return getGenericMetadata().getSchema();
77: }
78:
79: public String getSource() {
80: return source;
81: }
82:
83: public void setSource(String _source) {
84: source = _source;
85: }
86:
87: public String toString() {
88: return super .toString();
89: }
90:
91: } // end GenericMetadataEntry
|