<CHOICE> : Enumeration field

Java class : leon.info.LyChoiceFieldInfo

ROLE

This element defines a choice between a set of options.
The selection of those options may be multiple or unique.

ATTRIBUTES

<!ATTLIST CHOICE
	  id ID #REQUIRED
	  template IDREF #IMPLIED
	  javaName NMTOKEN #IMPLIED
	  multiple ( true | false) "false"
	  type ( ENUM | BOOLEAN) "ENUM"
	  behavior NMTOKEN #IMPLIED>
Attribute Mand. Description Default
id yes This is the identifier of the choice field.  
template no This is the choice field used as pattern.  
javaName no Name of the JAVA attribute that corresponds to the current field when automatic code generation is used. The default value is the name of the current field.  
multiple no Indicates is the selection of several options in this choice is permitted. false
type no Specify whether the choice is a boolean or not. A boolean choice is represented by the java.lang. Boolean Java type. The option at index 0 corresponds to the false value and the option at index 1 corresponds to the true value. An choice of type enum is represented by the java.lang. Boolean Java type; each value corresponds to the option index in the choice. ENUM
behavior no Name of the Java class representing the behavior of this field. Reserved for a future use.  

ELEMENTS

<!ELEMENT CHOICE 
	  (%FIELD_BEGIN;,
	   OPTIONS*,
	   CONTEXT_FIELD?,
	   %FIELD_END;)>
Element Mand. Mult. Description
FIELD_BEGIN
yes no Begin of field description.
OPTIONS no yes Set of available options in this choice field.
CONTEXT_FIELD no no Choice field context for this choice. This attribute is used to manage the dependencies between choices. The name of option groups (name attribute of OPTIONS element) must refer to the option identifiers in the CONTEXT_FIELD field to define a dependency. The CONTEXT_FIELD notion is transitive: if C depends on B and B depends on A then C depends on A.
FIELD_END
yes no End of field description.

SAMPLE

<CHOICE id="alr_sev">
	<F_BIND value="SEVERITY"/>
	<NAME value="ALRM_SEVERITY"/>
	<F_MARKS sort='true' filter='true' status='true' table='true'/>
	<OPTIONS>
		<OPTION id="alr_sev.0" name="critical" value="0"/>
		<OPTION id="alr_sev.1" name="major" value="1"/>
		<OPTION id="alr_sev.2" name="minor" value="2"/>
		<OPTION id="alr_sev.3" name="indeterminate" value="3"/>
		<OPTION id="alr_sev.4" name="clear" value="4" default='true'/>
	</OPTIONS>
</CHOICE>