2 * ============LICENSE_START====================================================
4 * ===========================================================================
5 * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
6 * ===========================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END====================================================
22 package org.onap.aaf.misc.rosetta.test;
24 import org.junit.Test;
25 import org.onap.aaf.misc.rosetta.JaxInfo;
27 import s.xsd.LargerData;
29 public class JU_Struct {
30 public final static String XML ="<LargerData xmlns=\"urn:s:xsd\">\n" +
32 "<id>sd object 1</id>\n" +
33 "<date>1346439215932</date>\n" +
34 "<item>Item 1.1</item>\n" +
35 "<item>Item 1.2</item>\n" +
38 "<id>sd object 2</id>\n" +
39 "<date>1346439215932</date>\n" +
40 "<item>Item 2.1</item>\n" +
41 "<item>Item 2.2</item>\n" +
43 "<fluff>MyFluff</fluff>\n" +
47 // public void test2() throws Exception {
49 // SampleData sd = new SampleData();
50 // sd.setDate(new Date().getTime());
52 // sd.getItem().add("Item 1.1");
54 // InObj<SampleData> inObj = new InObj<SampleData>(SampleData.class);
56 // JaxSet<SampleData> jaxSet = JaxSet.get(SampleData.class);
57 // Setter<SampleData> setter = jaxSet.setter("id");
58 // setter.set(sd, "Your ID");
60 // for(Entry<String, Getter<SampleData>> es : jaxSet.getters()) {
61 // System.out.print(es.getKey());
62 // System.out.print(' ');
63 // System.out.println(es.getValue().get(sd));
68 public void test() throws Exception {
69 JaxInfo ji = JaxInfo.build(LargerData.class);
70 System.out.println(ji);