XPLATFORM provides X-API as server module. Using this API XPLATFORM Runtime interprets the Dataset format and shows on UI screen.
Here, the dataset format X-API produces will be explained. XML Format which follows this format, XPLATFORM Runtime will consider it as data and use it. So, server program can be developed without using X-API.
Dataset XML layout
XML Declaration | |||||
Root | |||||
Cache | |||||
Parameters | |||||
Parameter (repeat) | |||||
Dataset (repeat) | |||||
ColumnInfo | |||||
ConstColumn (repeat) | |||||
Column (repeat) | |||||
Rows | |||||
Row (repeat) | |||||
Col (repeat) | |||||
OrgRow | |||||
Col (repeat) |
XML Declaration
Xml proclamation which states something is xml is defined as the following.
<?xml version=”1.0” encoding=”utf-8”?>
Xml proclamation has to be in the very front of an xml document, and in front of this proclamation no letters, including blank letters can come.
xml example
<?xml version="1.0" encoding="UTF-8"?> <Root xmlns="http://www.tobesoft.com/platform/Dataset" ver="4000"> <Parameters> <Parameter id="service">stock</Parameter> <Parameter id="method">search</Parameter> </Parameters> <Dataset id="output"> <ColumnInfo> <ConstColumn id="market" size="10" type="STRING" value="kse" /> <ConstColumn id="openprice" size="10" type="INT" value="15000" /> <Column id="stockCode" size="5" type="STRING" /> <Column id="currentprice" size="10" type="INT" /> </ColumnInfo> <Rows> <Row> <Col id="currentCode">10001</Col> <Col id="currentprice">5700</Col> </Row> <Row> <Col id="currentCode">10002</Col> <Col id="currentprice">14500</Col> </Row> </Rows> </Dataset> </Root>
Dataset element description
Following is the description for dataset element.
Root
Outline
Most significant element that indicates dataset.
Child element
Parameters
Dataset
Whether to repeat or not
You must repeat once.
Property
Property name | Description | Example |
---|---|---|
xmlns | Name space, if not using a basic name space then show as xmlns:tobe | <Root xmlns=”http://www.tobesoft.com/platform/Dataset”> <Root xmlns:tobe=”http://www.tobesoft.com/platform/Dataset”> |
ver | Clarifies dataset layout version. | <Root xmlns=”” ver=”5000”> |
Parameters
Outline
It is an element to clarify the parameters needed for communication. Child element parameter has the actual parameter value and parameters element is a set that has these.
Child element
Parameter
Whether to repeat or not
No or once.
Parameters > Parameter
Outline
It clarifies the value of parameter.
Child element
None
Whether to repeat or not
No or element can be repeated as many times as the number of parameters.
Property
Property name | Description | Example |
---|---|---|
id | Parameter name | <Parameter id="ErrorMsg" type=”STRING”>SUCC </ Parameter > |
type | Parameter type |
Note
Following are the data types that can come in type.
STRING: Regardless of the column size there is no limit to the width. (However is limited to around 2GB which is the size the system can allot at once)
In the case of 0 length string
<Parameter id="ErrorMsg" type=”STRING”></Parameter>
In the case of null
Is divided by <Parameter id="ErrorMsg" type=”STRING”/>
INT: Whole number(-231 ~ 231-1)
FLOAT, DECIMAL: (±2.2X10-308 ~±1.7X10308)
BIGDECIMAL: Complex number(±10-1056 ~ ±101056)
DATE: YYYYMMDD(-8192/01/01 ~ 8191/12/31)
DATETIME : YYYYMMDDHHmmssuuu (Possible to include msec)
TIME : 6 digits HHmmssuuu(Possible to include msec)
BLOB: Second echelon data
MiPlatform has been defined to use the required parameters as the following. To link with MiPlatform parameters need to be set.
id | Description | Example |
---|---|---|
ErrorCode | Error Code. -When calling transaction function, in the case it is lower than 0 then it is an error defined by the user. It will be processed as fail without reflecting UpdateStatus in InputDataset. -When it is 0, it is the normal state defined by the user, UpdateStatus will be reflected on InputDataset and will be processed as success. -When load function is called When it is lower than 0 it is processed as fail defined by the user. When higher than 0, it is a normal state defined by the user, and will be processed as success. When undesignated : 0 | <Parameter id="ErrorCode">1 </ Parameter > |
ErrorMsg | Error Message When undesignated : When ErrorCode is undesignated or 0 it is success, in other cases, fail. | < Parameter id="ErrorMsg">SUCC </ Parameter > |
CacheType | Designates the type of cache method. Type is divided into, dynamic, static and none. When undesignated : Session | < Parameter id="cachetype"> Session </ Parameter> |
Dataset
Outline
Element that has the value of one dataset. As for child elements there are ColumnInfo, which expresses the structure of dataset and Rows which has the actual data of dataset.
Child element
ColumnInfo
Rows
Whether to repeat or not
No or can be repeated as many times as the number of dataset xml passes.
Property
Property name | Description | Example |
---|---|---|
id | Dataset name | <Dataset id=”History”> |
Dataset > ColumnInfo
Outline
Element used to express schema of Dataset. The actual information of schema include ConstColumn which is the child element and ColumnInfo expressed by Column, having a set meaning. ConstColumn expresses the fixed value of the column of the schema and the none-fixed value of the column of the schema is expressed by Column.
Child element
ConstColumn
Column
Whether to repeat or not
No or may repeat once.
Dataset > ColumnInfo > ConstColumn
Outline
Expresses the schema is Column that always has a fixed value.
Child element
None
Whether to repeat or not
No or may repeat as many as the number of fixed value column.
Property
Property name | Description | Example |
---|---|---|
id | Column name | <ConstColumn id=”systemName” size=”255” type=”STRING” value=”Production”/> |
size | Maximum data size | |
type | Data type of column | |
value | Fixed value of column |
Note
Following are the data type that can come in type.
STRING: Regardless of the column size there is no limit to the width. (However is limited to around 2GB which is the size the system can allot at once)
INT: Whole number(-231 ~ 231-1)
FLOAT, DECIMAL: (±2.2X10-308 ~±1.7X10308)
BIGDECIMAL: Real number(±10-1056 ~ ±101056)
DATE: YYYYMMDD(-8192/01/01 ~ 8191/12/31)
DATETIME : YYYYMMDDHHmmssuuu (Possible to include msec)
TIME : 6 digits HHmmssuuu(Possible to include msec)
BLOB: Second echelon data
Dataset > ColumnInfo > Column
Outline
Clarifies the value of parameter.
Child element
None
Whether to repeat or not
No or may repeat as many as the number of non-fixed value column.
Property
Property name | Description | Example |
---|---|---|
id | Column name | <Column id=”department” size=”255” type=”STRING” prop=”text” sumtext=”total”/> |
size | Maximum data size | |
type | Data type of column | |
Prop | Define type for summary | |
Sumtext | Character string when prop value is text |
Note
The value set in type is the type in Column Info.
Prop has the following values.
count : The number of rows of this column is indicated in summary.
sum: The sum of row values of this column is indicated in summary.
max: The maximum value of the rows in this column is indicated in summary.
min: The minimum value of the rows of this column is indicated in summary.
avg: The average of the row value of this column is indicated in summary.
Text: sumtext property value is indicated in summary.
Dataset > Rows
Outline
A set meaning of element to include each row of dataset. It has the row that expresses the real row as child element.
Child element
Row
Whether to repeat or not
No or may repeat once.
Dataset > Rows > Row
Outline
Element to express the data of a row of dataset. It has Col as its child element, which expresses value of each column. And when the type is ‘update’, its child element is Org_Row, which has the Row value before change.
Child element
Col
Org_Row
Whether to repeat or not
No or it can be repeated as many times as the number of rows of dataset.
Property
Property name | Description | Example |
---|---|---|
type | insert : Row added to original dataset | <Row type="insert"> <Col id=”currentCode”>10001</Col> <Col id=”currentprice”>13400</Col> </Row> |
update: Row modified in original dataset. It includes Org_Row as its child element. Org_Rowis the original row before changing. | <Rows> <Row type=”update”> <Col id=”currentCode”>10001</Col> <Col id=”currentprice”>13400</Col> <OrgRow> <Col id=”currentCode”>10001</Col> <Col id=”currentprice”>13700</Col> </OrgRow> </Row> </Rows> | |
delete: Row deleted from the original dataset | <Row type="delete"> <Col id=”currentCode”>10001</Col> <Col id=”currentprice”>13400</Col> </Row> |
Dataset > Rows > Row > Col
Outline
Indicates each column value of dataset.
Child element
None.
Whether to repeat or not
No or as many times as the number of columns
Property
Property name | Description | Example |
---|---|---|
Id | Column name. Is the same as the name set in Child element of ColumnInfo (ConstColumn , Column) | <Col id=”department”>management</Col> |
Note
In the case of 0 length string
<Col id=”department” ></Col> or <Col id=”department” />
In the case of null, classified as not having tag.
Dataset > Rows > Row > OrgRow
Outline
Element that has the original value when the value of dataset’s row is altered. It has a child element Col, which has actual value.
Child element
Col
Whether to repeat or not
No or may repeat once.
Note
Similar to Row which is its parent element but has no property
Dataset > Rows > Row > OrgRow > Col
Outline
Indicates column value before alteration.
Child element
None
Whether to repeat or not
No or may repeat as many times as the number of columns.
Property
Property name | Description | Example |
---|---|---|
id | Column name. It is the same as the name set in child element of Column Info (Const Column , Column) | <Col id=”department”>management</Col> |