KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > gulden > framework > amoda > generic > metadata > GenericMetadataEntry


1 /*
2  * Project: AMODA - Abstract Modeled Application
3  * Class: de.gulden.framework.amoda.generic.metadata.GenericMetadataEntry
4  * Version: snapshot-beautyj-1.1
5  *
6  * Date: 2004-09-29
7  *
8  * This is a snapshot version of the AMODA 0.2 development branch,
9  * 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 MetadataEntry {
34
35     // ------------------------------------------------------------------------
36
// --- fields ---
37
// ------------------------------------------------------------------------
38

39     protected String JavaDoc source;
40
41     public GenericMetadata genericMetadata;
42
43
44     // ------------------------------------------------------------------------
45
// --- constructors ---
46
// ------------------------------------------------------------------------
47

48     public GenericMetadataEntry() {
49         // your code here
50
}
51
52     public GenericMetadataEntry(String JavaDoc name, Object JavaDoc value) {
53         setName(name);
54         set(value);
55     }
56
57
58     // ------------------------------------------------------------------------
59
// --- methods ---
60
// ------------------------------------------------------------------------
61

62     public GenericMetadata getGenericMetadata() {
63         return genericMetadata;
64     }
65
66     public void setGenericMetadata(GenericMetadata genericMetadata) {
67         if (this.genericMetadata != genericMetadata) {
68             if (this.genericMetadata != null) this.genericMetadata.removeGenericMetadataEntry(this);
69             this.genericMetadata = genericMetadata;
70             if (genericMetadata != null) genericMetadata.addGenericMetadataEntry(this);
71         }
72     }
73
74     public MetadataSchema getSchema() {
75         return getGenericMetadata().getSchema();
76     }
77
78     public String JavaDoc getSource() {
79         return source;
80     }
81
82     public void setSource(String JavaDoc _source) {
83         source = _source;
84     }
85
86     public String JavaDoc toString() {
87         return super.toString();
88     }
89
90 } // end GenericMetadataEntry
91
Popular Tags