Home > Models
Types
This page presents the Data Types supported by EBX.Platform. For the definition of tables, read the section Tables & Filters .
- XML Schema Simple types
- XML Schema Complex types
- Extended Simple Types defined by EBX.Platform
- Complex Types defined by EBX.Platform
- Aggregated Lists
XML Schema Simple types
The table below lists all simple types defined in XML Schema and supported by EBX.Platform:
|
WXS type |
Java class | |
|
primitive datatype |
java.lang.String | |
|
primitive datatype |
java.lang.Boolean | |
|
primitive datatype |
java.math.BigDecimal | |
|
primitive datatype |
java.util.Date | |
|
primitive datatype |
java.util.Date | |
|
primitive datatype |
java.util.Date | |
|
primitive datatype |
java.net.URI | |
|
string restriction |
java.lang.String | |
|
decimal restriction |
java.lang.Integer | |
|
decimal restriction |
java.lang.Integer |
The rightmost column shows the Java class that is instantiated in for each XML Schema type in EBX.Platform. Correspondence rules between XML Schema types and Java types are detailed in the section Mapping to Java .
Limitation of EBX.Platform current version: the type integer is not fully implemented by EBX.Platform since it is not infinite as specified by XML Schema. Hence it is preferable to use type int .
XML Schema Complex types
Complex types can be defined when designing an adaptation model. A named complex type can be reused in the model.
Restrictions:
-
In term of content model, only the tag
<sequence>is allowed (in particular, the attribute definition is not supported) -
Type extension is not supported in the current version of EBX.Platform
Extended Simple Types defined by EBX.Platform
EBX.Platform provides pre-defined simple data types:
|
WXS type |
Java class | |
|
text |
string restriction |
java.lang.String |
|
html |
string restriction |
java.lang.String |
|
|
string restriction |
java.lang.String |
|
password |
string restriction |
java.lang.String |
|
resource |
anyURI restriction |
internal class |
|
locale |
string restriction |
java.util.Locale |
Those types are defined by the reserved schema common-1.0.xsd . Their definition is detailed below:
-
text
This type represents a textual information. Regarding a basic
xs:string, its default user interface in EBX.Manager consists of a dedicated editor with several lines for input and display.<xs:simpleType name="text">
<xs:restriction base="xs:string" />
</xs:simpleType> -
html
This represents a character string with HTML format. A "wysiwyg" editor is provided in EBX.Manager to edit it.
<xs:simpleType name="html">
<xs:restriction base="xs:string"/>
</xs:simpleType> -
email
This represents an email address as specified in RFC822.
<xs:simpleType name="email">
<xs:restriction base="xs:string"/>
</xs:simpleType> -
password
This represents an encrypted password. A specific editor is provided in EBX.Manager to edit it.
<xs:element name="password" type="osd:password"/>
The default editor performs an encryption using the SHA-256 algorithm. However, it is possible to specify a different encryption class, which must implement the interface
Encryption.<xs:element name="password" type="osd:password">
<xs:annotation>
<xs:appinfo>
<osd:uiBean class="com.orchestranetworks.ui.UIPassword">
<encryptionClass>package.EncryptionClassName</encryptionClass>
</osd:uiBean>
</xs:appinfo>
</xs:annotation>
</xs:element> -
resource
This represents an EBX.Platform resource. A resource is a file of type image, html, css or javascript, stored into an EBX.Platform module. It requires the definition of the facet FacetOResource .
<xs:simpleType name="resource">
<xs:restriction base="xs:anyURI"/>
</xs:simpleType> -
locale
This represents a geographical, political or cultural specific location. The locale type is translated into Java by the class
java.util.Locale.<xs:simpleType name="locale">
<xs:restriction base="xs:string">
<xs:enumeration value="ar" osd:label="Arabic"/>
<xs:enumeration value="ar_AE" osd:label="Arabic (United Arab Emirates)"/>
<xs:enumeration value="ar_BH" osd:label="Arabic (Bahrain)"/>
<xs:enumeration value="ar_DZ" osd:label="Arabic (Algeria)"/>
<xs:enumeration value="ar_EG" osd:label="Arabic (Egypt)"/>
<xs:enumeration value="ar_IQ" osd:label="Arabic (Iraq)"/>
...
<xs:enumeration value="vi_VN" osd:label="Vietnamese (Vietnam)"/>
<xs:enumeration value="zh" osd:label="Chinese"/>
<xs:enumeration value="zh_CN" osd:label="Chinese (China)"/>
<xs:enumeration value="zh_HK" osd:label="Chinese (Hong Kong)"/>
<xs:enumeration value="zh_TW" osd:label="Chinese (Taiwan)"/>
</xs:restriction>
</xs:simpleType>
Complex Types defined by EBX.Platform
EBX.Platform provides pre-defined complex data types:
|
WXS type |
Description |
|
UDA |
User Defined Attribute: this type allows any user, according to his access rights, to define a value associated with an attribute defined in a dictionary called a UDA Catalog. |
|
UDACatalog |
Catalog of User Defined Attributes: this type consists of a table in which attributes can be specified. This catalog will be used by all
|
-
UDA
A User Defined Attribute (UDA) supports both
minOccursandmaxOccursparameters andosd:UDACatalogPathto specify the path of the matching catalog.In the Manager, a UDA looks like:<xs:element name="firstUDA" type="osd:UDA" minOccurs="0"
maxOccurs="unbounded" osd:UDACatalogPath="//insuranceCatalog" />
<xs:element name="secondUDA" type="osd:UDA" minOccurs="1"
maxOccurs="1" osd:UDACatalogPath="/root/userCatalog" />
<xs:element name="thirdUDA" type="osd:UDA" minOccurs="0"
maxOccurs="1" osd:UDACatalogPath="//userCatalog" />
As shown on the previous image, the editor adapts itself to the type of the selected attribute.

All the available attributes are the ones declared in the UDA Catalog detailed next.
-
UDACatalog
A catalog is a table. The parameters
minOccursandmaxOccurshave to be specified.Several catalogs can be defined in one schema.
In the Manager, a UDA Catalog is like any table<xs:element name="insuranceCatalog" type="osd:UDACatalog"
minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation xml:lang="en-US">Insurance Catalog.</xs:documentation>
<xs:documentation xml:lang="fr-FR">Catalog assurance.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="userCatalog" type="osd:UDACatalog"
minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation xml:lang="en-US">User catalog.</xs:documentation>
<xs:documentation xml:lang="fr-FR">Catalogue utilisateur.</xs:documentation>
</xs:annotation>
</xs:element>
Only the following types are available for creating new attributes:
-
xs:string
-
xs:boolean
-
xs:decimal
-
xs:dateTime
-
xs:time
-
xs:date
-
xs:anyURI
-
xs:Name
-
xs:int
-
osd:html
-
osd:email
-
osd:password
-
osd:locale
-
osd:text
-
Aggregated Lists
In XML Schema, the maximum number of times an element may appear is determined by the value of a
maxOccurs attribute in its declaration. If this value is strictly greater than 1 or is equal to
unbounded , then the Master Data can have multiple occurrences. If no
osd:table declaration is added, this case is called
aggregated lists . In Java, it is represented as an instance of class
java.util.List .
Important note: the addition of a
osd:table declaration to an element with
maxOccurs > 1 is a very important consideration that must be taken into account during the design process. An aggregated list is indeed severely limited regarding the many features that are supported by tables. As a reminder, here are some of them: lookups, filters and searches; sorting, custom view and display in hierarchies; identity constraints (primary keys and uniqueness constraints); detailed permissions for creation, modification, delete and particular permissions at occurrence level; detailed comparison and merge; and last but not least performance and memory optimizations. Hence
aggregated lists should be used only for small volumes of simple data (one or two dozen of occurrences), with no advanced requirements . For larger volumes of data or more advanced functionalities, it is strongly advised to use
osd:table declarations.
For more information on table declarations, please read the chapter about tables .
Below is an example of an aggregated list that defines the pricing of a loan product, depending on the amount borrowed.
<xs:annotation>
<xs:documentation>
<osd:label>Pricing</osd:label>
<osd:description>Pricing grid </osd:description>
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="amount" type="xs:integer">
<xs:annotation>
<xs:documentation>
<osd:label>Amount borrowed</osd:label>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="monthly" type="xs:integer">
<xs:annotation>
<xs:documentation>
<osd:label>Monthly payment </osd:label>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="cost" type="xs:integer">
<xs:annotation>
<xs:documentation>
<osd:label>Cost</osd:label>
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
Aggregated lists have a dedicated editor in
EBX.Manager . This editor allows you to add occurrences with the link Add an occurrence or to delete occurrences with the button ![]()
Home > Models