package com.xqbase.baiji.schema;

/**
 * This class represents each field of the schema fields array.
 *
 * @author Tony He
 */
public class Field {
}

@@ -27,16 +27,79 @@
 chema;%0A%0A
+import org.codehaus.jackson.JsonNode;%0A%0Aimport java.util.List;%0A%0A
 /**%0A * T
@@ -204,11 +204,2043 @@
  Field %7B
+%0A%0A    public enum SortOrder %7B%0A        ASCENDING,%0A        DESCENDING,%0A        IGNORE%0A    %7D%0A%0A    private final String name;%0A%0A    private final List%3CString%3E aliases;%0A%0A    private final int pos;%0A%0A    private final String doc;%0A%0A    private final JsonNode defaultValue;%0A%0A    private final SortOrder ordering;%0A%0A    private final Schema schema;%0A%0A    private final PropertyMap props;%0A%0A    /**%0A     * Constructor for the field class.%0A     *%0A     * @param schema       schema for the field type%0A     * @param name         name of the field%0A     * @param aliases      list of aliases for the name of the field%0A     * @param pos          position of the field%0A     * @param doc          documentation for the field%0A     * @param defaultValue field's default value if it exists%0A     * @param sortOrder    sort order of the field%0A     * @param props        properties map%0A     */%0A    public Field(Schema schema, String name, List%3CString%3E aliases, int pos, String doc,%0A                 JsonNode defaultValue, SortOrder sortOrder, PropertyMap props) %7B%0A        if (name == null %7C%7C name.isEmpty()) %7B%0A            throw new IllegalArgumentException(%22name cannot be null.%22);%0A        %7D%0A        if (schema == null) %7B%0A            throw new IllegalArgumentException(%22schema cannot be null.%22);%0A        %7D%0A        this.schema = schema;%0A        this.name = name;%0A        this.aliases = aliases;%0A        this.pos = pos;%0A        this.doc = doc;%0A        this.defaultValue = defaultValue;%0A        this.ordering = sortOrder;%0A        this.props = props;%0A    %7D%0A%0A    public String getName() %7B%0A        return name;%0A    %7D%0A%0A    public PropertyMap getProps() %7B%0A        return props;%0A    %7D%0A%0A    public Schema getSchema() %7B%0A        return schema;%0A    %7D%0A%0A    public SortOrder getOrdering() %7B%0A        return ordering;%0A    %7D%0A%0A    public JsonNode getDefaultValue() %7B%0A        return defaultValue;%0A    %7D%0A%0A    public String getDoc() %7B%0A        return doc;%0A    %7D%0A%0A    public int getPos() %7B%0A        return pos;%0A    %7D%0A%0A    public List%3CString%3E getAliases() %7B%0A        return aliases;%0A    %7D
 %0A%7D%0A

add the Field class...