Though compatible with MIDP1

Though compatible with MIDP1.0 the JADE support for content languages and ontologies is not particularly lightweight and might cause memory problems on devices with limited resources. For this reason this package includes an alternative very lightweight support composed of five classes only.

This support allows to create complex content expressions as Frame objects and to convert them to/from sequences of bytes encoded according to the LEAP language. More in details, each frame has a type-name and a number of composing elements that can be either other frames or primitive elements (Integer, Boolean, String, Date, byte[] and AID). There are two types of frame:

· Ordered frames whose composing elements can be retrieved by an index.

· Qualified frames whose composing elements can be retrieved by a unique name.

These are represented by the OrderedFrame (that extends java.util.Vector) and QualifiedFrame (that extends java.util.Hashtable) classes respectively. It is important to note that it is the responsibility of the user to ensure that elements in a Frame object are instances of one of the supported types (see above).

Having built a content expression as a Frame object the encode() method of the LEAPFrameCodec class can be used to convert it into a sequence of byte that can be set in the :content slot of an ACLMessage by means of the setByteSequenceContent() method.

This light support is fully interoperable with the “standard” jade support for content languages and ontologies provided that the LEAP language is used.