1 /*******************************************************************************
2 * Copyright (c) 2007, 2011 Association for Decentralized Information Management in
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.databoard.tests;
14 import java.util.TreeMap;
15 import java.util.TreeSet;
17 import org.simantics.databoard.Bindings;
18 import org.simantics.databoard.annotations.Name;
19 import org.simantics.databoard.binding.Binding;
20 import org.simantics.databoard.serialization.Serializer;
22 public class Jotakin15 {
26 public @Name("Field1") TreeMap<String, Integer> xyz1 = new TreeMap<String, Integer>();
27 public TreeSet<String> xyz2 = new TreeSet<String>();
28 public TreeMap<String, Integer[]> xyz3 = new TreeMap<String, Integer[]>();
29 public TreeMap<String, Integer[][]> xyz4 = new TreeMap<String, Integer[][]>();
30 public TreeMap<String, int[][]> xyz5 = new TreeMap<String, int[][]>();
35 public static void main(String[] args) throws Exception {
37 Binding bing = Bindings.getBindingUnchecked( XClass.class );
38 System.out.println(bing.type());
39 Serializer sers = Bindings.getSerializer( bing );
41 XClass x = new XClass();
45 byte[] data = sers.serialize( x );
47 XClass y = (XClass) sers.deserialize( data );
48 System.out.println(bing.toString(y));