You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2020/03/06 21:01:38 UTC
[juneau] branch master updated: JUNEAU-184
This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new d0b049f JUNEAU-184
d0b049f is described below
commit d0b049f8cc75dc77b8f609210de32106e779d605
Author: JamesBognar <ja...@apache.org>
AuthorDate: Fri Mar 6 16:01:15 2020 -0500
JUNEAU-184
HtmlSerializer doesn't property serialize Collection<A> objects.
---
TODO.txt | 34 +-
.../org/apache/juneau/a/rttests/RoundTripTest.java | 7 -
.../apache/juneau/dto/html5/Html5ComboTest.java | 537 ++++++++++++++++++---
.../org/apache/juneau/testutils/TestUtils.java | 75 ---
.../java/org/apache/juneau/xml/BasicXmlTest.java | 138 +++---
.../java/org/apache/juneau/xml/CommonTest.java | 3 -
.../apache/juneau/xml/XmlConfigAnnotationTest.java | 6 +-
.../test/java/org/apache/juneau/xml/XmlTest.java | 2 +-
.../main/java/org/apache/juneau/BeanSession.java | 12 +
.../juneau/html/HtmlDocSerializerBuilder.java | 1 +
.../org/apache/juneau/html/HtmlParserSession.java | 12 +-
.../apache/juneau/html/HtmlSerializerBuilder.java | 1 +
.../apache/juneau/html/HtmlSerializerSession.java | 9 +-
.../html/HtmlStrippedDocSerializerBuilder.java | 1 +
.../org/apache/juneau/xml/XmlParserSession.java | 30 +-
.../java/org/apache/juneau/xml/XmlSerializer.java | 6 +-
.../apache/juneau/xml/XmlSerializerBuilder.java | 2 +
.../apache/juneau/xml/XmlSerializerSession.java | 34 +-
.../apache/juneau/xml/annotation/XmlConfig.java | 1 +
.../juneau/xml/annotation/XmlConfigApply.java | 1 +
.../juneau/xmlschema/XmlSchemaDocSerializer.java | 1 +
.../xmlschema/XmlSchemaDocSerializerSession.java | 1 +
.../juneau/xmlschema/XmlSchemaSerializer.java | 1 +
.../xmlschema/XmlSchemaSerializerBuilder.java | 1 +
.../xmlschema/XmlSchemaSerializerSession.java | 8 +-
juneau-doc/docs/ReleaseNotes/8.1.4.html | 5 +
juneau-doc/src/main/javadoc/overview.html | 87 +++-
juneau-doc/src/main/javadoc/resources/docs.txt | 1 +
.../src/main/javadoc/resources/fragments/toc.html | 1 +
.../org/apache/juneau/examples/rest/TestUtils.java | 75 ---
.../apache/juneau/rest/jaxrs/BasicProvider.java | 1 +
.../org/apache/juneau/rest/BasicRestConfig.java | 1 +
.../org/apache/juneau/rest/BasicRestServlet.java | 5 -
.../java/org/apache/juneau/rest/RestContext.java | 52 +-
34 files changed, 786 insertions(+), 366 deletions(-)
diff --git a/TODO.txt b/TODO.txt
index 3a80929..45e4b45 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -40,4 +40,36 @@ TODO @Beanp(*) isn't working?
@Beanp(name="*")
public Map<String,Integer> perPartition = new TreeMap<>();
-TODO: Need a SimpleLink(name, uri) again.
\ No newline at end of file
+TODO: Need a SimpleLink(name, uri) again.
+
+TODO: RestClient should support all languages by default.
+
+TODO: HTML elements need constructors or create methods.
+
+TODO: Can't serialize a list of A elements correctly.
+
+TODO: Need ability to have <aside> float left/right/top/bottom around contents.
+
+TODO: Need ability to define action for unauthorized requests (e.g. redirect instead of just return 401).
+
+TODO: @RestMethod(debug="true") doesn't appear to log messages.
+
+TODO: @Bean on private class should be treated as bean.
+
+TODO: HtmlRender should not require no-arg constructor.
+
+TODO: Tables of this aren't ordered correctly if p is null on first row.
+@Bean(bpi="i,p,s,d")
+public class BidData {
+
+ public String i; // Instance name.
+ public Integer p; // Partition number.
+ public Score s; // Score.
+ public String d; // Discard reason.
+
+ public BidData(Bid b) {
+ this.s = b.getScore();
+
+REST classes should allow themselves to implement helper classes such as call hander etc...
+
+TODO: ResourceDescriptions needs an append(url, label, description) so you can add params on url.
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripTest.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripTest.java
index efa111c..8ae7a46 100755
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripTest.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripTest.java
@@ -29,7 +29,6 @@ import org.apache.juneau.testutils.*;
import org.apache.juneau.uon.*;
import org.apache.juneau.urlencoding.*;
import org.apache.juneau.xml.*;
-import org.apache.juneau.xmlschema.XmlSchemaSerializer;
import org.junit.runner.*;
import org.junit.runners.*;
@@ -177,12 +176,6 @@ public abstract class RoundTripTest {
null,
RETURN_ORIGINAL_OBJECT
},
- { /* 21 */
- "Xml schema",
- XmlSchemaSerializer.create().trimNullProperties(false).addBeanTypes().addRootType(),
- XmlValidatorParser.create(),
- RETURN_ORIGINAL_OBJECT | CHECK_XML_WHITESPACE
- },
});
}
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/dto/html5/Html5ComboTest.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/dto/html5/Html5ComboTest.java
index 2a3af7d..9027ad9 100755
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/dto/html5/Html5ComboTest.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/dto/html5/Html5ComboTest.java
@@ -14,10 +14,12 @@ package org.apache.juneau.dto.html5;
import static org.apache.juneau.dto.html5.HtmlBuilder.*;
import static org.apache.juneau.testutils.TestUtils.*;
+import static org.junit.Assert.assertEquals;
import java.util.*;
import org.apache.juneau.*;
+import org.apache.juneau.utils.*;
import org.junit.runner.*;
import org.junit.runners.*;
@@ -35,7 +37,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
return Arrays.asList(new Object[][] {
{ /* 0 */
new ComboInput<A>(
- "A-1",
+ "A",
A.class,
a("http://foo", "bar"),
/* Json */ "{_type:'a',a:{href:'http://foo'},c:['bar']}",
@@ -68,6 +70,321 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
},
{ /* 1 */
+ new ComboInput<A[]>(
+ "A[]",
+ A[].class,
+ new A[]{a("http://foo", "bar"),a("http://baz", "qux")},
+ /* Json */ "[{_type:'a',a:{href:'http://foo'},c:['bar']},{_type:'a',a:{href:'http://baz'},c:['qux']}]",
+ /* JsonT */ "[{t:'a',a:{href:'http://foo'},c:['bar']},{t:'a',a:{href:'http://baz'},c:['qux']}]",
+ /* JsonR */ "[\n\t{\n\t\t_type: 'a',\n\t\ta: {\n\t\t\thref: 'http://foo'\n\t\t},\n\t\tc: [\n\t\t\t'bar'\n\t\t]\n\t},\n\t{\n\t\t_type: 'a',\n\t\ta: {\n\t\t\thref: 'http://baz'\n\t\t},\n\t\tc: [\n\t\t\t'qux'\n\t\t]\n\t}\n]",
+ /* Xml */ "<array><a href='http://foo'>bar</a><a href='http://baz'>qux</a></array>",
+ /* XmlT */ "<array><a href='http://foo'>bar</a><a href='http://baz'>qux</a></array>",
+ /* XmlR */ "<array>\n\t<a href='http://foo'>bar</a>\n\t<a href='http://baz'>qux</a>\n</array>\n",
+ /* XmlNs */ "<array><a href='http://foo'>bar</a><a href='http://baz'>qux</a></array>",
+ /* Html */ "<ul><li><a href='http://foo'>bar</a></li><li><a href='http://baz'>qux</a></li></ul>",
+ /* HtmlT */ "<ul><li><a href='http://foo'>bar</a></li><li><a href='http://baz'>qux</a></li></ul>",
+ /* HtmlR */ "<ul>\n\t<li>\n\t\t<a href='http://foo'>bar</a>\n\t</li>\n\t<li>\n\t\t<a href='http://baz'>qux</a>\n\t</li>\n</ul>\n",
+ /* Uon */ "@((_type=a,a=(href=http://foo),c=@(bar)),(_type=a,a=(href=http://baz),c=@(qux)))",
+ /* UonT */ "@((t=a,a=(href=http://foo),c=@(bar)),(t=a,a=(href=http://baz),c=@(qux)))",
+ /* UonR */ "@(\n\t(\n\t\t_type=a,\n\t\ta=(\n\t\t\thref=http://foo\n\t\t),\n\t\tc=@(\n\t\t\tbar\n\t\t)\n\t),\n\t(\n\t\t_type=a,\n\t\ta=(\n\t\t\thref=http://baz\n\t\t),\n\t\tc=@(\n\t\t\tqux\n\t\t)\n\t)\n)",
+ /* UrlEnc */ "0=(_type=a,a=(href=http://foo),c=@(bar))&1=(_type=a,a=(href=http://baz),c=@(qux))",
+ /* UrlEncT */ "0=(t=a,a=(href=http://foo),c=@(bar))&1=(t=a,a=(href=http://baz),c=@(qux))",
+ /* UrlEncR */ "0=(\n\t_type=a,\n\ta=(\n\t\thref=http://foo\n\t),\n\tc=@(\n\t\tbar\n\t)\n)\n&1=(\n\t_type=a,\n\ta=(\n\t\thref=http://baz\n\t),\n\tc=@(\n\t\tqux\n\t)\n)",
+ /* MsgPack */ "9283A55F74797065A161A16181A468726566AA687474703A2F2F666F6FA16391A362617283A55F74797065A161A16181A468726566AA687474703A2F2F62617AA16391A3717578",
+ /* MsgPackT */ "9283A174A161A16181A468726566AA687474703A2F2F666F6FA16391A362617283A174A161A16181A468726566AA687474703A2F2F62617AA16391A3717578",
+ /* RdfXml */ "<rdf:RDF>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:_type>a</jp:_type>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://foo'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>bar</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:_type>a</jp:_type>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://baz'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>qux</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n</rdf:Seq>\n</rdf:RDF>\n",
+ /* RdfXmlT */ "<rdf:RDF>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:t>a</jp:t>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://foo'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>bar</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:t>a</jp:t>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://baz'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>qux</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n</rdf:Seq>\n</rdf:RDF>\n",
+ /* RdfXmlR */ "<rdf:RDF>\n <rdf:Seq>\n <rdf:li rdf:parseType='Resource'>\n <jp:_type>a</jp:_type>\n <jp:a rdf:parseType='Resource'>\n <jp:href rdf:resource='http://foo'/>\n </jp:a>\n <jp:c>\n <rdf:Seq>\n <rdf:li>bar</rdf:li>\n </rdf:Seq>\n </jp:c>\n </rdf:li>\n <rdf:li rdf:parseType='Resource'>\n <jp:_type>a</jp:_type>\n <jp:a rdf:parseType='Resource'>\n <jp:href rdf:resource='http://baz'/>\n </jp [...]
+ )
+ {
+ @Override
+ public void verify(A[] o) {
+ assertInstanceOf(A[].class, o);
+ assertEquals(2, o.length);
+ }
+ }
+ },
+ { /* 2 */
+ new ComboInput<List<A>>(
+ "List<A>",
+ getType(List.class, A.class),
+ AList.<A>create(a("http://foo", "bar"),a("http://baz", "qux")),
+ /* Json */ "[{_type:'a',a:{href:'http://foo'},c:['bar']},{_type:'a',a:{href:'http://baz'},c:['qux']}]",
+ /* JsonT */ "[{t:'a',a:{href:'http://foo'},c:['bar']},{t:'a',a:{href:'http://baz'},c:['qux']}]",
+ /* JsonR */ "[\n\t{\n\t\t_type: 'a',\n\t\ta: {\n\t\t\thref: 'http://foo'\n\t\t},\n\t\tc: [\n\t\t\t'bar'\n\t\t]\n\t},\n\t{\n\t\t_type: 'a',\n\t\ta: {\n\t\t\thref: 'http://baz'\n\t\t},\n\t\tc: [\n\t\t\t'qux'\n\t\t]\n\t}\n]",
+ /* Xml */ "<array><a href='http://foo'>bar</a><a href='http://baz'>qux</a></array>",
+ /* XmlT */ "<array><a href='http://foo'>bar</a><a href='http://baz'>qux</a></array>",
+ /* XmlR */ "<array>\n\t<a href='http://foo'>bar</a>\n\t<a href='http://baz'>qux</a>\n</array>\n",
+ /* XmlNs */ "<array><a href='http://foo'>bar</a><a href='http://baz'>qux</a></array>",
+ /* Html */ "<ul><li><a href='http://foo'>bar</a></li><li><a href='http://baz'>qux</a></li></ul>",
+ /* HtmlT */ "<ul><li><a href='http://foo'>bar</a></li><li><a href='http://baz'>qux</a></li></ul>",
+ /* HtmlR */ "<ul>\n\t<li>\n\t\t<a href='http://foo'>bar</a>\n\t</li>\n\t<li>\n\t\t<a href='http://baz'>qux</a>\n\t</li>\n</ul>\n",
+ /* Uon */ "@((_type=a,a=(href=http://foo),c=@(bar)),(_type=a,a=(href=http://baz),c=@(qux)))",
+ /* UonT */ "@((t=a,a=(href=http://foo),c=@(bar)),(t=a,a=(href=http://baz),c=@(qux)))",
+ /* UonR */ "@(\n\t(\n\t\t_type=a,\n\t\ta=(\n\t\t\thref=http://foo\n\t\t),\n\t\tc=@(\n\t\t\tbar\n\t\t)\n\t),\n\t(\n\t\t_type=a,\n\t\ta=(\n\t\t\thref=http://baz\n\t\t),\n\t\tc=@(\n\t\t\tqux\n\t\t)\n\t)\n)",
+ /* UrlEnc */ "0=(_type=a,a=(href=http://foo),c=@(bar))&1=(_type=a,a=(href=http://baz),c=@(qux))",
+ /* UrlEncT */ "0=(t=a,a=(href=http://foo),c=@(bar))&1=(t=a,a=(href=http://baz),c=@(qux))",
+ /* UrlEncR */ "0=(\n\t_type=a,\n\ta=(\n\t\thref=http://foo\n\t),\n\tc=@(\n\t\tbar\n\t)\n)\n&1=(\n\t_type=a,\n\ta=(\n\t\thref=http://baz\n\t),\n\tc=@(\n\t\tqux\n\t)\n)",
+ /* MsgPack */ "9283A55F74797065A161A16181A468726566AA687474703A2F2F666F6FA16391A362617283A55F74797065A161A16181A468726566AA687474703A2F2F62617AA16391A3717578",
+ /* MsgPackT */ "9283A174A161A16181A468726566AA687474703A2F2F666F6FA16391A362617283A174A161A16181A468726566AA687474703A2F2F62617AA16391A3717578",
+ /* RdfXml */ "<rdf:RDF>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:_type>a</jp:_type>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://foo'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>bar</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:_type>a</jp:_type>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://baz'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>qux</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n</rdf:Seq>\n</rdf:RDF>\n",
+ /* RdfXmlT */ "<rdf:RDF>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:t>a</jp:t>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://foo'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>bar</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:t>a</jp:t>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://baz'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>qux</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n</rdf:Seq>\n</rdf:RDF>\n",
+ /* RdfXmlR */ "<rdf:RDF>\n <rdf:Seq>\n <rdf:li rdf:parseType='Resource'>\n <jp:_type>a</jp:_type>\n <jp:a rdf:parseType='Resource'>\n <jp:href rdf:resource='http://foo'/>\n </jp:a>\n <jp:c>\n <rdf:Seq>\n <rdf:li>bar</rdf:li>\n </rdf:Seq>\n </jp:c>\n </rdf:li>\n <rdf:li rdf:parseType='Resource'>\n <jp:_type>a</jp:_type>\n <jp:a rdf:parseType='Resource'>\n <jp:href rdf:resource='http://baz'/>\n </jp [...]
+ )
+ {
+ @Override
+ public void verify(List<A> o) {
+ assertEquals(2, o.size());
+ assertInstanceOf(A.class, o.get(0));
+ assertInstanceOf(A.class, o.get(1));
+ }
+ }
+ },
+ { /* 3 */
+ new ComboInput<A[][]>(
+ "A[][]",
+ A[][].class,
+ new A[][]{{a("http://a", "b"),a("http://c", "d")},{},{a("http://e", "f")}},
+ /* Json */ "[[{_type:'a',a:{href:'http://a'},c:['b']},{_type:'a',a:{href:'http://c'},c:['d']}],[],[{_type:'a',a:{href:'http://e'},c:['f']}]]",
+ /* JsonT */ "[[{t:'a',a:{href:'http://a'},c:['b']},{t:'a',a:{href:'http://c'},c:['d']}],[],[{t:'a',a:{href:'http://e'},c:['f']}]]",
+ /* JsonR */ "[\n\t[\n\t\t{\n\t\t\t_type: 'a',\n\t\t\ta: {\n\t\t\t\thref: 'http://a'\n\t\t\t},\n\t\t\tc: [\n\t\t\t\t'b'\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t_type: 'a',\n\t\t\ta: {\n\t\t\t\thref: 'http://c'\n\t\t\t},\n\t\t\tc: [\n\t\t\t\t'd'\n\t\t\t]\n\t\t}\n\t],\n\t[\n\t],\n\t[\n\t\t{\n\t\t\t_type: 'a',\n\t\t\ta: {\n\t\t\t\thref: 'http://e'\n\t\t\t},\n\t\t\tc: [\n\t\t\t\t'f'\n\t\t\t]\n\t\t}\n\t]\n]",
+ /* Xml */ "<array><array><a href='http://a'>b</a><a href='http://c'>d</a></array><array></array><array><a href='http://e'>f</a></array></array>",
+ /* XmlT */ "<array><array><a href='http://a'>b</a><a href='http://c'>d</a></array><array></array><array><a href='http://e'>f</a></array></array>",
+ /* XmlR */ "<array>\n\t<array>\n\t\t<a href='http://a'>b</a>\n\t\t<a href='http://c'>d</a>\n\t</array>\n\t<array>\n\t</array>\n\t<array>\n\t\t<a href='http://e'>f</a>\n\t</array>\n</array>\n",
+ /* XmlNs */ "<array><array><a href='http://a'>b</a><a href='http://c'>d</a></array><array></array><array><a href='http://e'>f</a></array></array>",
+ /* Html */ "<ul><li><ul><li><a href='http://a'>b</a></li><li><a href='http://c'>d</a></li></ul></li><li><ul></ul></li><li><ul><li><a href='http://e'>f</a></li></ul></li></ul>",
+ /* HtmlT */ "<ul><li><ul><li><a href='http://a'>b</a></li><li><a href='http://c'>d</a></li></ul></li><li><ul></ul></li><li><ul><li><a href='http://e'>f</a></li></ul></li></ul>",
+ /* HtmlR */ "<ul>\n\t<li>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href='http://a'>b</a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href='http://c'>d</a>\n\t\t\t</li>\n\t\t</ul>\n\t</li>\n\t<li>\n\t\t<ul></ul>\n\t</li>\n\t<li>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href='http://e'>f</a>\n\t\t\t</li>\n\t\t</ul>\n\t</li>\n</ul>\n",
+ /* Uon */ "@(@((_type=a,a=(href=http://a),c=@(b)),(_type=a,a=(href=http://c),c=@(d))),@(),@((_type=a,a=(href=http://e),c=@(f))))",
+ /* UonT */ "@(@((t=a,a=(href=http://a),c=@(b)),(t=a,a=(href=http://c),c=@(d))),@(),@((t=a,a=(href=http://e),c=@(f))))",
+ /* UonR */ "@(\n\t@(\n\t\t(\n\t\t\t_type=a,\n\t\t\ta=(\n\t\t\t\thref=http://a\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tb\n\t\t\t)\n\t\t),\n\t\t(\n\t\t\t_type=a,\n\t\t\ta=(\n\t\t\t\thref=http://c\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\td\n\t\t\t)\n\t\t)\n\t),\n\t@(),\n\t@(\n\t\t(\n\t\t\t_type=a,\n\t\t\ta=(\n\t\t\t\thref=http://e\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tf\n\t\t\t)\n\t\t)\n\t)\n)",
+ /* UrlEnc */ "0=@((_type=a,a=(href=http://a),c=@(b)),(_type=a,a=(href=http://c),c=@(d)))&1=@()&2=@((_type=a,a=(href=http://e),c=@(f)))",
+ /* UrlEncT */ "0=@((t=a,a=(href=http://a),c=@(b)),(t=a,a=(href=http://c),c=@(d)))&1=@()&2=@((t=a,a=(href=http://e),c=@(f)))",
+ /* UrlEncR */ "0=@(\n\t(\n\t\t_type=a,\n\t\ta=(\n\t\t\thref=http://a\n\t\t),\n\t\tc=@(\n\t\t\tb\n\t\t)\n\t),\n\t(\n\t\t_type=a,\n\t\ta=(\n\t\t\thref=http://c\n\t\t),\n\t\tc=@(\n\t\t\td\n\t\t)\n\t)\n)\n&1=@()\n&2=@(\n\t(\n\t\t_type=a,\n\t\ta=(\n\t\t\thref=http://e\n\t\t),\n\t\tc=@(\n\t\t\tf\n\t\t)\n\t)\n)",
+ /* MsgPack */ "939283A55F74797065A161A16181A468726566A8687474703A2F2F61A16391A16283A55F74797065A161A16181A468726566A8687474703A2F2F63A16391A164909183A55F74797065A161A16181A468726566A8687474703A2F2F65A16391A166",
+ /* MsgPackT */ "939283A174A161A16181A468726566A8687474703A2F2F61A16391A16283A174A161A16181A468726566A8687474703A2F2F63A16391A164909183A174A161A16181A468726566A8687474703A2F2F65A16391A166",
+ /* RdfXml */ "<rdf:RDF>\n<rdf:Seq>\n<rdf:li>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:_type>a</jp:_type>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://a'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>b</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:_type>a</jp:_type>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://c'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>d</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n</rdf:Seq>\n</ [...]
+ /* RdfXmlT */ "<rdf:RDF>\n<rdf:Seq>\n<rdf:li>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:t>a</jp:t>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://a'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>b</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:t>a</jp:t>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://c'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>d</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n</rdf:Seq>\n</rdf:li>\n<rdf:l [...]
+ /* RdfXmlR */ "<rdf:RDF>\n <rdf:Seq>\n <rdf:li>\n <rdf:Seq>\n <rdf:li rdf:parseType='Resource'>\n <jp:_type>a</jp:_type>\n <jp:a rdf:parseType='Resource'>\n <jp:href rdf:resource='http://a'/>\n </jp:a>\n <jp:c>\n <rdf:Seq>\n <rdf:li>b</rdf:li>\n </rdf:Seq>\n </jp:c>\n </rdf:li>\n <rdf:li rdf:parseType='Resource'>\n <jp:_type>a</jp:_type>\n <jp:a [...]
+ )
+ {
+ @Override
+ public void verify(A[][] o) {
+ assertInstanceOf(A[][].class, o);
+ assertEquals(3, o.length);
+ assertEquals(2, o[0].length);
+ assertEquals(0, o[1].length);
+ assertEquals(1, o[2].length);
+ }
+ }
+ },
+ { /* 4 */
+ new ComboInput<List<List<A>>>(
+ "List<List<A>>",
+ getType(List.class, List.class, A.class),
+ AList.<List<A>>create(AList.<A>create(a("http://a", "b"),a("http://c", "d")),AList.<A>create(a("http://e", "f"))),
+ /* Json */ "[[{_type:'a',a:{href:'http://a'},c:['b']},{_type:'a',a:{href:'http://c'},c:['d']}],[{_type:'a',a:{href:'http://e'},c:['f']}]]",
+ /* JsonT */ "[[{t:'a',a:{href:'http://a'},c:['b']},{t:'a',a:{href:'http://c'},c:['d']}],[{t:'a',a:{href:'http://e'},c:['f']}]]",
+ /* JsonR */ "[\n\t[\n\t\t{\n\t\t\t_type: 'a',\n\t\t\ta: {\n\t\t\t\thref: 'http://a'\n\t\t\t},\n\t\t\tc: [\n\t\t\t\t'b'\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t_type: 'a',\n\t\t\ta: {\n\t\t\t\thref: 'http://c'\n\t\t\t},\n\t\t\tc: [\n\t\t\t\t'd'\n\t\t\t]\n\t\t}\n\t],\n\t[\n\t\t{\n\t\t\t_type: 'a',\n\t\t\ta: {\n\t\t\t\thref: 'http://e'\n\t\t\t},\n\t\t\tc: [\n\t\t\t\t'f'\n\t\t\t]\n\t\t}\n\t]\n]",
+ /* Xml */ "<array><array><a href='http://a'>b</a><a href='http://c'>d</a></array><array><a href='http://e'>f</a></array></array>",
+ /* XmlT */ "<array><array><a href='http://a'>b</a><a href='http://c'>d</a></array><array><a href='http://e'>f</a></array></array>",
+ /* XmlR */ "<array>\n\t<array>\n\t\t<a href='http://a'>b</a>\n\t\t<a href='http://c'>d</a>\n\t</array>\n\t<array>\n\t\t<a href='http://e'>f</a>\n\t</array>\n</array>\n",
+ /* XmlNs */ "<array><array><a href='http://a'>b</a><a href='http://c'>d</a></array><array><a href='http://e'>f</a></array></array>",
+ /* Html */ "<ul><li><ul><li><a href='http://a'>b</a></li><li><a href='http://c'>d</a></li></ul></li><li><ul><li><a href='http://e'>f</a></li></ul></li></ul>",
+ /* HtmlT */ "<ul><li><ul><li><a href='http://a'>b</a></li><li><a href='http://c'>d</a></li></ul></li><li><ul><li><a href='http://e'>f</a></li></ul></li></ul>",
+ /* HtmlR */ "<ul>\n\t<li>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href='http://a'>b</a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href='http://c'>d</a>\n\t\t\t</li>\n\t\t</ul>\n\t</li>\n\t<li>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href='http://e'>f</a>\n\t\t\t</li>\n\t\t</ul>\n\t</li>\n</ul>\n",
+ /* Uon */ "@(@((_type=a,a=(href=http://a),c=@(b)),(_type=a,a=(href=http://c),c=@(d))),@((_type=a,a=(href=http://e),c=@(f))))",
+ /* UonT */ "@(@((t=a,a=(href=http://a),c=@(b)),(t=a,a=(href=http://c),c=@(d))),@((t=a,a=(href=http://e),c=@(f))))",
+ /* UonR */ "@(\n\t@(\n\t\t(\n\t\t\t_type=a,\n\t\t\ta=(\n\t\t\t\thref=http://a\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tb\n\t\t\t)\n\t\t),\n\t\t(\n\t\t\t_type=a,\n\t\t\ta=(\n\t\t\t\thref=http://c\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\td\n\t\t\t)\n\t\t)\n\t),\n\t@(\n\t\t(\n\t\t\t_type=a,\n\t\t\ta=(\n\t\t\t\thref=http://e\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tf\n\t\t\t)\n\t\t)\n\t)\n)",
+ /* UrlEnc */ "0=@((_type=a,a=(href=http://a),c=@(b)),(_type=a,a=(href=http://c),c=@(d)))&1=@((_type=a,a=(href=http://e),c=@(f)))",
+ /* UrlEncT */ "0=@((t=a,a=(href=http://a),c=@(b)),(t=a,a=(href=http://c),c=@(d)))&1=@((t=a,a=(href=http://e),c=@(f)))",
+ /* UrlEncR */ "0=@(\n\t(\n\t\t_type=a,\n\t\ta=(\n\t\t\thref=http://a\n\t\t),\n\t\tc=@(\n\t\t\tb\n\t\t)\n\t),\n\t(\n\t\t_type=a,\n\t\ta=(\n\t\t\thref=http://c\n\t\t),\n\t\tc=@(\n\t\t\td\n\t\t)\n\t)\n)\n&1=@(\n\t(\n\t\t_type=a,\n\t\ta=(\n\t\t\thref=http://e\n\t\t),\n\t\tc=@(\n\t\t\tf\n\t\t)\n\t)\n)",
+ /* MsgPack */ "929283A55F74797065A161A16181A468726566A8687474703A2F2F61A16391A16283A55F74797065A161A16181A468726566A8687474703A2F2F63A16391A1649183A55F74797065A161A16181A468726566A8687474703A2F2F65A16391A166",
+ /* MsgPackT */ "929283A174A161A16181A468726566A8687474703A2F2F61A16391A16283A174A161A16181A468726566A8687474703A2F2F63A16391A1649183A174A161A16181A468726566A8687474703A2F2F65A16391A166",
+ /* RdfXml */ "<rdf:RDF>\n<rdf:Seq>\n<rdf:li>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:_type>a</jp:_type>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://a'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>b</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:_type>a</jp:_type>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://c'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>d</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n</rdf:Seq>\n</ [...]
+ /* RdfXmlT */ "<rdf:RDF>\n<rdf:Seq>\n<rdf:li>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:t>a</jp:t>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://a'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>b</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:t>a</jp:t>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://c'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>d</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n</rdf:Seq>\n</rdf:li>\n<rdf:l [...]
+ /* RdfXmlR */ "<rdf:RDF>\n <rdf:Seq>\n <rdf:li>\n <rdf:Seq>\n <rdf:li rdf:parseType='Resource'>\n <jp:_type>a</jp:_type>\n <jp:a rdf:parseType='Resource'>\n <jp:href rdf:resource='http://a'/>\n </jp:a>\n <jp:c>\n <rdf:Seq>\n <rdf:li>b</rdf:li>\n </rdf:Seq>\n </jp:c>\n </rdf:li>\n <rdf:li rdf:parseType='Resource'>\n <jp:_type>a</jp:_type>\n <jp:a [...]
+ )
+ {
+ @Override
+ public void verify(List<List<A>> o) {
+ assertInstanceOf(A.class, o.get(0).get(0));
+ }
+ }
+ },
+ { /* 5 */
+ new ComboInput<java.util.Map<String,A>>(
+ "Map<String,A>",
+ getType(java.util.Map.class, String.class, A.class),
+ AMap.<String,A>create("a", a("http://b", "c")).append("d", a("http://e", "f")),
+ /* Json */ "{a:{_type:'a',a:{href:'http://b'},c:['c']},d:{_type:'a',a:{href:'http://e'},c:['f']}}",
+ /* JsonT */ "{a:{t:'a',a:{href:'http://b'},c:['c']},d:{t:'a',a:{href:'http://e'},c:['f']}}",
+ /* JsonR */ "{\n\ta: {\n\t\t_type: 'a',\n\t\ta: {\n\t\t\thref: 'http://b'\n\t\t},\n\t\tc: [\n\t\t\t'c'\n\t\t]\n\t},\n\td: {\n\t\t_type: 'a',\n\t\ta: {\n\t\t\thref: 'http://e'\n\t\t},\n\t\tc: [\n\t\t\t'f'\n\t\t]\n\t}\n}",
+ /* Xml */ "<object><a href='http://b'>c</a><a _name='d' href='http://e'>f</a></object>",
+ /* XmlT */ "<object><a href='http://b'>c</a><a _name='d' href='http://e'>f</a></object>",
+ /* XmlR */ "<object>\n\t<a href='http://b'>c</a>\n\t<a _name='d' href='http://e'>f</a>\n</object>\n",
+ /* XmlNs */ "<object><a href='http://b'>c</a><a _name='d' href='http://e'>f</a></object>",
+ /* Html */ "<table><tr><td>a</td><td><a href='http://b'>c</a></td></tr><tr><td>d</td><td><a href='http://e'>f</a></td></tr></table>",
+ /* HtmlT */ "<table><tr><td>a</td><td><a href='http://b'>c</a></td></tr><tr><td>d</td><td><a href='http://e'>f</a></td></tr></table>",
+ /* HtmlR */ "<table>\n\t<tr>\n\t\t<td>a</td>\n\t\t<td>\n\t\t\t<a href='http://b'>c</a>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td>d</td>\n\t\t<td>\n\t\t\t<a href='http://e'>f</a>\n\t\t</td>\n\t</tr>\n</table>\n",
+ /* Uon */ "(a=(_type=a,a=(href=http://b),c=@(c)),d=(_type=a,a=(href=http://e),c=@(f)))",
+ /* UonT */ "(a=(t=a,a=(href=http://b),c=@(c)),d=(t=a,a=(href=http://e),c=@(f)))",
+ /* UonR */ "(\n\ta=(\n\t\t_type=a,\n\t\ta=(\n\t\t\thref=http://b\n\t\t),\n\t\tc=@(\n\t\t\tc\n\t\t)\n\t),\n\td=(\n\t\t_type=a,\n\t\ta=(\n\t\t\thref=http://e\n\t\t),\n\t\tc=@(\n\t\t\tf\n\t\t)\n\t)\n)",
+ /* UrlEnc */ "a=(_type=a,a=(href=http://b),c=@(c))&d=(_type=a,a=(href=http://e),c=@(f))",
+ /* UrlEncT */ "a=(t=a,a=(href=http://b),c=@(c))&d=(t=a,a=(href=http://e),c=@(f))",
+ /* UrlEncR */ "a=(\n\t_type=a,\n\ta=(\n\t\thref=http://b\n\t),\n\tc=@(\n\t\tc\n\t)\n)\n&d=(\n\t_type=a,\n\ta=(\n\t\thref=http://e\n\t),\n\tc=@(\n\t\tf\n\t)\n)",
+ /* MsgPack */ "82A16183A55F74797065A161A16181A468726566A8687474703A2F2F62A16391A163A16483A55F74797065A161A16181A468726566A8687474703A2F2F65A16391A166",
+ /* MsgPackT */ "82A16183A174A161A16181A468726566A8687474703A2F2F62A16391A163A16483A174A161A16181A468726566A8687474703A2F2F65A16391A166",
+ /* RdfXml */ "<rdf:RDF>\n<rdf:Description>\n<jp:a rdf:parseType='Resource'>\n<jp:_type>a</jp:_type>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://b'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</jp:a>\n<jp:d rdf:parseType='Resource'>\n<jp:_type>a</jp:_type>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://e'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>f</rdf:li>\n</rdf:Seq>\n</jp:c>\n</jp:d>\n</rdf:Description>\n</rdf:RDF>\n",
+ /* RdfXmlT */ "<rdf:RDF>\n<rdf:Description>\n<jp:a rdf:parseType='Resource'>\n<jp:t>a</jp:t>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://b'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</jp:a>\n<jp:d rdf:parseType='Resource'>\n<jp:t>a</jp:t>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://e'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>f</rdf:li>\n</rdf:Seq>\n</jp:c>\n</jp:d>\n</rdf:Description>\n</rdf:RDF>\n",
+ /* RdfXmlR */ "<rdf:RDF>\n <rdf:Description>\n <jp:a rdf:parseType='Resource'>\n <jp:_type>a</jp:_type>\n <jp:a rdf:parseType='Resource'>\n <jp:href rdf:resource='http://b'/>\n </jp:a>\n <jp:c>\n <rdf:Seq>\n <rdf:li>c</rdf:li>\n </rdf:Seq>\n </jp:c>\n </jp:a>\n <jp:d rdf:parseType='Resource'>\n <jp:_type>a</jp:_type>\n <jp:a rdf:parseType='Resource'>\n <jp:href rdf:resource='http://e'/>\n </jp:a>\ [...]
+ )
+ {
+ @Override
+ public void verify(java.util.Map<String,A> o) {
+ assertInstanceOf(A.class, o.get("a"));
+ assertInstanceOf(A.class, o.get("d"));
+ }
+ }
+ },
+ { /* 6 */
+ new ComboInput<java.util.Map<String,A[][]>>(
+ "Map<String,A[][]>",
+ getType(java.util.Map.class, String.class, A[][].class),
+ AMap.<String,A[][]>create("a", new A[][]{{a("http://b", "c"),a("http://d", "e")},{}}).append("f", new A[][]{{a("http://g", "h")}}),
+ /* Json */ "{a:[[{_type:'a',a:{href:'http://b'},c:['c']},{_type:'a',a:{href:'http://d'},c:['e']}],[]],f:[[{_type:'a',a:{href:'http://g'},c:['h']}]]}",
+ /* JsonT */ "{a:[[{t:'a',a:{href:'http://b'},c:['c']},{t:'a',a:{href:'http://d'},c:['e']}],[]],f:[[{t:'a',a:{href:'http://g'},c:['h']}]]}",
+ /* JsonR */ "{\n\ta: [\n\t\t[\n\t\t\t{\n\t\t\t\t_type: 'a',\n\t\t\t\ta: {\n\t\t\t\t\thref: 'http://b'\n\t\t\t\t},\n\t\t\t\tc: [\n\t\t\t\t\t'c'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t_type: 'a',\n\t\t\t\ta: {\n\t\t\t\t\thref: 'http://d'\n\t\t\t\t},\n\t\t\t\tc: [\n\t\t\t\t\t'e'\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t[\n\t\t]\n\t],\n\tf: [\n\t\t[\n\t\t\t{\n\t\t\t\t_type: 'a',\n\t\t\t\ta: {\n\t\t\t\t\thref: 'http://g'\n\t\t\t\t},\n\t\t\t\tc: [\n\t\t\t\t\t'h'\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t]\n}",
+ /* Xml */ "<object><a _type='array'><array><a href='http://b'>c</a><a href='http://d'>e</a></array><array></array></a><f _type='array'><array><a href='http://g'>h</a></array></f></object>",
+ /* XmlT */ "<object><a t='array'><array><a href='http://b'>c</a><a href='http://d'>e</a></array><array></array></a><f t='array'><array><a href='http://g'>h</a></array></f></object>",
+ /* XmlR */ "<object>\n\t<a _type='array'>\n\t\t<array>\n\t\t\t<a href='http://b'>c</a>\n\t\t\t<a href='http://d'>e</a>\n\t\t</array>\n\t\t<array>\n\t\t</array>\n\t</a>\n\t<f _type='array'>\n\t\t<array>\n\t\t\t<a href='http://g'>h</a>\n\t\t</array>\n\t</f>\n</object>\n",
+ /* XmlNs */ "<object><a _type='array'><array><a href='http://b'>c</a><a href='http://d'>e</a></array><array></array></a><f _type='array'><array><a href='http://g'>h</a></array></f></object>",
+ /* Html */ "<table><tr><td>a</td><td><ul><li><ul><li><a href='http://b'>c</a></li><li><a href='http://d'>e</a></li></ul></li><li><ul></ul></li></ul></td></tr><tr><td>f</td><td><ul><li><ul><li><a href='http://g'>h</a></li></ul></li></ul></td></tr></table>",
+ /* HtmlT */ "<table><tr><td>a</td><td><ul><li><ul><li><a href='http://b'>c</a></li><li><a href='http://d'>e</a></li></ul></li><li><ul></ul></li></ul></td></tr><tr><td>f</td><td><ul><li><ul><li><a href='http://g'>h</a></li></ul></li></ul></td></tr></table>",
+ /* HtmlR */ "<table>\n\t<tr>\n\t\t<td>a</td>\n\t\t<td>\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a href='http://b'>c</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a href='http://d'>e</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<ul></ul>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td>f</td>\n\t\t<td>\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a href='ht [...]
+ /* Uon */ "(a=@(@((_type=a,a=(href=http://b),c=@(c)),(_type=a,a=(href=http://d),c=@(e))),@()),f=@(@((_type=a,a=(href=http://g),c=@(h)))))",
+ /* UonT */ "(a=@(@((t=a,a=(href=http://b),c=@(c)),(t=a,a=(href=http://d),c=@(e))),@()),f=@(@((t=a,a=(href=http://g),c=@(h)))))",
+ /* UonR */ "(\n\ta=@(\n\t\t@(\n\t\t\t(\n\t\t\t\t_type=a,\n\t\t\t\ta=(\n\t\t\t\t\thref=http://b\n\t\t\t\t),\n\t\t\t\tc=@(\n\t\t\t\t\tc\n\t\t\t\t)\n\t\t\t),\n\t\t\t(\n\t\t\t\t_type=a,\n\t\t\t\ta=(\n\t\t\t\t\thref=http://d\n\t\t\t\t),\n\t\t\t\tc=@(\n\t\t\t\t\te\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\t@()\n\t),\n\tf=@(\n\t\t@(\n\t\t\t(\n\t\t\t\t_type=a,\n\t\t\t\ta=(\n\t\t\t\t\thref=http://g\n\t\t\t\t),\n\t\t\t\tc=@(\n\t\t\t\t\th\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t)\n)",
+ /* UrlEnc */ "a=@(@((_type=a,a=(href=http://b),c=@(c)),(_type=a,a=(href=http://d),c=@(e))),@())&f=@(@((_type=a,a=(href=http://g),c=@(h))))",
+ /* UrlEncT */ "a=@(@((t=a,a=(href=http://b),c=@(c)),(t=a,a=(href=http://d),c=@(e))),@())&f=@(@((t=a,a=(href=http://g),c=@(h))))",
+ /* UrlEncR */ "a=@(\n\t@(\n\t\t(\n\t\t\t_type=a,\n\t\t\ta=(\n\t\t\t\thref=http://b\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tc\n\t\t\t)\n\t\t),\n\t\t(\n\t\t\t_type=a,\n\t\t\ta=(\n\t\t\t\thref=http://d\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\te\n\t\t\t)\n\t\t)\n\t),\n\t@()\n)\n&f=@(\n\t@(\n\t\t(\n\t\t\t_type=a,\n\t\t\ta=(\n\t\t\t\thref=http://g\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\th\n\t\t\t)\n\t\t)\n\t)\n)",
+ /* MsgPack */ "82A161929283A55F74797065A161A16181A468726566A8687474703A2F2F62A16391A16383A55F74797065A161A16181A468726566A8687474703A2F2F64A16391A16590A166919183A55F74797065A161A16181A468726566A8687474703A2F2F67A16391A168",
+ /* MsgPackT */ "82A161929283A174A161A16181A468726566A8687474703A2F2F62A16391A16383A174A161A16181A468726566A8687474703A2F2F64A16391A16590A166919183A174A161A16181A468726566A8687474703A2F2F67A16391A168",
+ /* RdfXml */ "<rdf:RDF>\n<rdf:Description>\n<jp:a>\n<rdf:Seq>\n<rdf:li>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:_type>a</jp:_type>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://b'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:_type>a</jp:_type>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://d'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>e</rdf:li>\n</rdf:Seq>\n</jp:c> [...]
+ /* RdfXmlT */ "<rdf:RDF>\n<rdf:Description>\n<jp:a>\n<rdf:Seq>\n<rdf:li>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:t>a</jp:t>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://b'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:t>a</jp:t>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://d'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>e</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n</ [...]
+ /* RdfXmlR */ "<rdf:RDF>\n <rdf:Description>\n <jp:a>\n <rdf:Seq>\n <rdf:li>\n <rdf:Seq>\n <rdf:li rdf:parseType='Resource'>\n <jp:_type>a</jp:_type>\n <jp:a rdf:parseType='Resource'>\n <jp:href rdf:resource='http://b'/>\n </jp:a>\n <jp:c>\n <rdf:Seq>\n <rdf:li>c</rdf:li>\n </rdf:Seq>\n </jp:c>\n </rdf:li>\n [...]
+ )
+ {
+ @Override
+ public void verify(java.util.Map<String,A[][]> o) {
+ assertInstanceOf(A.class, o.get("a")[0][0]);
+ assertInstanceOf(A.class, o.get("f")[0][0]);
+ }
+ }
+ },
+ { /* 7 */
+ new ComboInput<BeanWithAField>(
+ "BeanWithAField",
+ BeanWithAField.class,
+ BeanWithAField.create(a("http://b", "c")),
+ /* Json */ "{f1:{a:{href:'http://b'},c:['c']},f2:[{a:{href:'http://b'},c:['c']},{a:{href:'http://b'},c:['c']}],f3:[{a:{href:'http://b'},c:['c']},{a:{href:'http://b'},c:['c']}]}",
+ /* JsonT */ "{f1:{a:{href:'http://b'},c:['c']},f2:[{a:{href:'http://b'},c:['c']},{a:{href:'http://b'},c:['c']}],f3:[{a:{href:'http://b'},c:['c']},{a:{href:'http://b'},c:['c']}]}",
+ /* JsonR */ "{\n\tf1: {\n\t\ta: {\n\t\t\thref: 'http://b'\n\t\t},\n\t\tc: [\n\t\t\t'c'\n\t\t]\n\t},\n\tf2: [\n\t\t{\n\t\t\ta: {\n\t\t\t\thref: 'http://b'\n\t\t\t},\n\t\t\tc: [\n\t\t\t\t'c'\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\ta: {\n\t\t\t\thref: 'http://b'\n\t\t\t},\n\t\t\tc: [\n\t\t\t\t'c'\n\t\t\t]\n\t\t}\n\t],\n\tf3: [\n\t\t{\n\t\t\ta: {\n\t\t\t\thref: 'http://b'\n\t\t\t},\n\t\t\tc: [\n\t\t\t\t'c'\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\ta: {\n\t\t\t\thref: 'http://b'\n\t\t\t},\n\t\t\tc: [\n\t\t [...]
+ /* Xml */ "<object><a _name='f1' href='http://b'>c</a><f2><a href='http://b'>c</a><a href='http://b'>c</a></f2><f3><a href='http://b'>c</a><a href='http://b'>c</a></f3></object>",
+ /* XmlT */ "<object><a _name='f1' href='http://b'>c</a><f2><a href='http://b'>c</a><a href='http://b'>c</a></f2><f3><a href='http://b'>c</a><a href='http://b'>c</a></f3></object>",
+ /* XmlR */ "<object>\n\t<a _name='f1' href='http://b'>c</a>\n\t<f2>\n\t\t<a href='http://b'>c</a>\n\t\t<a href='http://b'>c</a>\n\t</f2>\n\t<f3>\n\t\t<a href='http://b'>c</a>\n\t\t<a href='http://b'>c</a>\n\t</f3>\n</object>\n",
+ /* XmlNs */ "<object><a _name='f1' href='http://b'>c</a><f2><a href='http://b'>c</a><a href='http://b'>c</a></f2><f3><a href='http://b'>c</a><a href='http://b'>c</a></f3></object>",
+ /* Html */ "<table><tr><td>f1</td><td><a href='http://b'>c</a></td></tr><tr><td>f2</td><td><ul><li><a href='http://b'>c</a></li><li><a href='http://b'>c</a></li></ul></td></tr><tr><td>f3</td><td><ul><li><a href='http://b'>c</a></li><li><a href='http://b'>c</a></li></ul></td></tr></table>",
+ /* HtmlT */ "<table><tr><td>f1</td><td><a href='http://b'>c</a></td></tr><tr><td>f2</td><td><ul><li><a href='http://b'>c</a></li><li><a href='http://b'>c</a></li></ul></td></tr><tr><td>f3</td><td><ul><li><a href='http://b'>c</a></li><li><a href='http://b'>c</a></li></ul></td></tr></table>",
+ /* HtmlR */ "<table>\n\t<tr>\n\t\t<td>f1</td>\n\t\t<td>\n\t\t\t<a href='http://b'>c</a>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td>f2</td>\n\t\t<td>\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='http://b'>c</a>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='http://b'>c</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td>f3</td>\n\t\t<td>\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='http://b'>c</a>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='http://b'>c</a>\n\t\t\ [...]
+ /* Uon */ "(f1=(a=(href=http://b),c=@(c)),f2=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c))),f3=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c))))",
+ /* UonT */ "(f1=(a=(href=http://b),c=@(c)),f2=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c))),f3=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c))))",
+ /* UonR */ "(\n\tf1=(\n\t\ta=(\n\t\t\thref=http://b\n\t\t),\n\t\tc=@(\n\t\t\tc\n\t\t)\n\t),\n\tf2=@(\n\t\t(\n\t\t\ta=(\n\t\t\t\thref=http://b\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tc\n\t\t\t)\n\t\t),\n\t\t(\n\t\t\ta=(\n\t\t\t\thref=http://b\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tc\n\t\t\t)\n\t\t)\n\t),\n\tf3=@(\n\t\t(\n\t\t\ta=(\n\t\t\t\thref=http://b\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tc\n\t\t\t)\n\t\t),\n\t\t(\n\t\t\ta=(\n\t\t\t\thref=http://b\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tc\n\t\t\t)\n\t\t)\n\t)\n)",
+ /* UrlEnc */ "f1=(a=(href=http://b),c=@(c))&f2=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c)))&f3=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c)))",
+ /* UrlEncT */ "f1=(a=(href=http://b),c=@(c))&f2=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c)))&f3=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c)))",
+ /* UrlEncR */ "f1=(\n\ta=(\n\t\thref=http://b\n\t),\n\tc=@(\n\t\tc\n\t)\n)\n&f2=@(\n\t(\n\t\ta=(\n\t\t\thref=http://b\n\t\t),\n\t\tc=@(\n\t\t\tc\n\t\t)\n\t),\n\t(\n\t\ta=(\n\t\t\thref=http://b\n\t\t),\n\t\tc=@(\n\t\t\tc\n\t\t)\n\t)\n)\n&f3=@(\n\t(\n\t\ta=(\n\t\t\thref=http://b\n\t\t),\n\t\tc=@(\n\t\t\tc\n\t\t)\n\t),\n\t(\n\t\ta=(\n\t\t\thref=http://b\n\t\t),\n\t\tc=@(\n\t\t\tc\n\t\t)\n\t)\n)",
+ /* MsgPack */ "83A2663182A16181A468726566A8687474703A2F2F62A16391A163A266329282A16181A468726566A8687474703A2F2F62A16391A16382A16181A468726566A8687474703A2F2F62A16391A163A266339282A16181A468726566A8687474703A2F2F62A16391A16382A16181A468726566A8687474703A2F2F62A16391A163",
+ /* MsgPackT */ "83A2663182A16181A468726566A8687474703A2F2F62A16391A163A266329282A16181A468726566A8687474703A2F2F62A16391A16382A16181A468726566A8687474703A2F2F62A16391A163A266339282A16181A468726566A8687474703A2F2F62A16391A16382A16181A468726566A8687474703A2F2F62A16391A163",
+ /* RdfXml */ "<rdf:RDF>\n<rdf:Description>\n<jp:f1 rdf:parseType='Resource'>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://b'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</jp:f1>\n<jp:f2>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://b'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:a rdf:parseType='R [...]
+ /* RdfXmlT */ "<rdf:RDF>\n<rdf:Description>\n<jp:f1 rdf:parseType='Resource'>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://b'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</jp:f1>\n<jp:f2>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://b'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:a rdf:parseType=' [...]
+ /* RdfXmlR */ "<rdf:RDF>\n <rdf:Description>\n <jp:f1 rdf:parseType='Resource'>\n <jp:a rdf:parseType='Resource'>\n <jp:href rdf:resource='http://b'/>\n </jp:a>\n <jp:c>\n <rdf:Seq>\n <rdf:li>c</rdf:li>\n </rdf:Seq>\n </jp:c>\n </jp:f1>\n <jp:f2>\n <rdf:Seq>\n <rdf:li rdf:parseType='Resource'>\n <jp:a rdf:parseType='Resource'>\n <jp:href rdf:resource='http://b'/>\n </jp:a>\n [...]
+ )
+ {
+ @Override
+ public void verify(BeanWithAField o) {
+ assertInstanceOf(BeanWithAField.class, o);
+ }
+ }
+ },
+ { /* 8 */
+ new ComboInput<BeanWithAField[]>(
+ "BeanWithAField[]",
+ BeanWithAField[].class,
+ new BeanWithAField[]{BeanWithAField.create(a("http://b", "c"))},
+ /* Json */ "[{f1:{a:{href:'http://b'},c:['c']},f2:[{a:{href:'http://b'},c:['c']},{a:{href:'http://b'},c:['c']}],f3:[{a:{href:'http://b'},c:['c']},{a:{href:'http://b'},c:['c']}]}]",
+ /* JsonT */ "[{f1:{a:{href:'http://b'},c:['c']},f2:[{a:{href:'http://b'},c:['c']},{a:{href:'http://b'},c:['c']}],f3:[{a:{href:'http://b'},c:['c']},{a:{href:'http://b'},c:['c']}]}]",
+ /* JsonR */ "[\n\t{\n\t\tf1: {\n\t\t\ta: {\n\t\t\t\thref: 'http://b'\n\t\t\t},\n\t\t\tc: [\n\t\t\t\t'c'\n\t\t\t]\n\t\t},\n\t\tf2: [\n\t\t\t{\n\t\t\t\ta: {\n\t\t\t\t\thref: 'http://b'\n\t\t\t\t},\n\t\t\t\tc: [\n\t\t\t\t\t'c'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\ta: {\n\t\t\t\t\thref: 'http://b'\n\t\t\t\t},\n\t\t\t\tc: [\n\t\t\t\t\t'c'\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\tf3: [\n\t\t\t{\n\t\t\t\ta: {\n\t\t\t\t\thref: 'http://b'\n\t\t\t\t},\n\t\t\t\tc: [\n\t\t\t\t\t'c'\n\t\t\t\t]\n\t\t\t [...]
+ /* Xml */ "<array><object><a _name='f1' href='http://b'>c</a><f2><a href='http://b'>c</a><a href='http://b'>c</a></f2><f3><a href='http://b'>c</a><a href='http://b'>c</a></f3></object></array>",
+ /* XmlT */ "<array><object><a _name='f1' href='http://b'>c</a><f2><a href='http://b'>c</a><a href='http://b'>c</a></f2><f3><a href='http://b'>c</a><a href='http://b'>c</a></f3></object></array>",
+ /* XmlR */ "<array>\n\t<object>\n\t\t<a _name='f1' href='http://b'>c</a>\n\t\t<f2>\n\t\t\t<a href='http://b'>c</a>\n\t\t\t<a href='http://b'>c</a>\n\t\t</f2>\n\t\t<f3>\n\t\t\t<a href='http://b'>c</a>\n\t\t\t<a href='http://b'>c</a>\n\t\t</f3>\n\t</object>\n</array>\n",
+ /* XmlNs */ "<array><object><a _name='f1' href='http://b'>c</a><f2><a href='http://b'>c</a><a href='http://b'>c</a></f2><f3><a href='http://b'>c</a><a href='http://b'>c</a></f3></object></array>",
+ /* Html */ "<table _type='array'><tr><th>f1</th><th>f2</th><th>f3</th></tr><tr><td><a href='http://b'>c</a></td><td><ul><li><a href='http://b'>c</a></li><li><a href='http://b'>c</a></li></ul></td><td><ul><li><a href='http://b'>c</a></li><li><a href='http://b'>c</a></li></ul></td></tr></table>",
+ /* HtmlT */ "<table t='array'><tr><th>f1</th><th>f2</th><th>f3</th></tr><tr><td><a href='http://b'>c</a></td><td><ul><li><a href='http://b'>c</a></li><li><a href='http://b'>c</a></li></ul></td><td><ul><li><a href='http://b'>c</a></li><li><a href='http://b'>c</a></li></ul></td></tr></table>",
+ /* HtmlR */ "<table _type='array'>\n\t<tr>\n\t\t<th>f1</th>\n\t\t<th>f2</th>\n\t\t<th>f3</th>\n\t</tr>\n\t<tr>\n\t\t<td>\n\t\t\t<a href='http://b'>c</a>\n\t\t</td>\n\t\t<td>\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='http://b'>c</a>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='http://b'>c</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</td>\n\t\t<td>\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='http://b'>c</a>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='http://b'>c</a>\n\t\t\t\t [...]
+ /* Uon */ "@((f1=(a=(href=http://b),c=@(c)),f2=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c))),f3=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c)))))",
+ /* UonT */ "@((f1=(a=(href=http://b),c=@(c)),f2=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c))),f3=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c)))))",
+ /* UonR */ "@(\n\t(\n\t\tf1=(\n\t\t\ta=(\n\t\t\t\thref=http://b\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tc\n\t\t\t)\n\t\t),\n\t\tf2=@(\n\t\t\t(\n\t\t\t\ta=(\n\t\t\t\t\thref=http://b\n\t\t\t\t),\n\t\t\t\tc=@(\n\t\t\t\t\tc\n\t\t\t\t)\n\t\t\t),\n\t\t\t(\n\t\t\t\ta=(\n\t\t\t\t\thref=http://b\n\t\t\t\t),\n\t\t\t\tc=@(\n\t\t\t\t\tc\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\tf3=@(\n\t\t\t(\n\t\t\t\ta=(\n\t\t\t\t\thref=http://b\n\t\t\t\t),\n\t\t\t\tc=@(\n\t\t\t\t\tc\n\t\t\t\t)\n\t\t\t),\n\t\t\t(\n\t\t\t\ta=(\ [...]
+ /* UrlEnc */ "0=(f1=(a=(href=http://b),c=@(c)),f2=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c))),f3=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c))))",
+ /* UrlEncT */ "0=(f1=(a=(href=http://b),c=@(c)),f2=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c))),f3=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c))))",
+ /* UrlEncR */ "0=(\n\tf1=(\n\t\ta=(\n\t\t\thref=http://b\n\t\t),\n\t\tc=@(\n\t\t\tc\n\t\t)\n\t),\n\tf2=@(\n\t\t(\n\t\t\ta=(\n\t\t\t\thref=http://b\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tc\n\t\t\t)\n\t\t),\n\t\t(\n\t\t\ta=(\n\t\t\t\thref=http://b\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tc\n\t\t\t)\n\t\t)\n\t),\n\tf3=@(\n\t\t(\n\t\t\ta=(\n\t\t\t\thref=http://b\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tc\n\t\t\t)\n\t\t),\n\t\t(\n\t\t\ta=(\n\t\t\t\thref=http://b\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tc\n\t\t\t)\n\t\t)\n\t)\n)",
+ /* MsgPack */ "9183A2663182A16181A468726566A8687474703A2F2F62A16391A163A266329282A16181A468726566A8687474703A2F2F62A16391A16382A16181A468726566A8687474703A2F2F62A16391A163A266339282A16181A468726566A8687474703A2F2F62A16391A16382A16181A468726566A8687474703A2F2F62A16391A163",
+ /* MsgPackT */ "9183A2663182A16181A468726566A8687474703A2F2F62A16391A163A266329282A16181A468726566A8687474703A2F2F62A16391A16382A16181A468726566A8687474703A2F2F62A16391A163A266339282A16181A468726566A8687474703A2F2F62A16391A16382A16181A468726566A8687474703A2F2F62A16391A163",
+ /* RdfXml */ "<rdf:RDF>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:f1 rdf:parseType='Resource'>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://b'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</jp:f1>\n<jp:f2>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://b'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resourc [...]
+ /* RdfXmlT */ "<rdf:RDF>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:f1 rdf:parseType='Resource'>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://b'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</jp:f1>\n<jp:f2>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://b'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resour [...]
+ /* RdfXmlR */ "<rdf:RDF>\n <rdf:Seq>\n <rdf:li rdf:parseType='Resource'>\n <jp:f1 rdf:parseType='Resource'>\n <jp:a rdf:parseType='Resource'>\n <jp:href rdf:resource='http://b'/>\n </jp:a>\n <jp:c>\n <rdf:Seq>\n <rdf:li>c</rdf:li>\n </rdf:Seq>\n </jp:c>\n </jp:f1>\n <jp:f2>\n <rdf:Seq>\n <rdf:li rdf:parseType='Resource'>\n <jp:a rdf:parseType='Resource'>\n <jp [...]
+ )
+ {
+ @Override
+ public void verify(BeanWithAField[] o) {
+ assertInstanceOf(BeanWithAField[].class, o);
+ }
+ }
+ },
+ { /* 9 */
+ new ComboInput<List<BeanWithAField>>(
+ "List<BeanWithAField>",
+ getType(List.class, BeanWithAField.class),
+ AList.<BeanWithAField>create(BeanWithAField.create(a("http://b", "c"))),
+ /* Json */ "[{f1:{a:{href:'http://b'},c:['c']},f2:[{a:{href:'http://b'},c:['c']},{a:{href:'http://b'},c:['c']}],f3:[{a:{href:'http://b'},c:['c']},{a:{href:'http://b'},c:['c']}]}]",
+ /* JsonT */ "[{f1:{a:{href:'http://b'},c:['c']},f2:[{a:{href:'http://b'},c:['c']},{a:{href:'http://b'},c:['c']}],f3:[{a:{href:'http://b'},c:['c']},{a:{href:'http://b'},c:['c']}]}]",
+ /* JsonR */ "[\n\t{\n\t\tf1: {\n\t\t\ta: {\n\t\t\t\thref: 'http://b'\n\t\t\t},\n\t\t\tc: [\n\t\t\t\t'c'\n\t\t\t]\n\t\t},\n\t\tf2: [\n\t\t\t{\n\t\t\t\ta: {\n\t\t\t\t\thref: 'http://b'\n\t\t\t\t},\n\t\t\t\tc: [\n\t\t\t\t\t'c'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\ta: {\n\t\t\t\t\thref: 'http://b'\n\t\t\t\t},\n\t\t\t\tc: [\n\t\t\t\t\t'c'\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\tf3: [\n\t\t\t{\n\t\t\t\ta: {\n\t\t\t\t\thref: 'http://b'\n\t\t\t\t},\n\t\t\t\tc: [\n\t\t\t\t\t'c'\n\t\t\t\t]\n\t\t\t [...]
+ /* Xml */ "<array><object><a _name='f1' href='http://b'>c</a><f2><a href='http://b'>c</a><a href='http://b'>c</a></f2><f3><a href='http://b'>c</a><a href='http://b'>c</a></f3></object></array>",
+ /* XmlT */ "<array><object><a _name='f1' href='http://b'>c</a><f2><a href='http://b'>c</a><a href='http://b'>c</a></f2><f3><a href='http://b'>c</a><a href='http://b'>c</a></f3></object></array>",
+ /* XmlR */ "<array>\n\t<object>\n\t\t<a _name='f1' href='http://b'>c</a>\n\t\t<f2>\n\t\t\t<a href='http://b'>c</a>\n\t\t\t<a href='http://b'>c</a>\n\t\t</f2>\n\t\t<f3>\n\t\t\t<a href='http://b'>c</a>\n\t\t\t<a href='http://b'>c</a>\n\t\t</f3>\n\t</object>\n</array>\n",
+ /* XmlNs */ "<array><object><a _name='f1' href='http://b'>c</a><f2><a href='http://b'>c</a><a href='http://b'>c</a></f2><f3><a href='http://b'>c</a><a href='http://b'>c</a></f3></object></array>",
+ /* Html */ "<table _type='array'><tr><th>f1</th><th>f2</th><th>f3</th></tr><tr><td><a href='http://b'>c</a></td><td><ul><li><a href='http://b'>c</a></li><li><a href='http://b'>c</a></li></ul></td><td><ul><li><a href='http://b'>c</a></li><li><a href='http://b'>c</a></li></ul></td></tr></table>",
+ /* HtmlT */ "<table t='array'><tr><th>f1</th><th>f2</th><th>f3</th></tr><tr><td><a href='http://b'>c</a></td><td><ul><li><a href='http://b'>c</a></li><li><a href='http://b'>c</a></li></ul></td><td><ul><li><a href='http://b'>c</a></li><li><a href='http://b'>c</a></li></ul></td></tr></table>",
+ /* HtmlR */ "<table _type='array'>\n\t<tr>\n\t\t<th>f1</th>\n\t\t<th>f2</th>\n\t\t<th>f3</th>\n\t</tr>\n\t<tr>\n\t\t<td>\n\t\t\t<a href='http://b'>c</a>\n\t\t</td>\n\t\t<td>\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='http://b'>c</a>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='http://b'>c</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</td>\n\t\t<td>\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='http://b'>c</a>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='http://b'>c</a>\n\t\t\t\t [...]
+ /* Uon */ "@((f1=(a=(href=http://b),c=@(c)),f2=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c))),f3=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c)))))",
+ /* UonT */ "@((f1=(a=(href=http://b),c=@(c)),f2=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c))),f3=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c)))))",
+ /* UonR */ "@(\n\t(\n\t\tf1=(\n\t\t\ta=(\n\t\t\t\thref=http://b\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tc\n\t\t\t)\n\t\t),\n\t\tf2=@(\n\t\t\t(\n\t\t\t\ta=(\n\t\t\t\t\thref=http://b\n\t\t\t\t),\n\t\t\t\tc=@(\n\t\t\t\t\tc\n\t\t\t\t)\n\t\t\t),\n\t\t\t(\n\t\t\t\ta=(\n\t\t\t\t\thref=http://b\n\t\t\t\t),\n\t\t\t\tc=@(\n\t\t\t\t\tc\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\tf3=@(\n\t\t\t(\n\t\t\t\ta=(\n\t\t\t\t\thref=http://b\n\t\t\t\t),\n\t\t\t\tc=@(\n\t\t\t\t\tc\n\t\t\t\t)\n\t\t\t),\n\t\t\t(\n\t\t\t\ta=(\ [...]
+ /* UrlEnc */ "0=(f1=(a=(href=http://b),c=@(c)),f2=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c))),f3=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c))))",
+ /* UrlEncT */ "0=(f1=(a=(href=http://b),c=@(c)),f2=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c))),f3=@((a=(href=http://b),c=@(c)),(a=(href=http://b),c=@(c))))",
+ /* UrlEncR */ "0=(\n\tf1=(\n\t\ta=(\n\t\t\thref=http://b\n\t\t),\n\t\tc=@(\n\t\t\tc\n\t\t)\n\t),\n\tf2=@(\n\t\t(\n\t\t\ta=(\n\t\t\t\thref=http://b\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tc\n\t\t\t)\n\t\t),\n\t\t(\n\t\t\ta=(\n\t\t\t\thref=http://b\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tc\n\t\t\t)\n\t\t)\n\t),\n\tf3=@(\n\t\t(\n\t\t\ta=(\n\t\t\t\thref=http://b\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tc\n\t\t\t)\n\t\t),\n\t\t(\n\t\t\ta=(\n\t\t\t\thref=http://b\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tc\n\t\t\t)\n\t\t)\n\t)\n)",
+ /* MsgPack */ "9183A2663182A16181A468726566A8687474703A2F2F62A16391A163A266329282A16181A468726566A8687474703A2F2F62A16391A16382A16181A468726566A8687474703A2F2F62A16391A163A266339282A16181A468726566A8687474703A2F2F62A16391A16382A16181A468726566A8687474703A2F2F62A16391A163",
+ /* MsgPackT */ "9183A2663182A16181A468726566A8687474703A2F2F62A16391A163A266329282A16181A468726566A8687474703A2F2F62A16391A16382A16181A468726566A8687474703A2F2F62A16391A163A266339282A16181A468726566A8687474703A2F2F62A16391A16382A16181A468726566A8687474703A2F2F62A16391A163",
+ /* RdfXml */ "<rdf:RDF>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:f1 rdf:parseType='Resource'>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://b'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</jp:f1>\n<jp:f2>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://b'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resourc [...]
+ /* RdfXmlT */ "<rdf:RDF>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:f1 rdf:parseType='Resource'>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://b'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</jp:f1>\n<jp:f2>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://b'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resour [...]
+ /* RdfXmlR */ "<rdf:RDF>\n <rdf:Seq>\n <rdf:li rdf:parseType='Resource'>\n <jp:f1 rdf:parseType='Resource'>\n <jp:a rdf:parseType='Resource'>\n <jp:href rdf:resource='http://b'/>\n </jp:a>\n <jp:c>\n <rdf:Seq>\n <rdf:li>c</rdf:li>\n </rdf:Seq>\n </jp:c>\n </jp:f1>\n <jp:f2>\n <rdf:Seq>\n <rdf:li rdf:parseType='Resource'>\n <jp:a rdf:parseType='Resource'>\n <jp [...]
+ )
+ {
+ @Override
+ public void verify(List<BeanWithAField> o) {
+ assertInstanceOf(BeanWithAField.class, o.get(0));
+ }
+ }
+ },
+ { /* 10 */
new ComboInput<A>(
"A-2",
A.class,
@@ -101,7 +418,41 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 2 */
+ { /* 11 */
+ new ComboInput<A[][]>(
+ "A[][]-2",
+ A[][].class,
+ new A[][]{{a("http://a", "b", btag, "c"),a("http://d", "e", btag, "f")},{},{a("http://g", "h", btag, "i")}},
+ /* Json */ "[[{_type:'a',a:{href:'http://a'},c:['b',{_type:'b',c:['bbb']},'c']},{_type:'a',a:{href:'http://d'},c:['e',{_type:'b',c:['bbb']},'f']}],[],[{_type:'a',a:{href:'http://g'},c:['h',{_type:'b',c:['bbb']},'i']}]]",
+ /* JsonT */ "[[{t:'a',a:{href:'http://a'},c:['b',{t:'b',c:['bbb']},'c']},{t:'a',a:{href:'http://d'},c:['e',{t:'b',c:['bbb']},'f']}],[],[{t:'a',a:{href:'http://g'},c:['h',{t:'b',c:['bbb']},'i']}]]",
+ /* JsonR */ "[\n\t[\n\t\t{\n\t\t\t_type: 'a',\n\t\t\ta: {\n\t\t\t\thref: 'http://a'\n\t\t\t},\n\t\t\tc: [\n\t\t\t\t'b',\n\t\t\t\t{\n\t\t\t\t\t_type: 'b',\n\t\t\t\t\tc: [\n\t\t\t\t\t\t'bbb'\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t'c'\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t_type: 'a',\n\t\t\ta: {\n\t\t\t\thref: 'http://d'\n\t\t\t},\n\t\t\tc: [\n\t\t\t\t'e',\n\t\t\t\t{\n\t\t\t\t\t_type: 'b',\n\t\t\t\t\tc: [\n\t\t\t\t\t\t'bbb'\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t'f'\n\t\t\t]\n\t\t}\n\t],\n\t[\n\t],\n\ [...]
+ /* Xml */ "<array><array><a href='http://a'>b<b>bbb</b>c</a><a href='http://d'>e<b>bbb</b>f</a></array><array></array><array><a href='http://g'>h<b>bbb</b>i</a></array></array>",
+ /* XmlT */ "<array><array><a href='http://a'>b<b>bbb</b>c</a><a href='http://d'>e<b>bbb</b>f</a></array><array></array><array><a href='http://g'>h<b>bbb</b>i</a></array></array>",
+ /* XmlR */ "<array>\n\t<array>\n\t\t<a href='http://a'>b<b>bbb</b>c</a>\n\t\t<a href='http://d'>e<b>bbb</b>f</a>\n\t</array>\n\t<array>\n\t</array>\n\t<array>\n\t\t<a href='http://g'>h<b>bbb</b>i</a>\n\t</array>\n</array>\n",
+ /* XmlNs */ "<array><array><a href='http://a'>b<b>bbb</b>c</a><a href='http://d'>e<b>bbb</b>f</a></array><array></array><array><a href='http://g'>h<b>bbb</b>i</a></array></array>",
+ /* Html */ "<ul><li><ul><li><a href='http://a'>b<b>bbb</b>c</a></li><li><a href='http://d'>e<b>bbb</b>f</a></li></ul></li><li><ul></ul></li><li><ul><li><a href='http://g'>h<b>bbb</b>i</a></li></ul></li></ul>",
+ /* HtmlT */ "<ul><li><ul><li><a href='http://a'>b<b>bbb</b>c</a></li><li><a href='http://d'>e<b>bbb</b>f</a></li></ul></li><li><ul></ul></li><li><ul><li><a href='http://g'>h<b>bbb</b>i</a></li></ul></li></ul>",
+ /* HtmlR */ "<ul>\n\t<li>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href='http://a'>b<b>bbb</b>c</a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href='http://d'>e<b>bbb</b>f</a>\n\t\t\t</li>\n\t\t</ul>\n\t</li>\n\t<li>\n\t\t<ul></ul>\n\t</li>\n\t<li>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href='http://g'>h<b>bbb</b>i</a>\n\t\t\t</li>\n\t\t</ul>\n\t</li>\n</ul>\n",
+ /* Uon */ "@(@((_type=a,a=(href=http://a),c=@(b,(_type=b,c=@(bbb)),c)),(_type=a,a=(href=http://d),c=@(e,(_type=b,c=@(bbb)),f))),@(),@((_type=a,a=(href=http://g),c=@(h,(_type=b,c=@(bbb)),i))))",
+ /* UonT */ "@(@((t=a,a=(href=http://a),c=@(b,(t=b,c=@(bbb)),c)),(t=a,a=(href=http://d),c=@(e,(t=b,c=@(bbb)),f))),@(),@((t=a,a=(href=http://g),c=@(h,(t=b,c=@(bbb)),i))))",
+ /* UonR */ "@(\n\t@(\n\t\t(\n\t\t\t_type=a,\n\t\t\ta=(\n\t\t\t\thref=http://a\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\tb,\n\t\t\t\t(\n\t\t\t\t\t_type=b,\n\t\t\t\t\tc=@(\n\t\t\t\t\t\tbbb\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\tc\n\t\t\t)\n\t\t),\n\t\t(\n\t\t\t_type=a,\n\t\t\ta=(\n\t\t\t\thref=http://d\n\t\t\t),\n\t\t\tc=@(\n\t\t\t\te,\n\t\t\t\t(\n\t\t\t\t\t_type=b,\n\t\t\t\t\tc=@(\n\t\t\t\t\t\tbbb\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\tf\n\t\t\t)\n\t\t)\n\t),\n\t@(),\n\t@(\n\t\t(\n\t\t\t_type=a,\n\t\t\t [...]
+ /* UrlEnc */ "0=@((_type=a,a=(href=http://a),c=@(b,(_type=b,c=@(bbb)),c)),(_type=a,a=(href=http://d),c=@(e,(_type=b,c=@(bbb)),f)))&1=@()&2=@((_type=a,a=(href=http://g),c=@(h,(_type=b,c=@(bbb)),i)))",
+ /* UrlEncT */ "0=@((t=a,a=(href=http://a),c=@(b,(t=b,c=@(bbb)),c)),(t=a,a=(href=http://d),c=@(e,(t=b,c=@(bbb)),f)))&1=@()&2=@((t=a,a=(href=http://g),c=@(h,(t=b,c=@(bbb)),i)))",
+ /* UrlEncR */ "0=@(\n\t(\n\t\t_type=a,\n\t\ta=(\n\t\t\thref=http://a\n\t\t),\n\t\tc=@(\n\t\t\tb,\n\t\t\t(\n\t\t\t\t_type=b,\n\t\t\t\tc=@(\n\t\t\t\t\tbbb\n\t\t\t\t)\n\t\t\t),\n\t\t\tc\n\t\t)\n\t),\n\t(\n\t\t_type=a,\n\t\ta=(\n\t\t\thref=http://d\n\t\t),\n\t\tc=@(\n\t\t\te,\n\t\t\t(\n\t\t\t\t_type=b,\n\t\t\t\tc=@(\n\t\t\t\t\tbbb\n\t\t\t\t)\n\t\t\t),\n\t\t\tf\n\t\t)\n\t)\n)\n&1=@()\n&2=@(\n\t(\n\t\t_type=a,\n\t\ta=(\n\t\t\thref=http://g\n\t\t),\n\t\tc=@(\n\t\t\th,\n\t\t\t(\n\t\t\t\t_ty [...]
+ /* MsgPack */ "939283A55F74797065A161A16181A468726566A8687474703A2F2F61A16393A16282A55F74797065A162A16391A3626262A16383A55F74797065A161A16181A468726566A8687474703A2F2F64A16393A16582A55F74797065A162A16391A3626262A166909183A55F74797065A161A16181A468726566A8687474703A2F2F67A16393A16882A55F74797065A162A16391A3626262A169",
+ /* MsgPackT */ "939283A174A161A16181A468726566A8687474703A2F2F61A16393A16282A174A162A16391A3626262A16383A174A161A16181A468726566A8687474703A2F2F64A16393A16582A174A162A16391A3626262A166909183A174A161A16181A468726566A8687474703A2F2F67A16393A16882A174A162A16391A3626262A169",
+ /* RdfXml */ "<rdf:RDF>\n<rdf:Seq>\n<rdf:li>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:_type>a</jp:_type>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://a'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>b</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:_type>b</jp:_type>\n<jp:c>\n<rdf:Seq>\n<rdf:li>bbb</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:_type>a</jp:_type>\n<jp:a rdf:p [...]
+ /* RdfXmlT */ "<rdf:RDF>\n<rdf:Seq>\n<rdf:li>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:t>a</jp:t>\n<jp:a rdf:parseType='Resource'>\n<jp:href rdf:resource='http://a'/>\n</jp:a>\n<jp:c>\n<rdf:Seq>\n<rdf:li>b</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:t>b</jp:t>\n<jp:c>\n<rdf:Seq>\n<rdf:li>bbb</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:t>a</jp:t>\n<jp:a rdf:parseType='Resource'>\n< [...]
+ /* RdfXmlR */ "<rdf:RDF>\n <rdf:Seq>\n <rdf:li>\n <rdf:Seq>\n <rdf:li rdf:parseType='Resource'>\n <jp:_type>a</jp:_type>\n <jp:a rdf:parseType='Resource'>\n <jp:href rdf:resource='http://a'/>\n </jp:a>\n <jp:c>\n <rdf:Seq>\n <rdf:li>b</rdf:li>\n <rdf:li rdf:parseType='Resource'>\n <jp:_type>b</jp:_type>\n <jp:c>\n <rdf:Seq>\n [...]
+ )
+ {
+ @Override
+ public void verify(A[][] o) {
+ assertInstanceOf(A[][].class, o);
+ }
+ }
+ },
+ { /* 12 */
new ComboInput<A>(
"A-3",
A.class,
@@ -135,7 +486,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 3 */
+ { /* 13 */
new ComboInput<A>(
"A-4",
A.class,
@@ -169,7 +520,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 4 */
+ { /* 14 */
new ComboInput<A>(
"A-5",
A.class,
@@ -203,7 +554,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 5 */
+ { /* 15 */
new ComboInput<Abbr>(
"Abbr-1",
Abbr.class,
@@ -237,7 +588,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 6 */
+ { /* 16 */
new ComboInput<Abbr>(
"Abbr-2",
Abbr.class,
@@ -271,7 +622,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 7 */
+ { /* 17 */
new ComboInput<Address>(
"Address-1",
Address.class,
@@ -305,7 +656,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 8 */
+ { /* 18 */
new ComboInput<Address>(
"Address-2",
Address.class,
@@ -339,7 +690,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 9 */
+ { /* 19 */
new ComboInput<Address>(
"Address-3",
Address.class,
@@ -375,7 +726,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 10 */
+ { /* 20 */
new ComboInput<Aside>(
"Aside-1",
Aside.class,
@@ -413,7 +764,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 11 */
+ { /* 21 */
new ComboInput<Audio>(
"Audio/Source-1",
Audio.class,
@@ -452,7 +803,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 12 */
+ { /* 22 */
new ComboInput<P>(
"Bdi-1",
P.class,
@@ -487,7 +838,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 13 */
+ { /* 23 */
new ComboInput<P>(
"Bdo-1",
P.class,
@@ -522,7 +873,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 14 */
+ { /* 24 */
new ComboInput<Blockquote>(
"Blockquote-1",
Blockquote.class,
@@ -556,7 +907,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 15 */
+ { /* 25 */
new ComboInput<Br>(
"Br-1",
Br.class,
@@ -590,7 +941,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 16 */
+ { /* 26 */
new ComboInput<P>(
"Br-2",
P.class,
@@ -625,7 +976,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 17 */
+ { /* 27 */
new ComboInput<Button>(
"Button-1",
Button.class,
@@ -659,7 +1010,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 18 */
+ { /* 28 */
new ComboInput<Canvas>(
"Canvas-1",
Canvas.class,
@@ -693,7 +1044,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 19 */
+ { /* 29 */
new ComboInput<P>(
"Cite-1",
P.class,
@@ -728,7 +1079,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 20 */
+ { /* 30 */
new ComboInput<Code>(
"Code-1",
Code.class,
@@ -762,7 +1113,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 21 */
+ { /* 31 */
new ComboInput<Datalist>(
"Datalist-1",
Datalist.class,
@@ -801,7 +1152,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 22 */
+ { /* 32 */
new ComboInput<Dl>(
"Dl/Dt/Dd",
Dl.class,
@@ -840,7 +1191,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 23 */
+ { /* 33 */
new ComboInput<P>(
"Del/Ins",
P.class,
@@ -877,7 +1228,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 24 */
+ { /* 34 */
new ComboInput<P>(
"Dfn",
P.class,
@@ -912,7 +1263,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 25 */
+ { /* 35 */
new ComboInput<Div>(
"Div",
Div.class,
@@ -947,7 +1298,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 26 */
+ { /* 36 */
new ComboInput<P>(
"Em",
P.class,
@@ -982,7 +1333,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 27 */
+ { /* 37 */
new ComboInput<Embed>(
"Embed",
Embed.class,
@@ -1016,7 +1367,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 28 */
+ { /* 38 */
new ComboInput<Form>(
"Form/Fieldset/Legend/Input/Keygen/Label",
Form.class,
@@ -1066,7 +1417,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 29 */
+ { /* 39 */
new ComboInput<Figure>(
"Figure/Figcaption/Img",
Figure.class,
@@ -1105,7 +1456,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 30 */
+ { /* 40 */
new ComboInput<Div>(
"H1/H2/H3/H4/H5/H6",
Div.class,
@@ -1147,7 +1498,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 31 */
+ { /* 41 */
new ComboInput<P>(
"Hr",
P.class,
@@ -1182,7 +1533,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 32 */
+ { /* 42 */
new ComboInput<Html>(
"Html/Head/Body/Title/Base/Link/Meta",
Html.class,
@@ -1250,7 +1601,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 33 */
+ { /* 43 */
new ComboInput<P>(
"I",
P.class,
@@ -1285,7 +1636,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 34 */
+ { /* 44 */
new ComboInput<Iframe>(
"Iframe",
Iframe.class,
@@ -1319,7 +1670,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 35 */
+ { /* 45 */
new ComboInput<P>(
"Kbd",
P.class,
@@ -1354,7 +1705,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 36 */
+ { /* 46 */
new ComboInput<Main>(
"Main/Article/Header/Footer-1",
Main.class,
@@ -1402,7 +1753,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 37 */
+ { /* 47 */
new ComboInput<Map>(
"Map/Area-1",
Map.class,
@@ -1437,7 +1788,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 38 */
+ { /* 48 */
new ComboInput<P>(
"Mark",
P.class,
@@ -1472,7 +1823,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 39 */
+ { /* 49 */
new ComboInput<Meter>(
"Meter",
Meter.class,
@@ -1506,7 +1857,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 40 */
+ { /* 50 */
new ComboInput<Nav>(
"Nav",
Nav.class,
@@ -1541,7 +1892,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 41 */
+ { /* 51 */
new ComboInput<Noscript>(
"Noscript",
Noscript.class,
@@ -1575,7 +1926,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 42 */
+ { /* 52 */
new ComboInput<Object2>(
"Object/Param",
Object2.class,
@@ -1610,7 +1961,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 43 */
+ { /* 53 */
new ComboInput<Ol>(
"Ol/Li",
Ol.class,
@@ -1645,7 +1996,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 44 */
+ { /* 54 */
new ComboInput<Form>(
"Output",
Form.class,
@@ -1686,7 +2037,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 45 */
+ { /* 55 */
new ComboInput<P>(
"p",
P.class,
@@ -1720,7 +2071,41 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 46 */
+ { /* 56 */
+ new ComboInput<P[][]>(
+ "P[][]",
+ P[][].class,
+ new P[][]{{p("a"),p("b")},{},{p("c")}},
+ /* Json */ "[[{_type:'p',c:['a']},{_type:'p',c:['b']}],[],[{_type:'p',c:['c']}]]",
+ /* JsonT */ "[[{t:'p',c:['a']},{t:'p',c:['b']}],[],[{t:'p',c:['c']}]]",
+ /* JsonR */ "[\n\t[\n\t\t{\n\t\t\t_type: 'p',\n\t\t\tc: [\n\t\t\t\t'a'\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t_type: 'p',\n\t\t\tc: [\n\t\t\t\t'b'\n\t\t\t]\n\t\t}\n\t],\n\t[\n\t],\n\t[\n\t\t{\n\t\t\t_type: 'p',\n\t\t\tc: [\n\t\t\t\t'c'\n\t\t\t]\n\t\t}\n\t]\n]",
+ /* Xml */ "<array><array><p>a</p><p>b</p></array><array></array><array><p>c</p></array></array>",
+ /* XmlT */ "<array><array><p>a</p><p>b</p></array><array></array><array><p>c</p></array></array>",
+ /* XmlR */ "<array>\n\t<array>\n\t\t<p>a</p>\n\t\t<p>b</p>\n\t</array>\n\t<array>\n\t</array>\n\t<array>\n\t\t<p>c</p>\n\t</array>\n</array>\n",
+ /* XmlNs */ "<array><array><p>a</p><p>b</p></array><array></array><array><p>c</p></array></array>",
+ /* Html */ "<ul><li><ul><li><p>a</p></li><li><p>b</p></li></ul></li><li><ul></ul></li><li><ul><li><p>c</p></li></ul></li></ul>",
+ /* HtmlT */ "<ul><li><ul><li><p>a</p></li><li><p>b</p></li></ul></li><li><ul></ul></li><li><ul><li><p>c</p></li></ul></li></ul>",
+ /* HtmlR */ "<ul>\n\t<li>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<p>a</p>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<p>b</p>\n\t\t\t</li>\n\t\t</ul>\n\t</li>\n\t<li>\n\t\t<ul></ul>\n\t</li>\n\t<li>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<p>c</p>\n\t\t\t</li>\n\t\t</ul>\n\t</li>\n</ul>\n",
+ /* Uon */ "@(@((_type=p,c=@(a)),(_type=p,c=@(b))),@(),@((_type=p,c=@(c))))",
+ /* UonT */ "@(@((t=p,c=@(a)),(t=p,c=@(b))),@(),@((t=p,c=@(c))))",
+ /* UonR */ "@(\n\t@(\n\t\t(\n\t\t\t_type=p,\n\t\t\tc=@(\n\t\t\t\ta\n\t\t\t)\n\t\t),\n\t\t(\n\t\t\t_type=p,\n\t\t\tc=@(\n\t\t\t\tb\n\t\t\t)\n\t\t)\n\t),\n\t@(),\n\t@(\n\t\t(\n\t\t\t_type=p,\n\t\t\tc=@(\n\t\t\t\tc\n\t\t\t)\n\t\t)\n\t)\n)",
+ /* UrlEnc */ "0=@((_type=p,c=@(a)),(_type=p,c=@(b)))&1=@()&2=@((_type=p,c=@(c)))",
+ /* UrlEncT */ "0=@((t=p,c=@(a)),(t=p,c=@(b)))&1=@()&2=@((t=p,c=@(c)))",
+ /* UrlEncR */ "0=@(\n\t(\n\t\t_type=p,\n\t\tc=@(\n\t\t\ta\n\t\t)\n\t),\n\t(\n\t\t_type=p,\n\t\tc=@(\n\t\t\tb\n\t\t)\n\t)\n)\n&1=@()\n&2=@(\n\t(\n\t\t_type=p,\n\t\tc=@(\n\t\t\tc\n\t\t)\n\t)\n)",
+ /* MsgPack */ "939282A55F74797065A170A16391A16182A55F74797065A170A16391A162909182A55F74797065A170A16391A163",
+ /* MsgPackT */ "939282A174A170A16391A16182A174A170A16391A162909182A174A170A16391A163",
+ /* RdfXml */ "<rdf:RDF>\n<rdf:Seq>\n<rdf:li>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:_type>p</jp:_type>\n<jp:c>\n<rdf:Seq>\n<rdf:li>a</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:_type>p</jp:_type>\n<jp:c>\n<rdf:Seq>\n<rdf:li>b</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n</rdf:Seq>\n</rdf:li>\n<rdf:li>\n<rdf:Seq/>\n</rdf:li>\n<rdf:li>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:_type>p</jp:_type>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf: [...]
+ /* RdfXmlT */ "<rdf:RDF>\n<rdf:Seq>\n<rdf:li>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:t>p</jp:t>\n<jp:c>\n<rdf:Seq>\n<rdf:li>a</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n<rdf:li rdf:parseType='Resource'>\n<jp:t>p</jp:t>\n<jp:c>\n<rdf:Seq>\n<rdf:li>b</rdf:li>\n</rdf:Seq>\n</jp:c>\n</rdf:li>\n</rdf:Seq>\n</rdf:li>\n<rdf:li>\n<rdf:Seq/>\n</rdf:li>\n<rdf:li>\n<rdf:Seq>\n<rdf:li rdf:parseType='Resource'>\n<jp:t>p</jp:t>\n<jp:c>\n<rdf:Seq>\n<rdf:li>c</rdf:li>\n</rdf:Seq>\n</jp:c [...]
+ /* RdfXmlR */ "<rdf:RDF>\n <rdf:Seq>\n <rdf:li>\n <rdf:Seq>\n <rdf:li rdf:parseType='Resource'>\n <jp:_type>p</jp:_type>\n <jp:c>\n <rdf:Seq>\n <rdf:li>a</rdf:li>\n </rdf:Seq>\n </jp:c>\n </rdf:li>\n <rdf:li rdf:parseType='Resource'>\n <jp:_type>p</jp:_type>\n <jp:c>\n <rdf:Seq>\n <rdf:li>b</rdf:li>\n </rdf:Seq>\n </jp:c>\n [...]
+ )
+ {
+ @Override
+ public void verify(P[][] o) {
+ assertInstanceOf(P[][].class, o);
+ }
+ }
+ },
+ { /* 57 */
new ComboInput<Pre>(
"Pre",
Pre.class,
@@ -1754,7 +2139,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 47 */
+ { /* 58 */
new ComboInput<Progress>(
"Progress",
Progress.class,
@@ -1788,7 +2173,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 48 */
+ { /* 59 */
new ComboInput<P>(
"Q",
P.class,
@@ -1823,7 +2208,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 49 */
+ { /* 60 */
new ComboInput<Ruby>(
"Ruby/Rb/Rtc/Rp/Rt",
Ruby.class,
@@ -1862,7 +2247,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 50 */
+ { /* 61 */
new ComboInput<P>(
"S",
P.class,
@@ -1897,7 +2282,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 51 */
+ { /* 62 */
new ComboInput<Samp>(
"Samp",
Samp.class,
@@ -1931,7 +2316,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 52 */
+ { /* 63 */
new ComboInput<Script>(
"Script",
Script.class,
@@ -1965,7 +2350,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 53 */
+ { /* 64 */
new ComboInput<Section>(
"Section",
Section.class,
@@ -2001,7 +2386,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 54 */
+ { /* 65 */
new ComboInput<Select>(
"Select/Optgroup/Option",
Select.class,
@@ -2037,7 +2422,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 55 */
+ { /* 66 */
new ComboInput<P>(
"Small",
P.class,
@@ -2072,7 +2457,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 56 */
+ { /* 67 */
new ComboInput<P>(
"Span",
P.class,
@@ -2107,7 +2492,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 57 */
+ { /* 68 */
new ComboInput<P>(
"Strong",
P.class,
@@ -2142,7 +2527,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 58 */
+ { /* 69 */
new ComboInput<Head>(
"Style",
Head.class,
@@ -2177,7 +2562,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 59 */
+ { /* 70 */
new ComboInput<P>(
"Sub",
P.class,
@@ -2212,7 +2597,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 60 */
+ { /* 71 */
new ComboInput<P>(
"Sup",
P.class,
@@ -2247,7 +2632,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 61 */
+ { /* 72 */
new ComboInput<Table>(
"Table/Colgroup/Col/Caption/THead/TBody/TFoot/Tr/Th/Td-1",
Table.class,
@@ -2481,7 +2866,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 62 */
+ { /* 73 */
new ComboInput<Template>(
"Template",
Template.class,
@@ -2516,7 +2901,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 63 */
+ { /* 74 */
new ComboInput<Textarea>(
"Textarea",
Textarea.class,
@@ -2550,7 +2935,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 64 */
+ { /* 75 */
new ComboInput<P>(
"Time",
P.class,
@@ -2585,7 +2970,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 65 */
+ { /* 76 */
new ComboInput<P>(
"U",
P.class,
@@ -2620,7 +3005,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 66 */
+ { /* 77 */
new ComboInput<Ul>(
"Ul/Li",
Ul.class,
@@ -2655,7 +3040,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 67 */
+ { /* 78 */
new ComboInput<P>(
"Var",
P.class,
@@ -2690,7 +3075,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 68 */
+ { /* 79 */
new ComboInput<Video>(
"Video/Source/Track",
Video.class,
@@ -2729,7 +3114,7 @@ public class Html5ComboTest extends ComboRoundTripTest {
}
}
},
- { /* 69 */
+ { /* 80 */
new ComboInput<P>(
"Wbr",
P.class,
@@ -2770,4 +3155,18 @@ public class Html5ComboTest extends ComboRoundTripTest {
public Html5ComboTest(ComboInput<?> comboInput) {
super(comboInput);
}
+
+ public static class BeanWithAField {
+ public A f1;
+ public A[] f2;
+ public Collection<A> f3;
+
+ public static BeanWithAField create(A a) {
+ BeanWithAField b = new BeanWithAField();
+ b.f1 = a;
+ b.f2 = new A[]{a,a};
+ b.f3 = AList.create(a,a);
+ return b;
+ }
+ }
}
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/testutils/TestUtils.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/testutils/TestUtils.java
index 0cc99d6..76f1487 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/testutils/TestUtils.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/testutils/TestUtils.java
@@ -20,11 +20,7 @@ import java.lang.reflect.*;
import java.util.*;
import java.util.regex.*;
-import javax.xml.*;
import javax.xml.parsers.*;
-import javax.xml.transform.dom.*;
-import javax.xml.transform.stream.*;
-import javax.xml.validation.*;
import org.apache.juneau.*;
import org.apache.juneau.internal.*;
@@ -34,8 +30,6 @@ import org.apache.juneau.utils.*;
import org.apache.juneau.xml.*;
import org.junit.*;
import org.w3c.dom.*;
-import org.w3c.dom.bootstrap.*;
-import org.w3c.dom.ls.*;
import org.xml.sax.*;
@SuppressWarnings({})
@@ -164,69 +158,6 @@ public class TestUtils {
System.err.println(String.format("%4s:" + lines[i], i+1)); // NOT DEBUG
}
- /**
- * Validates that the specified XML conforms to the specified schema.
- */
- private static final void validateXml(String xml, String xmlSchema) throws Exception {
- // parse an XML document into a DOM tree
- DocumentBuilderFactory f = DocumentBuilderFactory.newInstance();
- f.setNamespaceAware(true);
- DocumentBuilder documentBuilder = f.newDocumentBuilder();
- Document document = documentBuilder.parse(new InputSource(new StringReader(xml)));
-
- // create a SchemaFactory capable of understanding WXS schemas
- SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
-
- if (xmlSchema.indexOf('\u0000') != -1) {
-
- // Break it up into a map of namespaceURI->schema document
- final Map<String,String> schemas = new HashMap<>();
- String[] ss = xmlSchema.split("\u0000");
- xmlSchema = ss[0];
- for (String s : ss) {
- Matcher m = pTargetNs.matcher(s);
- if (m.find())
- schemas.put(m.group(1), s);
- }
-
- // Create a custom resolver
- factory.setResourceResolver(
- new LSResourceResolver() {
-
- @Override /* LSResourceResolver */
- public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) {
-
- String schema = schemas.get(namespaceURI);
- if (schema == null)
- throw new FormattedRuntimeException("No schema found for namespaceURI ''{0}''", namespaceURI);
-
- try {
- DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();
- DOMImplementationLS domImplementationLS = (DOMImplementationLS)registry.getDOMImplementation("LS 3.0");
- LSInput in = domImplementationLS.createLSInput();
- in.setCharacterStream(new StringReader(schema));
- in.setSystemId(systemId);
- return in;
-
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
- }
- );
- }
-
- Schema schema = factory.newSchema(new StreamSource(new StringReader(xmlSchema)));
-
- // create a Validator instance, which can be used to validate an instance document
- Validator validator = schema.newValidator();
-
- // validate the DOM tree
- validator.validate(new DOMSource(document));
- }
-
- private static Pattern pTargetNs = Pattern.compile("targetNamespace=['\"]([^'\"]+)['\"]");
-
public static final void validateXml(Object o) throws Exception {
validateXml(o, XmlSerializer.DEFAULT_NS_SQ);
}
@@ -238,17 +169,11 @@ public class TestUtils {
s = s.builder().ws().ns().addNamespaceUrisToRoot().build();
String xml = s.serialize(o);
- String xmlSchema = null;
try {
- xmlSchema = s.getSchemaSerializer().serialize(o);
TestUtils.checkXmlWhitespace(xml);
- TestUtils.checkXmlWhitespace(xmlSchema);
- TestUtils.validateXml(xml, xmlSchema);
} catch (Exception e) {
System.err.println("---XML---"); // NOT DEBUG
System.err.println(xml); // NOT DEBUG
- System.err.println("---XMLSchema---"); // NOT DEBUG
- System.err.println(xmlSchema); // NOT DEBUG
throw e;
}
}
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/BasicXmlTest.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/BasicXmlTest.java
index a126acc..4acf0e8 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/BasicXmlTest.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/BasicXmlTest.java
@@ -261,9 +261,9 @@ public class BasicXmlTest {
{ /* 20 */
"BeanWithPropertiesWithTypeNames",
new BeanWithPropertiesWithTypeNames().init(),
- "<object><b1><b>foo</b></b1><b2 _type='B'><b>foo</b></b2></object>",
- "<object>\n\t<b1>\n\t\t<b>foo</b>\n\t</b1>\n\t<b2 _type='B'>\n\t\t<b>foo</b>\n\t</b2>\n</object>\n",
- "<object><b1><b>foo</b></b1><b2 _type='B'><b>foo</b></b2></object>"
+ "<object><B _name='b1'><b>foo</b></B><B _name='b2'><b>foo</b></B></object>",
+ "<object>\n <B _name='b1'>\n <b>foo</b>\n </B>\n <B _name='b2'>\n <b>foo</b>\n </B>\n</object>\n",
+ "<object><B _name='b1'><b>foo</b></B><B _name='b2'><b>foo</b></B></object>"
},
{ /* 21 */
"BeanWithPropertiesWithArrayTypeNames",
@@ -398,38 +398,38 @@ public class BasicXmlTest {
new BeanWithPropertiesWithMapTypeNames().init(),
"<object>"
+"<b1>"
- +"<k1>"
+ +"<B _name='k1'>"
+"<b>foo</b>"
- +"</k1>"
+ +"</B>"
+"</b1>"
+"<b2>"
- +"<k2 _type='B'>"
+ +"<B _name='k2'>"
+"<b>foo</b>"
- +"</k2>"
+ +"</B>"
+"</b2>"
+"</object>",
"<object>\n"
+"\t<b1>\n"
- +"\t\t<k1>\n"
+ +"\t\t<B _name='k1'>\n"
+"\t\t\t<b>foo</b>\n"
- +"\t\t</k1>\n"
+ +"\t\t</B>\n"
+"\t</b1>\n"
+"\t<b2>\n"
- +"\t\t<k2 _type='B'>\n"
+ +"\t\t<B _name='k2'>\n"
+"\t\t\t<b>foo</b>\n"
- +"\t\t</k2>\n"
+ +"\t\t</B>\n"
+"\t</b2>\n"
+"</object>\n",
"<object>"
+"<b1>"
- +"<k1>"
+ +"<B _name='k1'>"
+"<b>foo</b>"
- +"</k1>"
+ +"</B>"
+"</b1>"
+"<b2>"
- +"<k2 _type='B'>"
+ +"<B _name='k2'>"
+"<b>foo</b>"
- +"</k2>"
+ +"</B>"
+"</b2>"
+"</object>",
},
@@ -437,12 +437,12 @@ public class BasicXmlTest {
"BeanWithChildTypeNames",
new BeanWithChildTypeNames().init(),
"<object>"
- +"<a>"
+ +"<X _name='a'>"
+"<fx>fx1</fx>"
- +"</a>"
- +"<b _type='X'>"
+ +"</X>"
+ +"<X _name='b'>"
+"<fx>fx1</fx>"
- +"</b>"
+ +"</X>"
+"<c>"
+"<X>"
+"<fx>fx1</fx>"
@@ -455,12 +455,12 @@ public class BasicXmlTest {
+"</d>"
+"</object>",
"<object>"
- +"\n\t<a>"
+ +"\n\t<X _name='a'>"
+"\n\t\t<fx>fx1</fx>"
- +"\n\t</a>"
- +"\n\t<b _type='X'>"
+ +"\n\t</X>"
+ +"\n\t<X _name='b'>"
+"\n\t\t<fx>fx1</fx>"
- +"\n\t</b>"
+ +"\n\t</X>"
+"\n\t<c>"
+"\n\t\t<X>"
+"\n\t\t\t<fx>fx1</fx>"
@@ -473,12 +473,12 @@ public class BasicXmlTest {
+"\n\t</d>"
+"\n</object>\n",
"<object>"
- +"<a>"
+ +"<X _name='a'>"
+"<fx>fx1</fx>"
- +"</a>"
- +"<b _type='X'>"
+ +"</X>"
+ +"<X _name='b'>"
+"<fx>fx1</fx>"
- +"</b>"
+ +"</X>"
+"<c>"
+"<X>"
+"<fx>fx1</fx>"
@@ -586,46 +586,46 @@ public class BasicXmlTest {
"BeanWithAbstractFields",
new BeanWithAbstractFields().init(),
"<object>"
- +"<a>"
+ +"<A _name='a'>"
+"<a>foo</a>"
- +"</a>"
- +"<ia _type='A'>"
+ +"</A>"
+ +"<A _name='ia'>"
+"<a>foo</a>"
- +"</ia>"
- +"<aa _type='A'>"
+ +"</A>"
+ +"<A _name='aa'>"
+"<a>foo</a>"
- +"</aa>"
- +"<o _type='A'>"
+ +"</A>"
+ +"<A _name='o'>"
+"<a>foo</a>"
- +"</o>"
+ +"</A>"
+"</object>",
"<object>\n"
- +"\t<a>\n"
+ +"\t<A _name='a'>\n"
+"\t\t<a>foo</a>\n"
- +"\t</a>\n"
- +"\t<ia _type='A'>\n"
+ +"\t</A>\n"
+ +"\t<A _name='ia'>\n"
+"\t\t<a>foo</a>\n"
- +"\t</ia>\n"
- +"\t<aa _type='A'>\n"
+ +"\t</A>\n"
+ +"\t<A _name='aa'>\n"
+"\t\t<a>foo</a>\n"
- +"\t</aa>\n"
- +"\t<o _type='A'>\n"
+ +"\t</A>\n"
+ +"\t<A _name='o'>\n"
+"\t\t<a>foo</a>\n"
- +"\t</o>\n"
+ +"\t</A>\n"
+"</object>\n",
"<object>"
- +"<a>"
+ +"<A _name='a'>"
+"<a>foo</a>"
- +"</a>"
- +"<ia _type='A'>"
+ +"</A>"
+ +"<A _name='ia'>"
+"<a>foo</a>"
- +"</ia>"
- +"<aa _type='A'>"
+ +"</A>"
+ +"<A _name='aa'>"
+"<a>foo</a>"
- +"</aa>"
- +"<o _type='A'>"
+ +"</A>"
+ +"<A _name='o'>"
+"<a>foo</a>"
- +"</o>"
+ +"</A>"
+"</object>",
},
{ /* 39 */
@@ -748,53 +748,53 @@ public class BasicXmlTest {
new BeanWithAbstractMapFields().init(),
"<object>"
+"<a>"
- +"<k1>"
+ +"<A _name='k1'>"
+"<a>foo</a>"
- +"</k1>"
+ +"</A>"
+"</a>"
+"<b>"
- +"<k2 _type='A'>"
+ +"<A _name='k2'>"
+"<a>foo</a>"
- +"</k2>"
+ +"</A>"
+"</b>"
+"<c>"
- +"<k3 _type='A'>"
+ +"<A _name='k3'>"
+"<a>foo</a>"
- +"</k3>"
+ +"</A>"
+"</c>"
+"</object>",
"<object>\n"
+"\t<a>\n"
- +"\t\t<k1>\n"
+ +"\t\t<A _name='k1'>\n"
+"\t\t\t<a>foo</a>\n"
- +"\t\t</k1>\n"
+ +"\t\t</A>\n"
+"\t</a>\n"
+"\t<b>\n"
- +"\t\t<k2 _type='A'>\n"
+ +"\t\t<A _name='k2'>\n"
+"\t\t\t<a>foo</a>\n"
- +"\t\t</k2>\n"
+ +"\t\t</A>\n"
+"\t</b>\n"
+"\t<c>\n"
- +"\t\t<k3 _type='A'>\n"
+ +"\t\t<A _name='k3'>\n"
+"\t\t\t<a>foo</a>\n"
- +"\t\t</k3>\n"
+ +"\t\t</A>\n"
+"\t</c>\n"
+"</object>\n",
"<object>"
+"<a>"
- +"<k1>"
+ +"<A _name='k1'>"
+"<a>foo</a>"
- +"</k1>"
+ +"</A>"
+"</a>"
+"<b>"
- +"<k2 _type='A'>"
+ +"<A _name='k2'>"
+"<a>foo</a>"
- +"</k2>"
+ +"</A>"
+"</b>"
+"<c>"
- +"<k3 _type='A'>"
+ +"<A _name='k3'>"
+"<a>foo</a>"
- +"</k3>"
+ +"</A>"
+"</c>"
+"</object>",
},
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/CommonTest.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/CommonTest.java
index 15746fa..438198d 100755
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/CommonTest.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/CommonTest.java
@@ -303,9 +303,6 @@ public class CommonTest {
s.ignoreRecursions();
assertEquals("<object><name>foo</name><r2><name>bar</name><r3><name>baz</name></r3></r2></object>", s.build().serialize(r1));
-
- // Make sure this doesn't blow up.
- s.build().getSchemaSerializer().serialize(r1);
}
public static class R1 {
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/XmlConfigAnnotationTest.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/XmlConfigAnnotationTest.java
index d0afded..faf6d19 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/XmlConfigAnnotationTest.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/XmlConfigAnnotationTest.java
@@ -95,8 +95,7 @@ public class XmlConfigAnnotationTest {
preserveRootElement="$X{true}",
reporter=AB.class,
resolver=AC.class,
- validating="$X{true}",
- xsNamespace="$X{foo}"
+ validating="$X{true}"
)
static class A {}
static ClassInfo a = ClassInfo.of(A.class);
@@ -111,7 +110,6 @@ public class XmlConfigAnnotationTest {
check("foo:null", x.getDefaultNamespace());
check("true", x.isEnableNamespaces());
check("[foo:null]", x.getNamespaces());
- check("foo:null", x.getXsNamespace());
}
@Test
@@ -143,7 +141,6 @@ public class XmlConfigAnnotationTest {
check("juneau:http://www.apache.org/2013/Juneau", x.getDefaultNamespace());
check("false", x.isEnableNamespaces());
check("[]", x.getNamespaces());
- check("xs:http://www.w3.org/2001/XMLSchema", x.getXsNamespace());
}
@Test
@@ -174,7 +171,6 @@ public class XmlConfigAnnotationTest {
check("juneau:http://www.apache.org/2013/Juneau", x.getDefaultNamespace());
check("false", x.isEnableNamespaces());
check("[]", x.getNamespaces());
- check("xs:http://www.w3.org/2001/XMLSchema", x.getXsNamespace());
}
@Test
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/XmlTest.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/XmlTest.java
index 44ae856..66e2bfb 100755
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/XmlTest.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/XmlTest.java
@@ -268,7 +268,7 @@ public class XmlTest {
G t = new G();
t.f1.add("bar");
String r = s.serialize(t);
- assertEquals("<bar><f1><string>bar</string></f1></bar>", r);
+ assertEquals("<bar><foo _name='f1'><string>bar</string></foo></bar>", r);
t = p.parse(r, G.class);
validateXml(t);
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
index 115cb11..28b2414 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
@@ -1049,6 +1049,18 @@ public class BeanSession extends Session {
}
/**
+ * Returns the name property name.
+ *
+ * <p>
+ * Currently this always returns <js>"_name"</js>.
+ *
+ * @return The name property name. Never <jk>null</jk>.
+ */
+ public final String getNamePropertyName() {
+ return "_name";
+ }
+
+ /**
* Returns the bean registry defined in this bean context defined by {@link BeanContext#BEAN_beanDictionary}.
*
* @return The bean registry defined in this bean context. Never <jk>null</jk>.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlDocSerializerBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlDocSerializerBuilder.java
index 05437d6..36351f5 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlDocSerializerBuilder.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlDocSerializerBuilder.java
@@ -570,6 +570,7 @@ public class HtmlDocSerializerBuilder extends HtmlStrippedDocSerializerBuilder {
}
@Override /* XmlSerializerBuilder */
+ @Deprecated
public HtmlDocSerializerBuilder xsNamespace(Namespace value) {
super.xsNamespace(value);
return this;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlParserSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlParserSession.java
index 8877b6d..6ab799b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlParserSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlParserSession.java
@@ -357,7 +357,9 @@ public final class HtmlParserSession extends XmlParserSession {
setName(valueType, value, key);
m.put(key, value);
}
- nextTag(r, xTR);
+ tag = nextTag(r, xTD, xTR);
+ if (tag == xTD)
+ nextTag(r, xTR);
}
return m;
@@ -372,7 +374,9 @@ public final class HtmlParserSession extends XmlParserSession {
ClassMeta<?> type, BeanPropertyMeta pMeta) throws IOException, ParseException, ExecutableException, XMLStreamException {
int argIndex = 0;
while (true) {
- HtmlTag tag = nextTag(r, LI, xUL);
+ HtmlTag tag = nextTag(r, LI, xUL, xLI);
+ if (tag == xLI)
+ tag = nextTag(r, LI, xUL, xLI);
if (tag == xUL)
break;
ClassMeta<?> elementType = type.isArgs() ? type.getArg(argIndex++) : type.getElementType();
@@ -424,7 +428,9 @@ public final class HtmlParserSession extends XmlParserSession {
: newBeanMap(l, elementType.getInnerClass())
;
for (int i = 0; i < keys.size(); i++) {
- tag = nextTag(r, TD, NULL);
+ tag = nextTag(r, xTD, TD, NULL);
+ if (tag == xTD)
+ tag = nextTag(r, TD, NULL);
if (tag == NULL) {
m = null;
nextTag(r, xNULL);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java
index 9b33067..e8ced0f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java
@@ -222,6 +222,7 @@ public class HtmlSerializerBuilder extends XmlSerializerBuilder {
}
@Override /* XmlSerializerBuilder */
+ @Deprecated
public HtmlSerializerBuilder xsNamespace(Namespace value) {
super.xsNamespace(value);
return this;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSerializerSession.java
index 6076ae2..4f7d49a 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSerializerSession.java
@@ -174,6 +174,7 @@ public class HtmlSerializerSession extends XmlSerializerSession {
XmlWriter out,
Object o,
ClassMeta<?> eType,
+ String keyName,
String elementName,
Namespace elementNamespace,
boolean addNamespaceUris,
@@ -203,7 +204,7 @@ public class HtmlSerializerSession extends XmlSerializerSession {
if (type.isMapOrBean() && ! cHtml.isXml())
return serializeAnything(out, o, eType, elementName, pMeta, 0, false, false);
- return super.serializeAnything(out, o, eType, elementName, elementNamespace, addNamespaceUris, format, isMixed, preserveWhitespace, pMeta);
+ return super.serializeAnything(out, o, eType, keyName, elementName, elementNamespace, addNamespaceUris, format, isMixed, preserveWhitespace, pMeta);
}
/**
* Serialize the specified object to the specified writer.
@@ -310,7 +311,7 @@ public class HtmlSerializerSession extends XmlSerializerSession {
indent++;
if (nlIfElement)
out.nl(0);
- super.serializeAnything(out, o, null, null, null, false, XmlFormat.MIXED, false, false, null);
+ super.serializeAnything(out, o, null, null, null, null, false, XmlFormat.MIXED, false, false, null);
indent -= xIndent+1;
return cr;
@@ -433,7 +434,7 @@ public class HtmlSerializerSession extends XmlSerializerSession {
out.i(i+2);
out.eTag("td").nl(i+2);
out.sTag(i+2, "td");
- cr = serializeAnything(out, value, valueType, (key == null ? "_x0000_" : toString(key)), null, 2, false, false);
+ cr = serializeAnything(out, value, valueType, (key == null ? "_x0000_" : toString(key)), null, 2, false, true);
if (cr == CR_ELEMENTS)
out.ie(i+2);
out.eTag("td").nl(i+2);
@@ -726,7 +727,7 @@ public class HtmlSerializerSession extends XmlSerializerSession {
HtmlClassMeta cHtml = getHtmlClassMeta(cm);
- if (cHtml.isNoTables() || bpHtml.isNoTables())
+ if (cHtml.isNoTables() || bpHtml.isNoTables() || cHtml.isXml() || bpHtml.isXml())
return null;
if (cHtml.isNoTableHeaders() || bpHtml.isNoTableHeaders())
return new Object[0];
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializerBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializerBuilder.java
index 7734afe..c6389c7 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializerBuilder.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializerBuilder.java
@@ -133,6 +133,7 @@ public class HtmlStrippedDocSerializerBuilder extends HtmlSerializerBuilder {
}
@Override /* XmlSerializerBuilder */
+ @Deprecated
public HtmlStrippedDocSerializerBuilder xsNamespace(Namespace value) {
super.xsNamespace(value);
return this;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlParserSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlParserSession.java
index 0723260..7979b24 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlParserSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlParserSession.java
@@ -97,6 +97,14 @@ public class XmlParserSession extends ReaderParserSession {
}
/*
+ * Returns the _name attribute value.
+ * Any <js>'_x####_'</js> sequences in the string will be decoded.
+ */
+ private String getNameProperty(XmlReader r) {
+ return decodeString(r.getAttributeValue(null, getNamePropertyName()));
+ }
+
+ /*
* Returns the name of the specified attribute on the current XML element.
* Any <js>'_x####_'</js> sequences in the string will be decoded.
*/
@@ -397,7 +405,7 @@ public class XmlParserSession extends ReaderParserSession {
for (int i = 0; i < r.getAttributeCount(); i++) {
String a = r.getAttributeLocalName(i);
// TODO - Need better handling of namespaces here.
- if (! (a.equals(getBeanTypePropertyName(null)))) {
+ if (! isSpecialAttr(a)) {
K key = trim(convertAttrToType(m, a, keyType));
V value = trim(convertAttrToType(m, r.getAttributeValue(i), valueType));
setName(valueType, value, key);
@@ -409,7 +417,9 @@ public class XmlParserSession extends ReaderParserSession {
String currAttr;
if (event == START_ELEMENT) {
depth++;
- currAttr = getElementName(r);
+ currAttr = getNameProperty(r);
+ if (currAttr == null)
+ currAttr = getElementName(r);
K key = convertAttrToType(m, currAttr, keyType);
V value = parseAnything(valueType, currAttr, r, m, false, pMeta);
setName(valueType, value, currAttr);
@@ -476,7 +486,7 @@ public class XmlParserSession extends ReaderParserSession {
for (int i = 0; i < r.getAttributeCount(); i++) {
String key = getAttributeName(r, i);
- if (! "nil".equals(key)) {
+ if (! ("nil".equals(key) || isSpecialAttr(key))) {
String val = r.getAttributeValue(i);
String ns = r.getAttributeNamespace(i);
BeanPropertyMeta bpm = xmlMeta.getPropertyMeta(key);
@@ -560,7 +570,9 @@ public class XmlParserSession extends ReaderParserSession {
} else if (cp != null && cpf == ELEMENTS) {
cp.add(m, null, parseAnything(cpcm.getElementType(), cp.getName(), r, m.getBean(false), false, cp));
} else {
- currAttr = getElementName(r);
+ currAttr = getNameProperty(r);
+ if (currAttr == null)
+ currAttr = getElementName(r);
BeanPropertyMeta pMeta = xmlMeta.getPropertyMeta(currAttr);
if (pMeta == null) {
onUnknownProperty(currAttr, m);
@@ -630,6 +642,10 @@ public class XmlParserSession extends ReaderParserSession {
} while (depth > 0);
}
+ private boolean isSpecialAttr(String key) {
+ return key.equals(getBeanTypePropertyName(null)) || key.equals(getNamePropertyName());
+ }
+
private Object getUnknown(XmlReader r) throws IOException, ParseException, ExecutableException, XMLStreamException {
if (r.getEventType() != START_ELEMENT) {
throw new ParseException(this, "Parser must be on START_ELEMENT to read next text.");
@@ -642,7 +658,7 @@ public class XmlParserSession extends ReaderParserSession {
for (int i = 0; i < r.getAttributeCount(); i++) {
String key = getAttributeName(r, i);
String val = r.getAttributeValue(i);
- if (! key.equals(getBeanTypePropertyName(null)))
+ if (! isSpecialAttr(key))
m.put(key, val);
}
}
@@ -666,7 +682,9 @@ public class XmlParserSession extends ReaderParserSession {
String currAttr;
if (event == START_ELEMENT) {
depth++;
- currAttr = getElementName(r);
+ currAttr = getNameProperty(r);
+ if (currAttr == null)
+ currAttr = getElementName(r);
String key = convertAttrToType(null, currAttr, string());
Object value = parseAnything(object(), currAttr, r, null, false, null);
if (m.containsKey(key)) {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializer.java
index 5cde6f1..6a6472d 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializer.java
@@ -19,7 +19,7 @@ import org.apache.juneau.*;
import org.apache.juneau.annotation.*;
import org.apache.juneau.json.*;
import org.apache.juneau.serializer.*;
-import org.apache.juneau.xmlschema.XmlSchemaSerializer;
+import org.apache.juneau.xmlschema.*;
/**
* Serializes POJO models to XML.
@@ -369,6 +369,7 @@ public class XmlSerializer extends WriterSerializer implements XmlMetaProvider,
* <li class='link'>{@doc juneau-marshall.XmlDetails.Namespaces}
* </ul>
*/
+ @Deprecated
public static final String XML_xsNamespace = PREFIX + ".xsNamespace.s";
@@ -512,6 +513,7 @@ public class XmlSerializer extends WriterSerializer implements XmlMetaProvider,
private final Map<BeanMeta<?>,XmlBeanMeta> xmlBeanMetas = new ConcurrentHashMap<>();
private final Map<BeanPropertyMeta,XmlBeanPropertyMeta> xmlBeanPropertyMetas = new ConcurrentHashMap<>();
+ @Deprecated
private volatile XmlSchemaSerializer schemaSerializer;
/**
@@ -586,6 +588,7 @@ public class XmlSerializer extends WriterSerializer implements XmlMetaProvider,
* Returns the schema serializer based on the settings of this serializer.
* @return The schema serializer.
*/
+ @Deprecated
public XmlSerializer getSchemaSerializer() {
if (schemaSerializer == null)
schemaSerializer = builder().build(XmlSchemaSerializer.class);
@@ -716,6 +719,7 @@ public class XmlSerializer extends WriterSerializer implements XmlMetaProvider,
* The namespace for the <c>XMLSchema</c> namespace, used by the schema generated by the
* {@link XmlSchemaSerializer} class.
*/
+ @Deprecated
protected final Namespace getXsNamespace() {
return xsNamespace;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializerBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializerBuilder.java
index 8bdc64f..6f7c28b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializerBuilder.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializerBuilder.java
@@ -229,6 +229,7 @@ public class XmlSerializerBuilder extends WriterSerializerBuilder {
* <br>The default is <js>"xs: http://www.w3.org/2001/XMLSchema"</js>.
* @return This object (for method chaining).
*/
+ @Deprecated
public XmlSerializerBuilder xsNamespace(Namespace value) {
return set(XML_xsNamespace, value);
}
@@ -249,6 +250,7 @@ public class XmlSerializerBuilder extends WriterSerializerBuilder {
* <br>The default is <js>"xs: http://www.w3.org/2001/XMLSchema"</js>.
* @return This object (for method chaining).
*/
+ @Deprecated
public XmlSerializerBuilder xsNamespace(String value) {
return set(XML_xsNamespace, Namespace.create(value));
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializerSession.java
index c515083..c22a1c9 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializerSession.java
@@ -132,7 +132,7 @@ public class XmlSerializerSession extends WriterSerializerSession {
protected void doSerialize(SerializerPipe out, Object o) throws IOException, SerializeException {
if (isEnableNamespaces() && isAutoDetectNamespaces())
findNsfMappings(o);
- serializeAnything(getXmlWriter(out), o, getExpectedRootType(o), null, null, isEnableNamespaces() && isAddNamespaceUrisToRoot(), XmlFormat.DEFAULT, false, false, null);
+ serializeAnything(getXmlWriter(out), o, getExpectedRootType(o), null, null, null, isEnableNamespaces() && isAddNamespaceUrisToRoot(), XmlFormat.DEFAULT, false, false, null);
}
/**
@@ -230,6 +230,7 @@ public class XmlSerializerSession extends WriterSerializerSession {
* @param out The writer to send the output to.
* @param o The object to serialize.
* @param eType The expected type if this is a bean property value being serialized.
+ * @param keyName The property name or map key name.
* @param elementName The root element name.
* @param elementNamespace The namespace of the element.
* @param addNamespaceUris Flag indicating that namespace URIs need to be added.
@@ -246,6 +247,7 @@ public class XmlSerializerSession extends WriterSerializerSession {
XmlWriter out,
Object o,
ClassMeta<?> eType,
+ String keyName,
String elementName,
Namespace elementNamespace,
boolean addNamespaceUris,
@@ -260,7 +262,7 @@ public class XmlSerializerSession extends WriterSerializerSession {
ClassMeta<?> wType = null; // The wrapped type (delegate)
ClassMeta<?> sType = object(); // The serialized type
- aType = push2(elementName, o, eType);
+ aType = push2(keyName, o, eType);
if (eType == null)
eType = object();
@@ -353,11 +355,21 @@ public class XmlSerializerSession extends WriterSerializerSession {
isCollapsed = true;
// Is there a name associated with this bean?
+
+ String name = keyName;
if (elementName == null && dictionaryName != null) {
elementName = dictionaryName;
- isExpectedType = true;
+ isExpectedType = o != null; // preserve type='null' when it's null.
+ }
+
+ if (elementName == null) {
+ elementName = name;
+ name = null;
}
+ if (StringUtils.isEquals(name, elementName))
+ name = null;
+
if (isEnableNamespaces()) {
if (elementNamespace == null)
elementNamespace = getXmlClassMeta(sType).getNamespace();
@@ -379,6 +391,7 @@ public class XmlSerializerSession extends WriterSerializerSession {
en = type.toString();
type = null;
}
+
boolean encodeEn = elementName != null;
String ns = (elementNamespace == null ? null : elementNamespace.name);
String dns = null, elementNs = null;
@@ -405,6 +418,8 @@ public class XmlSerializerSession extends WriterSerializerSession {
else if (type != null && type != STRING)
out.attr(dns, getBeanTypePropertyName(eType), type);
}
+ if (name != null)
+ out.attr(getNamePropertyName(), name);
} else {
out.i(i);
}
@@ -521,7 +536,7 @@ public class XmlSerializerSession extends WriterSerializerSession {
hasChildren = true;
out.append('>').nlIf(! isMixed, indent);
}
- serializeAnything(out, value, valueType, toString(k), null, false, XmlFormat.DEFAULT, isMixed, false, null);
+ serializeAnything(out, value, valueType, toString(k), null, null, false, XmlFormat.DEFAULT, isMixed, false, null);
}
return hasChildren ? CR_ELEMENTS : CR_EMPTY;
}
@@ -632,7 +647,7 @@ public class XmlSerializerSession extends WriterSerializerSession {
}
XmlBeanPropertyMeta bpXml = getXmlBeanPropertyMeta(pMeta);
- serializeAnything(out, value, cMeta, key, bpXml.getNamespace(), false, bpXml.getXmlFormat(), isMixedOrText, false, pMeta);
+ serializeAnything(out, value, cMeta, key, null, bpXml.getNamespace(), false, bpXml.getXmlFormat(), isMixedOrText, false, pMeta);
}
}
}
@@ -647,16 +662,16 @@ public class XmlSerializerSession extends WriterSerializerSession {
Collection c = (Collection)content;
for (Iterator i = c.iterator(); i.hasNext();) {
Object value = i.next();
- serializeAnything(out, value, contentType.getElementType(), null, null, false, cf, isMixedOrText, preserveWhitespace, null);
+ serializeAnything(out, value, contentType.getElementType(), null, null, null, false, cf, isMixedOrText, preserveWhitespace, null);
}
} else if (contentType.isArray()) {
Collection c = toList(Object[].class, content);
for (Iterator i = c.iterator(); i.hasNext();) {
Object value = i.next();
- serializeAnything(out, value, contentType.getElementType(), null, null, false, cf, isMixedOrText, preserveWhitespace, null);
+ serializeAnything(out, value, contentType.getElementType(), null, null, null, false, cf, isMixedOrText, preserveWhitespace, null);
}
} else {
- serializeAnything(out, content, contentType, null, null, false, cf, isMixedOrText, preserveWhitespace, null);
+ serializeAnything(out, content, contentType, null, null, null, false, cf, isMixedOrText, preserveWhitespace, null);
}
} else {
out.attr("nil", "true").append('>').nlIf(! isMixedOrText, indent);
@@ -686,7 +701,7 @@ public class XmlSerializerSession extends WriterSerializerSession {
for (Iterator i = c.iterator(); i.hasNext();) {
Object value = i.next();
- serializeAnything(out, value, eeType, eName, eNs, false, XmlFormat.DEFAULT, isMixed, false, null);
+ serializeAnything(out, value, eeType, null, eName, eNs, false, XmlFormat.DEFAULT, isMixed, false, null);
}
return out;
}
@@ -803,6 +818,7 @@ public class XmlSerializerSession extends WriterSerializerSession {
* The namespace for the <c>XMLSchema</c> namespace, used by the schema generated by the
* {@link org.apache.juneau.xmlschema.XmlSchemaSerializer} class.
*/
+ @Deprecated
protected final Namespace getXsNamespace() {
return ctx.getXsNamespace();
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlConfig.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlConfig.java
index 97da04c..e063bd5 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlConfig.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlConfig.java
@@ -333,5 +333,6 @@ public @interface XmlConfig {
* <li class='link'>{@doc juneau-marshall.XmlDetails.Namespaces}
* </ul>
*/
+ @Deprecated
String xsNamespace() default "";
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlConfigApply.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlConfigApply.java
index 77782dc..12275f3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlConfigApply.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlConfigApply.java
@@ -34,6 +34,7 @@ public class XmlConfigApply extends ConfigApply<XmlConfig> {
super(c, r);
}
+ @SuppressWarnings("deprecation")
@Override
public void apply(AnnotationInfo<XmlConfig> ai, PropertyStoreBuilder psb) {
XmlConfig a = ai.getAnnotation();
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaDocSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaDocSerializer.java
index d630c3b..1480464 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaDocSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaDocSerializer.java
@@ -31,6 +31,7 @@ import org.apache.juneau.serializer.*;
* <xa>encoding</xa>=<xs>'UTF-8'</xs><xt>?></xt></code> to the response to make it a valid XML document.
*/
@ConfigurableContext
+@Deprecated
public class XmlSchemaDocSerializer extends XmlSchemaSerializer {
//-------------------------------------------------------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaDocSerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaDocSerializerSession.java
index 09b3619..c445d19 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaDocSerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaDocSerializerSession.java
@@ -24,6 +24,7 @@ import org.apache.juneau.xml.*;
* This class is NOT thread safe.
* It is typically discarded after one-time use although it can be reused within the same thread.
*/
+@Deprecated
public class XmlSchemaDocSerializerSession extends XmlSchemaSerializerSession {
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaSerializer.java
index ac68cdb..fd116e4 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaSerializer.java
@@ -31,6 +31,7 @@ import org.apache.juneau.xml.*;
* Produces the XML-schema representation of the XML produced by the {@link XmlSerializer} class with the same properties.
*/
@ConfigurableContext
+@Deprecated
public class XmlSchemaSerializer extends XmlSerializer {
//-------------------------------------------------------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaSerializerBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaSerializerBuilder.java
index 13ade2d..520a09d 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaSerializerBuilder.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaSerializerBuilder.java
@@ -27,6 +27,7 @@ import org.apache.juneau.xml.*;
/**
* Builder class for building instances of XML Schema serializers.
*/
+@Deprecated
public class XmlSchemaSerializerBuilder extends XmlSerializerBuilder {
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaSerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaSerializerSession.java
index e451ea4..fcee7d4 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaSerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaSerializerSession.java
@@ -37,6 +37,7 @@ import org.w3c.dom.ls.*;
* This class is NOT thread safe.
* It is typically discarded after one-time use although it can be reused within the same thread.
*/
+@Deprecated
public class XmlSchemaSerializerSession extends XmlSerializerSession {
/**
@@ -333,6 +334,7 @@ public class XmlSchemaSerializerSession extends XmlSerializerSession {
if (! (cm.isMapOrBean() || cm.isCollectionOrArray() || (cm.isAbstract() && ! cm.isNumber()) || cm.isObject())) {
w.oTag(i+1, "attribute").attr("name", getBeanTypePropertyName(cm)).attr("type", "string").ceTag().nl(i+1);
+ w.oTag(i+1, "attribute").attr("name", getNamePropertyName()).attr("type", "string").ceTag().nl(i+1);
} else {
@@ -493,10 +495,8 @@ public class XmlSchemaSerializerSession extends XmlSerializerSession {
}
if (! hasAnyAttrs) {
- w.oTag(i+1, "attribute")
- .attr("name", getBeanTypePropertyName(null))
- .attr("type", "string")
- .ceTag().nl(i+1);
+ w.oTag(i+1, "attribute").attr("name", getBeanTypePropertyName(null)).attr("type", "string").ceTag().nl(i+1);
+ w.oTag(i+1, "attribute").attr("name", getNamePropertyName()).attr("type", "string").ceTag().nl(i+1);
}
}
diff --git a/juneau-doc/docs/ReleaseNotes/8.1.4.html b/juneau-doc/docs/ReleaseNotes/8.1.4.html
index aa33c3b..9008dc2 100644
--- a/juneau-doc/docs/ReleaseNotes/8.1.4.html
+++ b/juneau-doc/docs/ReleaseNotes/8.1.4.html
@@ -24,6 +24,9 @@
<ja>@BeanIgnore</ja> and <ja>@Bean</ja> annotations can alternately occur in parent class hierarchy.
The first one found dictates whether a class is ignored as a bean or not.
<li>
+ Several bug fixes in the {@link HtmlSerializer} and {@link HtmlParser} classes around the handling of
+ collections and arrays of beans with <c><ja>@Bean</ja>(typeName)</c> annotations.
+ <li>
New {@link oaj.ObjectMap(Object...)} constructor.
<li>
New swaps auto-added to all serializers/parsers:
@@ -31,6 +34,8 @@
<li class='jc'>{@link oaj.transforms.MatchResultSwap}
<li class='jc'>{@link oaj.transforms.StackTraceElementSwap}
</ul>
+ <li>
+ HTML-Schema support is being deprecated due to low-use and difficulty in maintaining. It will be removed in 9.0.
</ul>
<h5 class='topic w800'>juneau-rest-server</h5>
diff --git a/juneau-doc/src/main/javadoc/overview.html b/juneau-doc/src/main/javadoc/overview.html
index 3a9defc..25e69d3 100644
--- a/juneau-doc/src/main/javadoc/overview.html
+++ b/juneau-doc/src/main/javadoc/overview.html
@@ -558,6 +558,7 @@
<li><p><a class='doclink' href='#juneau-petstore.Installing'>Installing in Eclipse</a><span class='update'><b>8.1.4-new</b></span></p>
<li><p><a class='doclink' href='#juneau-petstore.Running'>Running Petstore manually</a><span class='update'><b>8.1.4-new</b></span></p>
<li><p><a class='doclink' href='#juneau-petstore.Building'>Building and Running from Command-Line (Using Dockerfiles)</a><span class='update'><b>8.1.4-new</b></span></p>
+ <li><p><a class='doclink' href='#juneau-petstore.PetstoreApp'>About Petstore App <br></a><span class='update'><b>8.1.4-new</b></span></p>
</ol>
<li><p class='toc2'><a class='doclink' href='#Glossaries'>Glossaries</a><span class='update'>8.1.3-new</span></p>
<ol>
@@ -24176,7 +24177,7 @@
server side as well.
</p>
<p class='bpcode w800 console'>
- === HTTP Request (incoming) ====================================================
+ === HTTP Call (incoming) =======================================================
HTTP POST /testUrl
---Headers---
Host: localhost:10000
@@ -28553,6 +28554,72 @@
</ol>
</p>
</div><!-- END: 19.3 - juneau-petstore.Building -->
+
+<!-- ==================================================================================================== -->
+
+<h3 class='topic' onclick='toggle(this)'><a href='#juneau-petstore.PetstoreApp' id='juneau-petstore.PetstoreApp'>19.4 - About Petstore App <br></a><span class='update'><b>8.1.4-new</b></span></h3>
+<div class='topic'><!-- START: 19.4 - juneau-petstore.PetstoreApp -->
+<div style="width: 70%;">
+ <h3 style="color: blue;">
+ What is the Petstore app?
+ </h3>
+ <p>
+
+ Petstore is a simple CRUD (Create, Read, Update and Delete) application,
+ which is meant to demonstrate the advantages of the Apache Juneau library.
+ It is a live example showing how any JAVA back-end developer can use Juneau for parsing,
+ POJO serialization and sending different types of serialized POJOs over REST.
+
+ </p>
+ <h3>What's the project layout?</h3>
+ <p> Petstore application consists of three main parts, which are connected over REST:
+ <ul>
+ <li>Database: Apache Derby.</li>
+ <li>Server: Java Spring Boot. </li>
+ <li>Client: Java Spring Boot or React.</li>
+ </ul>
+ </p>
+
+ <p> Java back-end and front-end runs on: http://localhost:5000;
+ <br>React front-end runs on: http://localhost:3000.
+ </p>
+
+ <p> Project is based on a standard Spring Boot project structure. There are Models, Repositories, Services.
+ <br>The main difference here - no Controller classes or @RestController annotations.
+ Instead of it, we use PetStore.java interface class where REST calls are mapped with different methods.
+ </p>
+ <p>Petstore has three types of DTO objects (database entities): Pets, Orders and Users. </p>
+ <p>All methods for creating, reading, updating or deleting database entities (pets, orders or users) are provided in
+ PetStoreService.java class. </p>
+ <p> Example Pet, Order and User objects are created at program
+ startup and saved in the database using JPA (Java Persistence API) and PetStoreService methods.</p>
+
+ <h3>How does it work ?</h3>
+ <p>
+ <ul>
+
+ <li>To get the data which should be displayed, Petstore app client
+ sends http request GET to the back-end server. The response data goes
+ over the REST connection where POJOs get serialized.
+ Petstore client can get and display different types of the same POJO:
+ simple (standard) json format and other (not standard) formats.
+
+ <li>Response data (array of objects) in standard JSON format here is used to generate table content
+ (for example, all Pets in Store).</li>
+
+ <li>Other types of these objects are displayed in the page section "Content types".
+ Here you can get the same POJOs displayed in different formats: json simple, json schema,
+ www form urlencoded, octal/msg, html, html schema, html stripped, openapi, plain text, uon, xml, xml
+ schema, xml soap.
+ </li>
+ <li>All readable table content and visual representation of the different content types are generated from
+ the response data.</li>
+ </ul>
+
+ </p>
+
+</div>
+</div><!-- END: 19.4 - juneau-petstore.PetstoreApp -->
</div><!-- END: 19 - juneau-petstore -->
<!-- ==================================================================================================== -->
@@ -37536,6 +37603,17 @@
<h5 class='topic w800'>juneau-marshall</h5>
<ul class='spaced-list'>
+ <li>
+ <ja>@BeanIgnore</ja> and <ja>@Bean</ja> annotations can alternately occur in parent class hierarchy.
+ The first one found dictates whether a class is ignored as a bean or not.
+ <li>
+ New {@link org.apache.juneau.ObjectMap(Object...)} constructor.
+ <li>
+ New swaps auto-added to all serializers/parsers:
+ <ul>
+ <li class='jc'>{@link org.apache.juneau.transforms.MatchResultSwap}
+ <li class='jc'>{@link org.apache.juneau.transforms.StackTraceElementSwap}
+ </ul>
</ul>
<h5 class='topic w800'>juneau-rest-server</h5>
@@ -37553,7 +37631,12 @@
<h5 class='topic w800'>juneau-rest-client</h5>
<ul class='spaced-list'>
<li>
- New {@link org.apache.juneau.rest.client.RestCallHandler} interface for custom handling of HTTP requests.
+ Completely revamped RestClient API.
+ <ul>
+ <li>All APIs now extend from HttpClient interfaces.
+ <li>Better integration with HttpClient.
+ <li>New fluent-style methods with many new convenience methods.
+ </ul>
</ul>
<h5 class='topic w800'>juneau-doc</h5>
diff --git a/juneau-doc/src/main/javadoc/resources/docs.txt b/juneau-doc/src/main/javadoc/resources/docs.txt
index 7baa1eb..431f797 100644
--- a/juneau-doc/src/main/javadoc/resources/docs.txt
+++ b/juneau-doc/src/main/javadoc/resources/docs.txt
@@ -241,6 +241,7 @@ juneau-microservice-jetty.UiCustomization = #juneau-microservice-jetty.UiCustomi
juneau-petstore = #juneau-petstore, Overview > juneau-pestore
juneau-petstore.Building = #juneau-petstore.Building, Overview > juneau-pestore > Building and Running from Command-Line (Using Dockerfiles)
juneau-petstore.Installing = #juneau-petstore.Installing, Overview > juneau-pestore > Installing in Eclipse
+juneau-petstore.PetstoreApp = #juneau-petstore.PetstoreApp, Overview > juneau-pestore > About Petstore App <br>
juneau-petstore.Running = #juneau-petstore.Running, Overview > juneau-pestore > Running Petstore manually
juneau-rest-client = #juneau-rest-client, Overview > juneau-rest-client
juneau-rest-client.Authentication = #juneau-rest-client.Authentication, Overview > juneau-rest-client > Authentication
diff --git a/juneau-doc/src/main/javadoc/resources/fragments/toc.html b/juneau-doc/src/main/javadoc/resources/fragments/toc.html
index 1020149..248bebf 100644
--- a/juneau-doc/src/main/javadoc/resources/fragments/toc.html
+++ b/juneau-doc/src/main/javadoc/resources/fragments/toc.html
@@ -412,6 +412,7 @@
<li><p><a class='doclink' href='{OVERVIEW_URL}#juneau-petstore.Installing'>Installing in Eclipse</a><span class='update'><b>8.1.4-new</b></span></p>
<li><p><a class='doclink' href='{OVERVIEW_URL}#juneau-petstore.Running'>Running Petstore manually</a><span class='update'><b>8.1.4-new</b></span></p>
<li><p><a class='doclink' href='{OVERVIEW_URL}#juneau-petstore.Building'>Building and Running from Command-Line (Using Dockerfiles)</a><span class='update'><b>8.1.4-new</b></span></p>
+ <li><p><a class='doclink' href='{OVERVIEW_URL}#juneau-petstore.PetstoreApp'>About Petstore App <br></a><span class='update'><b>8.1.4-new</b></span></p>
</ol>
<li><p class='toc2'><a class='doclink' href='{OVERVIEW_URL}#Glossaries'>Glossaries</a><span class='update'>8.1.3-new</span></p>
<ol>
diff --git a/juneau-examples/juneau-examples-rest-jetty-ftest/src/test/java/org/apache/juneau/examples/rest/TestUtils.java b/juneau-examples/juneau-examples-rest-jetty-ftest/src/test/java/org/apache/juneau/examples/rest/TestUtils.java
index 4642866..3a12445 100644
--- a/juneau-examples/juneau-examples-rest-jetty-ftest/src/test/java/org/apache/juneau/examples/rest/TestUtils.java
+++ b/juneau-examples/juneau-examples-rest-jetty-ftest/src/test/java/org/apache/juneau/examples/rest/TestUtils.java
@@ -17,25 +17,19 @@ import static org.apache.juneau.internal.StringUtils.*;
import static org.apache.juneau.internal.IOUtils.*;
import java.io.*;
-import java.util.*;
import java.util.regex.*;
-import javax.xml.*;
import javax.xml.parsers.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.*;
import javax.xml.transform.stream.*;
-import javax.xml.validation.*;
-import org.apache.juneau.*;
import org.apache.juneau.json.*;
import org.apache.juneau.serializer.*;
import org.apache.juneau.transforms.*;
import org.apache.juneau.xml.*;
import org.junit.*;
import org.w3c.dom.*;
-import org.w3c.dom.bootstrap.*;
-import org.w3c.dom.ls.*;
import org.xml.sax.*;
public class TestUtils {
@@ -159,69 +153,6 @@ public class TestUtils {
System.err.println(String.format("%4s:" + lines[i], i+1)); // NOT DEBUG
}
- /**
- * Validates that the specified XML conforms to the specified schema.
- */
- private static void validateXml(String xml, String xmlSchema) throws Exception {
- // parse an XML document into a DOM tree
- DocumentBuilderFactory f = DocumentBuilderFactory.newInstance();
- f.setNamespaceAware(true);
- DocumentBuilder documentBuilder = f.newDocumentBuilder();
- Document document = documentBuilder.parse(new InputSource(new StringReader(xml)));
-
- // create a SchemaFactory capable of understanding WXS schemas
- SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
-
- if (xmlSchema.indexOf('\u0000') != -1) {
-
- // Break it up into a map of namespaceURI->schema document
- final Map<String,String> schemas = new HashMap<>();
- String[] ss = xmlSchema.split("\u0000");
- xmlSchema = ss[0];
- for (String s : ss) {
- Matcher m = pTargetNs.matcher(s);
- if (m.find())
- schemas.put(m.group(1), s);
- }
-
- // Create a custom resolver
- factory.setResourceResolver(
- new LSResourceResolver() {
-
- @Override /* LSResourceResolver */
- public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) {
-
- String schema = schemas.get(namespaceURI);
- if (schema == null)
- throw new FormattedRuntimeException("No schema found for namespaceURI ''{0}''", namespaceURI);
-
- try {
- DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();
- DOMImplementationLS domImplementationLS = (DOMImplementationLS)registry.getDOMImplementation("LS 3.0");
- LSInput in = domImplementationLS.createLSInput();
- in.setCharacterStream(new StringReader(schema));
- in.setSystemId(systemId);
- return in;
-
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
- }
- );
- }
-
- Schema schema = factory.newSchema(new StreamSource(new StringReader(xmlSchema)));
-
- // create a Validator instance, which can be used to validate an instance document
- Validator validator = schema.newValidator();
-
- // validate the DOM tree
- validator.validate(new DOMSource(document));
- }
-
- private static Pattern pTargetNs = Pattern.compile("targetNamespace=['\"]([^'\"]+)['\"]");
-
public static void validateXml(Object o) throws Exception {
validateXml(o, XmlSerializer.DEFAULT_NS_SQ);
}
@@ -233,17 +164,11 @@ public class TestUtils {
s = s.builder().ws().ns().addNamespaceUrisToRoot().build();
String xml = s.serialize(o);
- String xmlSchema = null;
try {
- xmlSchema = s.getSchemaSerializer().serialize(o);
TestUtils.checkXmlWhitespace(xml);
- TestUtils.checkXmlWhitespace(xmlSchema);
- TestUtils.validateXml(xml, xmlSchema);
} catch (Exception e) {
System.err.println("---XML---"); // NOT DEBUG
System.err.println(xml); // NOT DEBUG
- System.err.println("---XMLSchema---"); // NOT DEBUG
- System.err.println(xmlSchema); // NOT DEBUG
throw e;
}
}
diff --git a/juneau-rest/juneau-rest-server-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/BasicProvider.java b/juneau-rest/juneau-rest-server-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/BasicProvider.java
index bdd9b90..b736078 100644
--- a/juneau-rest/juneau-rest-server-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/BasicProvider.java
+++ b/juneau-rest/juneau-rest-server-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/BasicProvider.java
@@ -76,5 +76,6 @@ import org.apache.juneau.xmlschema.XmlSchemaDocSerializer;
UrlEncodingParser.class,
}
)
+@SuppressWarnings("deprecation")
public final class BasicProvider extends BaseProvider {}
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestConfig.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestConfig.java
index 6d0f9aa..3611372 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestConfig.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestConfig.java
@@ -144,6 +144,7 @@ import org.apache.juneau.xmlschema.XmlSchemaDocSerializer;
SwaggerUI.class
}
)
+@SuppressWarnings("deprecation")
public interface BasicRestConfig {
/**
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestServlet.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestServlet.java
index af76bae..9b60cad 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestServlet.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestServlet.java
@@ -56,11 +56,6 @@ import org.apache.juneau.xml.*;
* <td>{@link XmlDocSerializer}</td>
* </tr>
* <tr>
- * <td class='code'>text/xml+schema</td>
- * <td class='code'>text/xml</td>
- * <td>{@link org.apache.juneau.xmlschema.XmlSchemaDocSerializer}</td>
- * </tr>
- * <tr>
* <td class='code'>text/html</td>
* <td class='code'>text/html</td>
* <td>{@link HtmlDocSerializer}</td>
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
index 4a60ea3..57b7d61 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
@@ -73,7 +73,6 @@ import org.apache.juneau.uon.*;
import org.apache.juneau.urlencoding.*;
import org.apache.juneau.utils.*;
import org.apache.juneau.xml.*;
-import org.apache.juneau.xmlschema.XmlSchemaDocSerializer;
/**
* Contains all the configuration on a REST resource and the entry points for handling REST calls.
@@ -2674,7 +2673,6 @@ public final class RestContext extends BeanContext {
* <li class='jc'>{@link SimpleJsonSerializer}
* <li class='jc'>{@link JsonSchemaSerializer}
* <li class='jc'>{@link XmlDocSerializer}
- * <li class='jc'>{@link XmlSchemaDocSerializer}
* <li class='jc'>{@link UonSerializer}
* <li class='jc'>{@link UrlEncodingSerializer}
* <li class='jc'>{@link MsgPackSerializer}
@@ -3430,34 +3428,34 @@ public final class RestContext extends BeanContext {
return Collections.unmodifiableMap(REGISTRY);
}
- public static final Set<MethodExecStats> getGlobalExecStats() {
- Set<MethodExecStats> s = new TreeSet<>();
- for (RestContext rc : REGISTRY.values())
- s.addAll(rc.getMethodExecStats());
- return s;
- }
-
-// public static final Set<ExceptionStats> getGlobalExceptions() {
-// Set<ExceptionStats> s = new TreeSet<>();
+// public static final Set<MethodExecStats> getGlobalExecStats() {
+// Set<MethodExecStats> s = new TreeSet<>();
// for (RestContext rc : REGISTRY.values())
-// s.addAll(rc.getStackTraceDb().getClonedStackTraceInfos());
+// s.addAll(rc.getMethodExecStats());
+// return s;
+// }
+//
+//// public static final Set<ExceptionStats> getGlobalExceptions() {
+//// Set<ExceptionStats> s = new TreeSet<>();
+//// for (RestContext rc : REGISTRY.values())
+//// s.addAll(rc.getStackTraceDb().getClonedStackTraceInfos());
+//// return s;
+//// }
+//
+// public static final Set<StatusStats> getGlobalStatusStats() {
+// Set<StatusStats> s = new TreeSet<>();
+// for (RestContext rc : REGISTRY.values()) {
+// StatusStats ss = StatusStats.create(rc.getResource().getClass());
+// s.add(ss);
+// for (RestMethodContext rmc : rc.getCallMethods().values()) {
+// StatusStats.Method ssm = ss.getMethod(rmc.method);
+// for (Map.Entry<Integer,Integer> e : rmc.getStatusCodes().entrySet()) {
+// ssm.status(e.getKey(), e.getValue());
+// }
+// }
+// }
// return s;
// }
-
- public static final Set<StatusStats> getGlobalStatusStats() {
- Set<StatusStats> s = new TreeSet<>();
- for (RestContext rc : REGISTRY.values()) {
- StatusStats ss = StatusStats.create(rc.getResource().getClass());
- s.add(ss);
- for (RestMethodContext rmc : rc.getCallMethods().values()) {
- StatusStats.Method ssm = ss.getMethod(rmc.method);
- for (Map.Entry<Integer,Integer> e : rmc.getStatusCodes().entrySet()) {
- ssm.status(e.getKey(), e.getValue());
- }
- }
- }
- return s;
- }
//-------------------------------------------------------------------------------------------------------------------
// Instance