diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-04-09 16:31:49 +0200 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2016-04-25 22:19:35 +0200 |
commit | b6aefe3e510766001415cf711fbf21ae465e4657 (patch) | |
tree | 0ea757e041a2c30b21f60204a93f5d69510aa2e7 /testdata/integration/ontology_serialization | |
parent | 353b2fa76fba37b3ff0b73e23a2e422897ef876a (diff) |
added enum type support for serialization.
Diffstat (limited to 'testdata/integration/ontology_serialization')
-rw-r--r-- | testdata/integration/ontology_serialization/typesystem.in.osml | 8 | ||||
-rw-r--r-- | testdata/integration/ontology_serialization/typesystem.out.osxml | 14 |
2 files changed, 18 insertions, 4 deletions
diff --git a/testdata/integration/ontology_serialization/typesystem.in.osml b/testdata/integration/ontology_serialization/typesystem.in.osml index ec61dd3..3adbe2e 100644 --- a/testdata/integration/ontology_serialization/typesystem.in.osml +++ b/testdata/integration/ontology_serialization/typesystem.in.osml @@ -3,8 +3,14 @@ \struct#myStruct \field#i[type=int,default=1] \field#s[type=string,default=""] + \enum#myEnum + \entry STRICT + \entry FUZZY + \entry PROBABILISTIC \ontology#test \struct#a[root=true] + \attributes + \attribute#type[type=myEnum] \primitive[type=myStruct] -\a [4,"bla"] +\a[type=STRICT] [4,"bla"] diff --git a/testdata/integration/ontology_serialization/typesystem.out.osxml b/testdata/integration/ontology_serialization/typesystem.out.osxml index a8c02ae..e3652e3 100644 --- a/testdata/integration/ontology_serialization/typesystem.out.osxml +++ b/testdata/integration/ontology_serialization/typesystem.out.osxml @@ -3,6 +3,9 @@ <ontology name="test"> <struct cardinality="{*}" name="a" root="true" transparent="false"> <syntax/> + <attributes> + <attribute name="type" type="bla.myEnum"/> + </attributes> <primitive optional="false" subtree="false" type="bla.myStruct"> <syntax/> </primitive> @@ -10,11 +13,16 @@ </ontology> <typesystem name="bla"> <struct name="myStruct"> - <field default="1" name="i" optional="true" type="int"/> - <field default="" name="s" optional="true" type="string"/> + <field default="1" name="i" type="int"/> + <field default="" name="s" type="string"/> </struct> + <enum name="myEnum"> + <entry>FUZZY</entry> + <entry>PROBABILISTIC</entry> + <entry>STRICT</entry> + </enum> </typesystem> - <test:a>[ + <test:a type="0">[ "i"= 4, "s"= "bla" ]</test:a> |