-=Datatype=\r
-In Databoard all values have a type representation, [../javadoc/org/simantics/databoard/type/Datatype.html|Datatype]. \r
-It is the base abstract class for all concrete type classes (See table below). \r
-There is a facade class utility ([../javadoc/org/simantics/databoard/Datatypes.html|Datatypes]) that provides functions to most of the Datatype library's features.\r
-\r
-'''[../javadoc/org/simantics/databoard/type|org.simantics.databoard.type]'''.\r
-{| style="background-color: #f9f9f9; border: 1px solid #aaaaaa; "\r
-|- style="background-color: #e9e9e9; " |\r
-| '''Class''' || '''Description'''\r
-|- \r
-| [../javadoc/org/simantics/databoard/type/Datatype.html|Datatype] || Base class for all data types\r
-|- \r
-| [../javadoc/org/simantics/databoard/type/RecordType.html|RecordType] || Record \r
-|- \r
-| [../javadoc/org/simantics/databoard/type/ArrayType.html|ArrayType] || Array - an ordered sequence of elements of one type.\r
-|- \r
-| [../javadoc/org/simantics/databoard/type/MapType.html|MapType] || Map - an ordered map of keys to values. \r
-|- \r
-| [../javadoc/org/simantics/databoard/type/UnionType.html|UnionType] || Union\r
-|- \r
-| [../javadoc/org/simantics/databoard/type/BooleanType.html|BooleanType],[../javadoc/org/simantics/databoard/type/IntType.html|IntType],[../javadoc/org/simantics/databoard/type/LongType.html|LongType],[../javadoc/org/simantics/databoard/type/FloatType.html|FloatType],[../javadoc/org/simantics/databoard/type/DoubleType.html|DoubleType]\r
-| Primitive and numeric types\r
-|- \r
-| [../javadoc/org/simantics/databoard/type/StringType.html|StringType] || String \r
-|- \r
-| [../javadoc/org/simantics/databoard/type/OptionalType.html|OptionalType] || Optional value\r
-|- \r
-| [../javadoc/org/simantics/databoard/type/VariantType.html|VariantType] || Variant value\r
-|}\r
-\r
-\r
-Datatype can be acquired or created using one of the following methods:\r
-* Construct new\r
-* Constant \r
-* [[binding#Reflection|Reflection]]-Read from a Class\r
-* Read from string of [[Databoard_Specification|the text notation]].\r
-<pre class="code">\r
- Datatype type = new DoubleType();\r
- Datatype type = Datatypes.DOUBLE;\r
- Datatype type = Datatypes.getDatatype( Double.class );\r
- \r
- Datatypes.addDefinition("type Node = { id : String; children : Node[] }");\r
- Datatype type = Datatypes.getDatatype("Node");\r
-</pre>\r
-\r
-==Parsing==\r
-Datatypes are parsed using <code>Datatypes.DatatypeRepository</code>. \r
-<pre class="code">\r
- Datatypes.addDefinition("type Node = { id : String; children : Node[] }");\r
- Datatype type = Datatypes.getDatatype("Node");\r
-</pre>\r
-\r
-Types are printed to types and definitions with \r
-<pre class="code">\r
- String type = type.toString();\r
- \r
- DatatypeRepository repo = new DatatypeRepository();\r
- repo.add("temp1", type);\r
- String typeDef = repo.toString();\r
-</pre>\r
-\r
-==Structure Example==\r
-A node is a recursive type. With databoard typesystem it could be stated as\r
-<pre class="code">\r
- type Node = {\r
- id : String;\r
- displayNames : LocalizedTexts;\r
- children : Node[];\r
- value : Optional(Variant);\r
- }\r
-</pre>\r
-\r
-[[Image:NodeType.png|Type presented as tree]]\r
-\r
-\r
-A couple of instances with Databoard value notation:\r
-<pre class="code">\r
- root : Node = {\r
- id = \93PI_01\94\r
- displayNames = map{ \93en\94 = \93Instrument \93 }\r
- children = \r
- [ \r
- {id=\94Child\94, \r
- displayNames = map{ \93en\94 = \93Child\94} },\r
- value = 5 : Integer\r
- }\r
- ]\r
- value = \93<root>\94 : String\r
- }\r
-</pre>\r
-\r
-[[Image:NodeInstance.png|Node values preseted as tree]]\r
+=Datatype=
+In Databoard all values have a type representation, [../javadoc/org/simantics/databoard/type/Datatype.html|Datatype].
+It is the base abstract class for all concrete type classes (See table below).
+There is a facade class utility ([../javadoc/org/simantics/databoard/Datatypes.html|Datatypes]) that provides functions to most of the Datatype library's features.
+
+'''[../javadoc/org/simantics/databoard/type|org.simantics.databoard.type]'''.
+{| style="background-color: #f9f9f9; border: 1px solid #aaaaaa; "
+|- style="background-color: #e9e9e9; " |
+| '''Class''' || '''Description'''
+|-
+| [../javadoc/org/simantics/databoard/type/Datatype.html|Datatype] || Base class for all data types
+|-
+| [../javadoc/org/simantics/databoard/type/RecordType.html|RecordType] || Record
+|-
+| [../javadoc/org/simantics/databoard/type/ArrayType.html|ArrayType] || Array - an ordered sequence of elements of one type.
+|-
+| [../javadoc/org/simantics/databoard/type/MapType.html|MapType] || Map - an ordered map of keys to values.
+|-
+| [../javadoc/org/simantics/databoard/type/UnionType.html|UnionType] || Union
+|-
+| [../javadoc/org/simantics/databoard/type/BooleanType.html|BooleanType],[../javadoc/org/simantics/databoard/type/IntType.html|IntType],[../javadoc/org/simantics/databoard/type/LongType.html|LongType],[../javadoc/org/simantics/databoard/type/FloatType.html|FloatType],[../javadoc/org/simantics/databoard/type/DoubleType.html|DoubleType]
+| Primitive and numeric types
+|-
+| [../javadoc/org/simantics/databoard/type/StringType.html|StringType] || String
+|-
+| [../javadoc/org/simantics/databoard/type/OptionalType.html|OptionalType] || Optional value
+|-
+| [../javadoc/org/simantics/databoard/type/VariantType.html|VariantType] || Variant value
+|}
+
+
+Datatype can be acquired or created using one of the following methods:
+* Construct new
+* Constant
+* [[binding#Reflection|Reflection]]-Read from a Class
+* Read from string of [[Databoard_Specification|the text notation]].
+<pre class="code">
+ Datatype type = new DoubleType();
+ Datatype type = Datatypes.DOUBLE;
+ Datatype type = Datatypes.getDatatype( Double.class );
+
+ Datatypes.addDefinition("type Node = { id : String; children : Node[] }");
+ Datatype type = Datatypes.getDatatype("Node");
+</pre>
+
+==Parsing==
+Datatypes are parsed using <code>Datatypes.DatatypeRepository</code>.
+<pre class="code">
+ Datatypes.addDefinition("type Node = { id : String; children : Node[] }");
+ Datatype type = Datatypes.getDatatype("Node");
+</pre>
+
+Types are printed to types and definitions with
+<pre class="code">
+ String type = type.toString();
+
+ DatatypeRepository repo = new DatatypeRepository();
+ repo.add("temp1", type);
+ String typeDef = repo.toString();
+</pre>
+
+==Structure Example==
+A node is a recursive type. With databoard typesystem it could be stated as
+<pre class="code">
+ type Node = {
+ id : String;
+ displayNames : LocalizedTexts;
+ children : Node[];
+ value : Optional(Variant);
+ }
+</pre>
+
+[[Image:NodeType.png|Type presented as tree]]
+
+
+A couple of instances with Databoard value notation:
+<pre class="code">
+ root : Node = {
+ id = \93PI_01\94
+ displayNames = map{ \93en\94 = \93Instrument \93 }
+ children =
+ [
+ {id=\94Child\94,
+ displayNames = map{ \93en\94 = \93Child\94} },
+ value = 5 : Integer
+ }
+ ]
+ value = \93<root>\94 : String
+ }
+</pre>
+
+[[Image:NodeInstance.png|Node values preseted as tree]]