001: /*
002: * Created on Oct 30, 2004
003: *
004: * TODO To change the template for this generated file go to
005: * Window - Preferences - Java - Code Style - Code Templates
006: */
007: package org.xdev.base.schema;
008:
009: import java.util.ArrayList;
010: import java.util.List;
011:
012: /**
013: * @author Administrator
014: *
015: * TODO To change the template for this generated type comment go to
016: * Window - Preferences - Java - Code Style - Code Templates
017: */
018: public class SchemaProperty extends ComponentSchemaElement {
019:
020: private String name = null;
021: private String description = null;
022: private String defaultValue = "";
023:
024: private List values = new ArrayList();
025:
026: private int dataType = SchemaProperty.DataType.ANY;
027:
028: public SchemaProperty(String name, int dataType) {
029: this .name = name;
030: this .dataType = dataType;
031: }
032:
033: public final class DataType {
034:
035: public static final int ANY = 0;
036: public static final int NUMBER = 1;
037: public static final int TEXT = 2;
038: public static final int BOOL = 3;
039: public static final int LIST = 4;
040: public static final int REGEX = 5;
041: public static final int XPATH = 6;
042:
043: }
044:
045: public void AddValue(SchemaPropertyValue value) {
046: this .values.add(value);
047: }
048:
049: /**
050: * @return Returns the dataType.
051: */
052: public int getDataType() {
053: return dataType;
054: }
055:
056: /**
057: * @param dataType The dataType to set.
058: */
059: public void setDataType(int dataType) {
060: this .dataType = dataType;
061: }
062:
063: /**
064: * @return Returns the name.
065: */
066: public String getName() {
067: return name;
068: }
069:
070: /**
071: * @param name The name to set.
072: */
073: public void setName(String name) {
074: this .name = name;
075: }
076:
077: /**
078: * @return Returns the values.
079: */
080: public List getValues() {
081: return values;
082: }
083:
084: /**
085: * @param values The values to set.
086: */
087: public void setValues(List values) {
088: this .values = values;
089: }
090:
091: /**
092: * @return Returns the description.
093: */
094: public String getDescription() {
095: return description;
096: }
097:
098: /**
099: * @param description The description to set.
100: */
101: public void setDescription(String description) {
102: this .description = description;
103: }
104:
105: /**
106: * @return Returns the defaultValue.
107: */
108: public String getDefaultValue() {
109: return defaultValue;
110: }
111:
112: /**
113: * @param defaultValue The defaultValue to set.
114: */
115: public void setDefaultValue(String defaultValue) {
116: this.defaultValue = defaultValue;
117: }
118: }
|