The Nexacro provides X-API as a server module. Using this Nexacro API, NRE interprets the created Dataset format and displays apps on the UI screen.
This chapter explains the Dataset format created by X-API. XML files abiding by this format can be acknowledged as applicable data on the Nexacro Runtime. It is possible to develop server programs 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
The XML declaration is defined as follows.
<?xml version="1.0" encoding="utf-8"?>
The XML declaration should be placed at the beginning of an xml document. There should be no letter, including blanks, before the declaration.
XML Example
<?xml version="1.0" encoding="utf-8"?> <Root xmlns="http://www.nexacroplatform.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 Elements
The Dataset elements are described here.
Root
- Outline
The top-level element that indicates a Dataset.
- Child element
Parameters, Dataset
- Repeat
One
- Property
<Root xmlns="http://www.nexacroplatform.com/platform/dataset"> <Root xmlns:nexacro="http://www.nexacroplatform.com/platform/dataset"> <Root xmlns=".." version="1000">
Property name | Description |
---|---|
xmlns | Name space, if not using a basic name space then show as xmlns:nexacro |
ver | Clarifies Dataset layout version. |
Parameters
- Outline
An element clarifying the parameters needed for communication. The "child parameter" has the actual value, and the "parameters" element is an assemblage of (child) parameters .
- Child element
Parameter
- Repeat
None or one
Parameters > Parameter
- Outline
Clarifies the value of a parameter
- Child element
None
- Repeat
None or as many as the number of parameters
- Property
<Parameter id="ErrorMsg" type="STRING">SUCC</ Parameter >
Property Name | Description |
---|---|
id | Parameter name |
type | Parameter type |
- Note
The Nexacro uses the required parameters described below. You need to set parameters for the interconnection with Nexacro.
<Parameter id="ErrorCode">1</Parameter> <Parameter id="ErrorMsg">SUCC</Parameter> <Parameter id="cachetype">Session</Parameter>
ID
ID | Description |
---|---|
ErrorCode | Error Code
|
ErrorMsg | Error Message When ErrorCode is not specified or 0, it is success. Otherwise, fail |
CacheType | Defines the cache method type:
|
Type
The data type can be one of the following.
STRING: Regardless of the column size, there is no limit to the width. (However it is limited to about 2GB since the system can allot 2GB at a time)
In the case of an empty 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: 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: Binary data
Dataset
- Outline
Element that has the value of one Dataset. A Dataset has ColumnInfo which defines its structure and Rows which has the actual data as child elements.
- Child element
ColumnInfo, Rows
- Repeat
None or as many as the number of Dataset XML passes
- Property
<Dataset id="History">
Property Name | Description |
---|---|
id | Dataset name |
Dataset > ColumnInfo
- Outline
It is used to express the Dataset schema. Child elements—ConstColumns and Columns—show the actual data. ColumnInfo is an assemblage of ConstColumns and Columns. ConstColumns show the schema of the columns with fixed values. Columns show the schema of the columns with non-fixed values.
- Child element
ConstColumn, Column
- Repeat
None or one
As for the child elements of ColumnInfo, ConstColumns must come before Columns.
If ConstColumns and Columns are arranged out of order, the app may not be able to process the data.
(X) When ConstColumns do not come first <ColumnInfo> <Column id="stockCode" size="5" type="STRING"/> <Column id="currentprice" size="10" type="INT"/> <ConstColumn id="market" size="10" type="STRING" value="kse"/> <ConstColumn id="openprice" size="10" type="INT" value="15000"/> </ColumnInfo> ...
(X) When ConstColumns and Columns are jumbled <ColumnInfo> <ConstColumn id="market" size="10" type="STRING" value="kse"/> <Column id="currentprice" size="10" type="INT"/> <ConstColumn id="openprice" size="10" type="INT" value="15000"/> <Column id="stockCode" size="5" type="STRING"/> </ColumnInfo> ...
Dataset > ColumnInfo > ConstColumn
- Outline
Expresses the schema as Column that always has a fixed value.
- Child element
None
- Repeat
None or as many as the number of fixed value column
- Property
<ConstColumn id="systemName" size="255" type="STRING" value="Production"/>
Property Name | Description |
---|---|
id | Column name |
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
It clarifies the value of a parameter
- Child element
None
- Repeat
None or as many as the number of non-fixed value columns
- Property
<Column id="department" size="255" type="STRING" prop="text" sumtext="total"/>
Property Name | Description |
---|---|
id | Column name |
size | Maximum data size |
type | Data type of the column |
Prop | Defines the summary type |
Sumtext | Character string when prop value is text |
- Note
The value set in the type will be the same as the type in ColumnInfo.
The prop has the following values.
count: The number of rows of the column
sum: The sum of row values of the column
max: The maximum value of the rows in the column
min: The minimum value of the rows of the column
avg: The average of the row value of the column
Text: Sumtext property value
Dataset > Rows
- Outline
It is an assemblage of the rows of a Dataset. It has a row that shows the actual data as its child element.
- Child element
Row
- Repeat
None or one
Dataset > Rows > Row
- Outline
It expresses the data of a row in the Dataset. It has Col as its child element, which expresses value of each column. When the type is "update", it has another child element Org_Row that has the original values of a row.
- Child element
Col, Org_Row
- Repeat
None or as many as the number of rows of Dataset
- Property
<Row type="insert"> <Col id="currentCode">10001</Col> <Col id="currentprice">13400</Col> </Row> <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> <Row type="delete"> <Col id="currentCode">10001</Col> <Col id="currentprice">13400</Col> </Row>
Property Name | Description |
---|---|
type | insert : A row added to the original Dataset |
update: A row modified in the original Dataset. It includes Org_Row as its child element. Org_Row is the original row. | |
delete: A row deleted from the original Dataset |
Dataset > Rows > Row > Col
- Outline
It expresses the value of each column of a Dataset
- Child element
None.
- Repeat
None or as many as the number of columns
- Property
<Col id="department">management</Col>
Property Name | Description |
---|---|
Id | Column name. It Is the same as the name set in the child elements (ConstColumn, Column) of ColumnInfo |
- Note
In the case of an empty string:
<Col id="department"></Col> or <Col id="department"/>
In the case of null, it is classified as without "tag".
Dataset > Rows > Row > OrgRow
- Outline
It has the original value when the value of Dataset’s row is modified. It has Col which has the actual value as its child element.
- Child element
Col
- Repeat
None or one.
- Note
Similar to Row which is its parent element but has no property
Dataset > Rows > Row > OrgRow > Col
- Outline
It expresses the original column value before the value is modified
- Child element
None
- Repeat
None or as many as the number of columns
- Property
<Col id="department">management</Col>
Property Name | Description |
---|---|
id | Column name. It is the same as the name set in the child elements (ConstColumn, Column) of ColumnInfo |