/**
* $RCSfile$
* $Revision$
* $Date$
*
* Copyright 2003-2004 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx;
import org.jivesoftware.smack.util.StringUtils;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
/**
* Represents a field of a form. The field could be used to represent a question to complete,
* a completed question or a data returned from a search. The exact interpretation of the field
* depends on the context where the field is used.
*
* @author Gaston Dombiak
*/
public class FormField {
public static final String TYPE_BOOLEAN = "boolean";
public static final String TYPE_FIXED = "fixed";
public static final String TYPE_HIDDEN = "hidden";
public static final String TYPE_JID_MULTI = "jid-multi";
public static final String TYPE_JID_SINGLE = "jid-single";
public static final String TYPE_LIST_MULTI = "list-multi";
public static final String TYPE_LIST_SINGLE = "list-single";
public static final String TYPE_TEXT_MULTI = "text-multi";
public static final String TYPE_TEXT_PRIVATE = "text-private";
public static final String TYPE_TEXT_SINGLE = "text-single";
private String description;
private boolean required = false;
private String label;
private String variable;
private String type;
private final List