01: package org.andromda.core.namespace;
02:
03: /**
04: * Represents a property definition.
05: *
06: * @author Chad Brandon
07: */
08: public class PropertyDefinition {
09: private String name;
10:
11: /**
12: * Gets the name of this property definition.
13: *
14: * @return Returns the name.
15: */
16: public String getName() {
17: return name;
18: }
19:
20: /**
21: * Sets the name of this property definition.
22: *
23: * @param name The name to set.
24: */
25: public void setName(final String name) {
26: this .name = name;
27: }
28:
29: /**
30: * Stores the default value.
31: */
32: private String defaultValue;
33:
34: /**
35: * Gets the default for this property definition.
36: *
37: * @return Returns the defaultValue.
38: */
39: public String getDefaultValue() {
40: return this .defaultValue;
41: }
42:
43: /**
44: * Sets the default for the property definition.
45: *
46: * @param defaultValue The defaultValue to set.
47: */
48: public void setDefaultValue(final String defaultValue) {
49: this .defaultValue = defaultValue;
50: }
51:
52: /**
53: * The flag indicating whether or not this property is required.
54: */
55: private boolean required = true;
56:
57: /**
58: * Sets this property is required, by default
59: * this flag is <code>true</code>.
60: *
61: * @param required true/false
62: */
63: public void setRequired(final boolean required) {
64: this .required = required;
65: }
66:
67: /**
68: * Indicates of this property is required, by default
69: * this flag is <code>true</code>.
70: *
71: * @return true/false
72: */
73: public boolean isRequired() {
74: return this.required;
75: }
76: }
|