<CLASS> : Class

Java class : leon.info.LyClassInfo

ROLE

This element defines a class that is a part of the logical data model handled by the created application. It is mainly composed of fields and actions that may be applied to instances of this class. Two options are available to bind such a class with data. It could be defined as local, which means that no data are provided from the outside of the application. It could also be bound to a physical class, which means that information to connect the application to a data provider is required. All objects of the physical class may have a matching logical object inside the application. Specific behaviors and treatments may be associated to a class. Defining a specific behavior of a class allows changing the generic behaviors of actions. A class can inherit from an existing class (super-class), in this case it automatically has all fields and actions of its super-class. Instances (objects) of such a class can be viewed as instances of its super-class. This implies that it's possible for example to build a table view that contains all objects of the super-class which correspond to all instances of inherited classes of this super-class. However a class used as super-class is considered abstract. This means that it can be instantiated anymore.

ATTRIBUTES

<!ATTLIST CLASS
	  id ID #REQUIRED
	  behavior CDATA #IMPLIED>
Attribute Mand. Description Default
id yes Identifier of the class.  
behavior no This attribute defines the full name of the Java class that defines the specific behavior and treatments on instances of the current class. This class must inherit from the leon.app.behavior.LyClassBehavior class.  

ELEMENTS

<!ELEMENT CLASS 
	  (NAME?,
	   LABEL*,
	   ALIAS?,
	   GROUP?,
	   PREFIX?,
	   C_MARKS*,
	   FIELDS*,
	   (SORT | SORT_REF)?,
	   ACTIONS*,
	   DATA*,
	   TIP?,
	   RULE*,
	   (CONTROL | CONTROL_REF)*)>
Element Mand. Mult. Description
NAME no no Name of the class.
LABEL no yes Dynamic label of the class.
ALIAS no no Short name of the class.
GROUP no no Name of the group to which the class belongs.
PREFIX no no Prefix used for building names of files associated to the class. This element is mainly used to contain the name of the image file that represents the class.
C_MARKS no yes Marks of the class.
FIELDS no yes List of fields of the class.
SORT yes no Default sort applied to objects of the class.
SORT_REF yes no Reference to the default sort applied to objects of the class.
ACTIONS no yes List of actions that may be applied to instances of this class.
DATA no yes Specific data
TIP no no Help section of the class.
RULE no yes Rules that are applied when modifying the values of the class fields.
CONTROL yes no Controls applied on the class.
CONTROL_REF yes no Control references applied on the class.

SAMPLE 1

<CLASS id="alrClass">
<C_BIND value="ALARM"/>
	<CACHE type='AUTO'/>
	<NAME value="ALRMClass"/>
	<PREFIX value="alr"/>
	<C_MARKS load='true'>
		<MARK name='OPERATOR'/>
		<MARK name='SUPERVISOR'/>
	</C_MARKS>
	<FIELDS>
		<FIELD_REF idref="alr_sev"/>
		<FIELD_REF idref="alr_state"/>
		<FIELD_REF idref="alr_begin_dt"/>
		<FIELD_REF idref="alr_ack_dt "/>
		<DATE id="alrm_end_dt" type='DATE_HOUR_MIN'>
			<F_BIND value="ALR_END_DATE "/>
			<NAME value="ALR_END_DT"/>
		</DATE>
		<FIELD_REF idref="alrmClass_obj"/>
		<FIELD_REF idref="alrm_obj"/>
		<FIELD_REF idref="alrm_type"/>
		<FIELD_REF idref="alrm_prob_cause"/>
		<FIELD_REF idref="alrm_num"/>
		<FIELD_REF idref="alrm_add_text"/>
	</FIELDS>
	<ACTIONS>
		<ACTION_REF idref="alr_consult"/>
		<ACTION_REF idref="alr_print"/>
		<ACTION id="alr_ack">
			<NAME value="ALR_ACK"/>
			<PREFIX value="ack"/>
			<MIN value="1"/>
			<A_MARKS>
				<MARK name='ACTION_OPERATOR'/>
			</A_MARKS>
		</ACTION>
		<ACTION id="alr_end">
			<NAME value="ALR_END"/>
			<PREFIX value="end"/>
			<MIN value="1"/>
			<MAX value="1"/>
			<A_MARKS>
				<MARK name='ACTION_SUPERVISOR'/>
			</A_MARKS>
			<FILTER id="filter_act_end" type='AND'>
				<EXP idref="alrm_state" not='true'
					condition='EQUALS' value="0"/>
			</FILTER>
		</ACTION>
	</ACTIONS>
</CLASS>

SAMPLE 2

<CLASS id="muxClass">
	<C_BIND value="MUX">
		<FILTER id="mux_filter" type='AND'>
			<EXP idref="mux_deletion_dt" condition='EQUALS'
				value="NULL"/>
		</FILTER>
	</C_BIND>
	<CACHE type='AUTO'/>
	<NAME value="MUXClass"/>
	<PREFIX value="mux"/>
	<C_MARKS load='true'>
		<MARK name='OPERATOR'/>
		<MARK name='SUPERVISOR'/>
	</C_MARKS>
	<FIELDS>
		<FIELD_REF idref="mux_ide"/>
		<RELATION id="mux_network" multiple='true'>
			<F_BIND value="NETWORK"/>
			<NAME value="MUX_NETWORK"/>
			<F_MARKS create='true' set='true'/>
			<CLASSES>
				<CLASS_REF idref="netClass"/>
			</CLASSES>
		</RELATION>
		<TEXT id="mux_name">
			<F_BIND value="NAME"/>
			<NAME value="MUX_NAME"/>
			<F_MARKS name='true' create='true' notNull='true'
				sort='true' filter='true' find='true' table='true'
				unique='true'/>
			<NCOLS value="32"/>
			<NCHARS value="32"/>
		</TEXT>
		<RELATION id="mux_location">
			<F_BIND value="LOCATION"/>
			<NAME value="MUX_LOCATION"/>
			<F_MARKS create='true' set='true'/>
			<CLASSES>
				<CLASS_REF idref="locClass"/>
			</CLASSES>
		</RELATION>
		<FIELD_REF idref="mux_creation_dt"/>
		<FIELD_REF idref="mux_deletion_dt"/>
		<FIELD_REF idref="mux_serial_number"/>
		<TEXT id="mux_ip_adr">
			<F_BIND value="IP"/>
			<FORMAT value="[0-255].[0-255].[0-255].[0-255]"/>
			<NAME value="MUX_IP_ADRESS"/>
			<F_MARKS create='true' set='true' optional='true'/>
		</TEXT>
		<FIELD_REF idref="mux_community_name"/>
		<FIELD_REF idref="operational_state"/>
		<TEXT id="mux_comment" multiple='true'>
			<F_BIND value="COMMENT"/>
			<NAME value="MUX_COMMENT"/>
			<F_MARKS create='true' set='true' optional='true'/>
			<NROWS value="5"/>
			<NCOLS value="51"/>
			<NCHARS value="255"/>
		</TEXT>
	</FIELDS>
	<ACTIONS>
		<ACTION_REF idref="_consult"/>
		<ACTION_REF idref="_create"/>
		<ACTION_REF idref="_set "/>
		<ACTION_REF idref="_delete"/>
		<ACTION_REF idref="_print"/>
		<ACTION_REF idref="act_cart"/>
		<ACTION id="xref_card" template="_table">
			<NAME value="CARDClass"/>
			<PREFIX value="card"/>
			<MIN value="1"/>
			<MAX value="1"/>
			<PARAMETER name="_classInfo" idref="cardClass"/>
		</ACTION>
	</ACTIONS>
</CLASS>