appinfo
appinfo structures are mapped to XOM properties.
XML schema appinfo structures are automatically mapped to XOM properties when the name is equal to “http://www.ilog.com/rules/xml”.
Example of appinfo mapping
The following example shows how a simple appinfo structure is translated in the XOM.
Here is the schema:
<appinfo xmlns:irl="http://www.ilog.com/rules/xml">
<irl:property name="property1">property1Value</irl:property>
</appinfo>
Here is the XOM representation:
property property1 "property1Value"
appinfo as a class property
The following example demonstrates how to create class properties using appinfo structures. This example maps the complex type book, which has the bookRenderer and position properties, to a class named Book.
Example of mapping appinfo as a class property
Here is the schema:
<complexType name="book">
<annotation>
<appinfo xmlns:irl="http://www.ilog.com/rules/xml">
<irl:property name="bookRenderer">Renderer1</irl:property>
<irl:property name="position">
<irl:property name="x">10</irl:property>
<irl:property name="y">20</irl:property>
</irl:property>
</appinfo>
</annotation>
<sequence>
<element name="ident"/>
<element name="title"/>
</sequence>
</complexType>
Here is the XOM representation:
class Book extends IlrXmlObject
{
property bookRenderer "Renderer1"
property position {
x "10",
y "20"
}
String ident;
String title;
}
appinfo as a field property
The following example demonstrates how to create field properties using appinfo structures. This example maps the complex type book, which has the bookRenderer and position properties, to a field named ident.
Here is the schema:
<complexType name="book">
<sequence>
<element name="ident">
<annotation>
<appinfo xmlns:irl="http://www.ilog.com/rules/xml">
<irl:property name="bookRenderer">Renderer1</irl:property>
<irl:property name="position">
<irl:property name="x">10</irl:property>
<irl:property name="y">20</irl:property>
</irl:property>
</appinfo>
<annotation>
</element>
<element name="title"/>
</sequence>
</complexType>
Here is the XOM representation:
class Book extends IlrXmlObject
{
String ident
property bookRenderer "Renderer1"
property position {
x "10",
y "20"
};
String title;
}