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 58d8c06 Javadoc updates. 58d8c06 is described below commit 58d8c06aee8d1502a5e6e10665a352ec07ead2a7 Author: JamesBognar <jamesbog...@apache.org> AuthorDate: Mon Mar 5 13:30:17 2018 -0500 Javadoc updates. --- .../main/java/org/apache/juneau/jena/package.html | 164 ------------------- .../main/java/org/apache/juneau/json/package.html | 143 ---------------- .../main/java/org/apache/juneau/uon/package.html | 180 -------------------- .../org/apache/juneau/urlencoding/package.html | 182 --------------------- .../main/java/org/apache/juneau/xml/package.html | 146 ----------------- juneau-doc/src/main/javadoc/overview.html | 46 +----- 6 files changed, 3 insertions(+), 858 deletions(-) diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/package.html b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/package.html index 281451c..426d991 100644 --- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/package.html +++ b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/package.html @@ -65,18 +65,10 @@ <ol> <li><p><a class='doclink' href='#Namespaces'>Namespaces</a></p> <li><p><a class='doclink' href='#UriProperties'>URI properties</a></p> - <li><p><a class='doclink' href='#Collections'>Collections</a></p> <li><p><a class='doclink' href='#RootProperty'>Root property</a></p> <li><p><a class='doclink' href='#TypedLiterals'>Typed literals</a></p> - <li><p><a class='doclink' href='#SerializerConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='#SerializerOtherNotes'>Other notes</a></p> </ol> <li><p><a class='doclink' href='#RdfParser'>RdfParser class</a></p> - <ol> - <li><p><a class='doclink' href='#ParserConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='#ParserOtherNotes'>Other notes</a></p> - </ol> -</ol> <!-- ======================================================================================================== --> @@ -469,101 +461,6 @@ <!-- ======================================================================================================== --> - <a id="Collections"></a> - <h3 class='topic' onclick='toggle(this)'>2.4 - Collections</h3> - <div class='topic'> - <p> - Collections and arrays are converted to RDF sequences. - <br>In our example, let's add a list-of-beans property to our sample class: - </p> - <p class='bcode'> - <jk>public class</jk> Person { - - <jc>// Bean properties</jc> - <jk>public</jk> LinkedList<Address> <jf>addresses</jf> = <jk>new</jk> LinkedList<Address>(); - ... - } - </p> - <p> - The <code>Address</code> class has the following properties defined: - </p> - <p class='bcode'> - <ja>@Rdf</ja>(prefix=<js>"addr"</js>) - <jk>public class</jk> Address { - - <jc>// Bean properties</jc> - <ja>@Rdf</ja>(beanUri=<jk>true</jk>) <jk>public</jk> URI <jf>uri</jf>; - <jk>public</jk> URI <jf>personUri</jf>; - - <jk>public int</jk> <jf>id</jf>; - - <ja>@Rdf</ja>(prefix=<js>"mail"</js>) - <jk>public</jk> String <jf>street</jf>, <jf>city</jf>, <jf>state</jf>; - - <ja>@Rdf</ja>(prefix=<js>"mail"</js>) - <jk>public int</jk> <jf>zip</jf>; - - <jk>public boolean</jk> <jf>isCurrent</jf>; - } - </p> - <p> - Next, add some quick-and-dirty code to add an address to our person bean: - </p> - <p class='bcode'> - <jc>// Create a new serializer (revert back to namespace autodetection).</jc> - RdfSerializer s = RdfSerializer.<jsm>create</jsm>().xmlabbrev().set(RdfProperties.<jsf>RDF_rdfxml_tab</jsf>, 3).build(); - - <jc>// Create our bean.</jc> - Person p = <jk>new</jk> Person(1, <js>"John Smith"</js>, <js>"http://sample/addressBook/person/1"</js>, - <js>"http://sample/addressBook"</js>, <js>"Aug 12, 1946"</js>); - Address a = <jk>new</jk> Address(); - a.<jf>uri</jf> = <jk>new</jk> URI(<js>"http://sample/addressBook/address/1"</js>); - a.<jf>personUri</jf> = <jk>new</jk> URI(<js>"http://sample/addressBook/person/1"</js>); - a.<jf>id</jf> = 1; - a.<jf>street</jf> = <js>"100 Main Street"</js>; - a.<jf>city</jf> = <js>"Anywhereville"</js>; - a.<jf>state</jf> = <js>"NY"</js>; - a.<jf>zip</jf> = 12345; - a.<jf>isCurrent</jf> = <jk>true</jk>; - p.<jf>addresses</jf>.add(a); - </p> - <p> - Now when we run the sample code, we get the following: - </p> - <p class='bcode'> - <xt><rdf:RDF</xt> - <xa>xmlns:rdf</xa>=<xs>"http://www.w3.org/1999/02/22-rdf-syntax-ns#"</xs> - <xa>xmlns:j</xa>=<xs>"http://www.apache.org/juneau/"</xs> - <xa>xmlns:jp</xa>=<xs>"http://www.apache.org/juneaubp/"</xs> - <xa>xmlns:per</xa>=<xs>"http://www.apache.org/person/"</xs> - <b><xa>xmlns:mail</xa>=<xs>"http://www.apache.org/mail/"</xs></b> - <b><xa>xmlns:addr</xa>=<xs>"http://www.apache.org/address/"</xs></b><xt>></xt> - <xt><rdf:Description <xa>rdf:about</xa>=<xs>"http://sample/addressBook/person/1"</xs>></xt> - <xt><per:addressBookUri</xt> <xa>rdf:resource</xa>=<xs>"http://sample/addressBook"</xs><xt>/></xt> - <xt><per:id></xt>1<xt></per:id></xt> - <xt><per:name></xt>John Smith<xt></per:name></xt> - <b><xt><per:addresses></xt> - <xt><rdf:Seq></xt> - <xt><rdf:li></xt> - <xt><rdf:Description <xa>rdf:about</xa>=<xs>"http://sample/addressBook/address/1"</xs>></xt> - <xt><addr:personUri <xa>rdf:resource</xa>=<xs>"http://sample/addressBook/person/1"</xs>/></xt> - <xt><addr:id></xt>1<xt></addr:id></xt> - <xt><mail:street></xt>100 Main Street<xt></mail:street></xt> - <xt><mail:city></xt>Anywhereville<xt></mail:city></xt> - <xt><mail:state></xt>NY<xt></mail:state></xt> - <xt><mail:zip></xt>12345<xt></mail:zip></xt> - <xt><addr:isCurrent></xt>true<xt></addr:isCurrent></xt> - <xt></rdf:Description></xt> - <xt></rdf:li></xt> - <xt></rdf:Seq></xt> - <xt></per:addresses></xt></b> - <xt></rdf:Description></xt> - <xt></rdf:RDF></xt> - </p> - </div> - - - <!-- ======================================================================================================== --> <a id="RootProperty"></a> <h3 class='topic' onclick='toggle(this)'>2.5 - Root property</h3> <div class='topic'> @@ -688,36 +585,6 @@ <xt></rdf:RDF></xt> </p> </div> - - - <!-- ======================================================================================================== --> - <a id="SerializerConfigurableProperties"></a> - <h3 class='topic' onclick='toggle(this)'>2.8 - Configurable properties</h3> - <div class='topic'> - <p> - See the following classes for all configurable properties that can be used on this serializer: - </p> - <ul class='spaced-list'> - <li> - {@link org.apache.juneau.BeanContext} - Bean context properties. - <li> - {@link org.apache.juneau.jena.RdfSerializer} - Serializer context properties. - </ul> - </div> - - - <!-- ======================================================================================================== --> - <a id="SerializerOtherNotes"></a> - <h3 class='topic' onclick='toggle(this)'>2.9 - Other notes</h3> - <div class='topic'> - <ul class='spaced-list'> - <li> - Like all other Juneau serializers, the RDF serializer is thread safe and maintains an internal cache of - bean classes encountered. - For performance reasons, it's recommended that serializers be reused whenever possible instead of always - creating new instances. - </ul> - </div> </div> @@ -807,37 +674,6 @@ ] } </p> - - - <!-- ======================================================================================================== --> - <a id="ParserConfigurableProperties"></a> - <h3 class='topic' onclick='toggle(this)'>3.2 - Configurable properties</h3> - <!-- TODO --> - <div class='topic'> - <p> - See the following classes for all configurable properties that can be used on this parser: - </p> - <ul class='spaced-list'> - <li> - {@link org.apache.juneau.BeanContext} - Bean context properties. - <li> - {@link org.apache.juneau.jena.RdfParser} - Parser context properties. - </ul> - </div> - - <!-- ======================================================================================================== --> - <a id="ParserOtherNotes"></a> - <h3 class='topic' onclick='toggle(this)'>3.3 - Other notes</h3> - <div class='topic'> - <ul class='spaced-list'> - <li> - Like all other Juneau parsers, the RDF parser is thread safe and maintains an internal cache of bean - classes encountered. - For performance reasons, it's recommended that parser be reused whenever possible instead of always - creating new instances. - </ul> - </div> - </div> <p align="center"><i><b>*** fín ***</b></i></p> diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/package.html b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/package.html index bce9595..41c80b3 100644 --- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/package.html +++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/package.html @@ -63,16 +63,10 @@ </ol> <li><p><a class='doclink' href='#JsonSerializer'>JsonSerializer class</a></p> <ol> - <li><p><a class='doclink' href='#Collections'>Collections</a></p> <li><p><a class='doclink' href='#JsonSchemaSupport'>JSON-Schema support</a></p> - <li><p><a class='doclink' href='#SerializerConfigurableProperties'>Configurable properties</a></p> <li><p><a class='doclink' href='#SerializerOtherNotes'>Other notes</a></p> </ol> <li><p><a class='doclink' href='#JsonParser'>JsonParser class</a></p> - <ol> - <li><p><a class='doclink' href='#ParserConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='#ParserOtherNotes'>Other notes</a></p> - </ol> </ol> <!-- ======================================================================================================== --> @@ -303,84 +297,6 @@ <!-- ======================================================================================================== --> - <a id="Collections"></a> - <h3 class='topic' onclick='toggle(this)'>2.2 - Collections</h3> - <div class='topic'> - <p> - In our example, let's add a list-of-beans property to our sample class: - </p> - <p class='bcode'> - <jk>public class</jk> Person { - - <jc>// Bean properties</jc> - <jk>public</jk> LinkedList<Address> <jf>addresses</jf> = <jk>new</jk> LinkedList<Address>(); - ... - } - </p> - <p> - The <code>Address</code> class has the following properties defined: - </p> - <p class='bcode'> - <jk>public class</jk> Address { - - <jc>// Bean properties</jc> - <jk>public</jk> URI <jf>uri</jf>; - <jk>public</jk> URI <jf>personUri</jf>; - <jk>public int</jk> <jf>id</jf>; - <jk>public</jk> String <jf>street</jf>, <jf>city</jf>, <jf>state</jf>; - <jk>public int</jk> <jf>zip</jf>; - <jk>public boolean</jk> <jf>isCurrent</jf>; - } - </p> - <p> - Next, add some quick-and-dirty code to add an address to our person bean: - </p> - <p class='bcode'> - <jc>// Use serializer with readable output, simple mode.</jc> - JsonSerializer s = JsonSerializer.<jsf>DEFAULT_LAX_READABLE</jsf>; - - <jc>// Create our bean.</jc> - Person p = <jk>new</jk> Person(1, <js>"John Smith"</js>, <js>"http://sample/addressBook/person/1"</js>, - <js>"http://sample/addressBook"</js>, <js>"Aug 12, 1946"</js>); - Address a = <jk>new</jk> Address(); - a.<jf>uri</jf> = <jk>new</jk> URI(<js>"http://sample/addressBook/address/1"</js>); - a.<jf>personUri</jf> = <jk>new</jk> URI(<js>"http://sample/addressBook/person/1"</js>); - a.<jf>id</jf> = 1; - a.<jf>street</jf> = <js>"100 Main Street"</js>; - a.<jf>city</jf> = <js>"Anywhereville"</js>; - a.<jf>state</jf> = <js>"NY"</js>; - a.<jf>zip</jf> = 12345; - a.<jf>isCurrent</jf> = <jk>true</jk>; - p.<jf>addresses</jf>.add(a); - </p> - <p> - Now when we run the sample code, we get the following: - </p> - <p class='bcode'> - { - id: <jk>1</jk>, - name: <js>'John Smith'</js>, - uri: <js>'http://sample/addressBook/person/1'</js>, - addressBookUri: <js>'http://sample/addressBook'</js>, - birthDate: <js>'1946-08-12T00:00:00Z'</js>, - addresses: [ - { - uri: <js>'http://sample/addressBook/address/1'</js>, - personUri: <js>'http://sample/addressBook/person/1'</js>, - id: <jk>1</jk>, - street: <js>'100 Main Street'</js>, - city: <js>'Anywhereville'</js>, - state: <js>'NY'</js>, - zip: <jk>12345</jk>, - isCurrent: <jk>true</jk> - } - ] - } - </p> - </div> - - - <!-- ======================================================================================================== --> <a id="JsonSchemaSupport"></a> <h3 class='topic' onclick='toggle(this)'>2.3 - JSON-Schema support</h3> <div class='topic'> @@ -530,34 +446,6 @@ </p> </div> - <!-- ======================================================================================================== --> - <a id="SerializerConfigurableProperties"></a> - <h3 class='topic' onclick='toggle(this)'>2.5 - Configurable properties</h3> - <div class='topic'> - <p> - See the following classes for all configurable properties that can be used on this serializer: - </p> - <ul class='spaced-list'> - <li> - {@link org.apache.juneau.BeanContext} - Bean context properties. - <li> - {@link org.apache.juneau.json.JsonSerializer} - Serializer context properties. - </ul> - </div> - - - <!-- ======================================================================================================== --> - <a id="SerializerOtherNotes"></a> - <h3 class='topic' onclick='toggle(this)'>2.6 - Other notes</h3> - <div class='topic'> - <ul class='spaced-list'> - <li> - Like all other Juneau serializers, the JSON serializer is thread safe and maintains an internal cache - of bean classes encountered. - <br>For performance reasons, it's recommended that serializers be reused whenever possible instead of - always creating new instances. - </ul> - </div> </div> @@ -672,37 +560,6 @@ ] } </p> - - - <!-- ======================================================================================================== --> - <a id="ParserConfigurableProperties"></a> - <h3 class='topic' onclick='toggle(this)'>3.2 - Configurable properties</h3> - <div class='topic'> - <p> - See the following classes for all configurable properties that can be used on this parser: - </p> - <ul class='spaced-list'> - <li> - {@link org.apache.juneau.BeanContext} - Bean context properties. - <li> - {@link org.apache.juneau.json.JsonParser} - Serializer context properties. - </ul> - </div> - - - <!-- ======================================================================================================== --> - <a id="ParserOtherNotes"></a> - <h3 class='topic' onclick='toggle(this)'>3.3 - Other notes</h3> - <div class='topic'> - <ul class='spaced-list'> - <li> - Like all other Juneau parsers, the JSON parser is thread safe and maintains an internal cache of bean - classes encountered. - <br>For performance reasons, it's recommended that parser be reused whenever possible instead of always - creating new instances. - </ul> - </div> - </div> <p align="center"><i><b>*** fín ***</b></i></p> diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/uon/package.html b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/uon/package.html index eb457ba..152e263 100644 --- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/uon/package.html +++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/uon/package.html @@ -62,16 +62,7 @@ <li><p><a class='doclink' href='#OverviewExample'>Example</a></p> </ol> <li><p><a class='doclink' href='#UrlEncodingSerializer'>UrlEncodingSerializer and UonSerializer classes</a></p> - <ol> - <li><p><a class='doclink' href='#Collections'>Collections</a></p> - <li><p><a class='doclink' href='#SerializerConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='#SerializerOtherNotes'>Other notes</a></p> - </ol> <li><p><a class='doclink' href='#UrlEncodingParser'>UrlEncodingParser and UonParser classes</a></p> - <ol> - <li><p><a class='doclink' href='#ParserConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='#ParserOtherNotes'>Other notes</a></p> - </ol> </ol> <!-- ======================================================================================================== --> @@ -422,144 +413,6 @@ By default, the <code>UrlEncodingSerializer</code> class will URL-Encode special characters, and the <code>UonSerializer</code> will NOT URL-encode special characters. </p> - - - <!-- ======================================================================================================== --> - <a id="Collections"></a> - <h3 class='topic' onclick='toggle(this)'>2.2 - Collections</h3> - <div class='topic'> - <p> - In our example, let's add a list-of-beans property to our sample class: - </p> - <p class='bcode'> - <jk>public class</jk> Person { - - <jc>// Bean properties</jc> - <jk>public</jk> LinkedList<Address> <jf>addresses</jf> = <jk>new</jk> LinkedList<Address>(); - ... - } - </p> - <p> - The <code>Address</code> class has the following properties defined: - </p> - <p class='bcode'> - <jk>public class</jk> Address { - - <jc>// Bean properties</jc> - <jk>public</jk> URI <jf>uri</jf>; - <jk>public</jk> URI <jf>personUri</jf>; - <jk>public int</jk> <jf>id</jf>; - <jk>public</jk> String <jf>street</jf>, <jf>city</jf>, <jf>state</jf>; - <jk>public int</jk> <jf>zip</jf>; - <jk>public boolean</jk> <jf>isCurrent</jf>; - } - </p> - <p> - Next, add some quick-and-dirty code to add an address to our person bean: - </p> - <p class='bcode'> - <jc>// Use serializer with readable output, simple mode.</jc> - UonSerializer s = UonSerializer.<jsf>DEFAULT_READABLE</jsf>; - - <jc>// Create our bean.</jc> - Person p = <jk>new</jk> Person(1, <js>"John Smith"</js>, <js>"http://sample/addressBook/person/1"</js>, - <js>"http://sample/addressBook"</js>, <js>"Aug 12, 1946"</js>); - Address a = <jk>new</jk> Address(); - a.<jf>uri</jf> = <jk>new</jk> URI(<js>"http://sample/addressBook/address/1"</js>); - a.<jf>personUri</jf> = <jk>new</jk> URI(<js>"http://sample/addressBook/person/1"</js>); - a.<jf>id</jf> = 1; - a.<jf>street</jf> = <js>"100 Main Street"</js>; - a.<jf>city</jf> = <js>"Anywhereville"</js>; - a.<jf>state</jf> = <js>"NY"</js>; - a.<jf>zip</jf> = 12345; - a.<jf>isCurrent</jf> = <jk>true</jk>; - p.<jf>addresses</jf>.add(a); - </p> - <p> - Now when we run the sample code, we get the following (in readable format): - </p> - <p class='bcode'> - ( - <ua>id</ua>=<un>1</un>, - <ua>name</ua>=<us>'John+Smith'</us>, - <ua>uri</ua>=<us>http://sample/addressBook/person/1</us>, - <ua>addressBookUri</ua>=<us>http://sample/addressBook</us>, - <ua>birthDate</ua>=<us>1946-08-12T00:00:00Z</us>, - <ua>addresses</ua>=@( - ( - <ua>uri</ua>=<us>http://sample/addressBook/address/1</us>, - <ua>personUri</ua>=<us>http://sample/addressBook/person/1</us>, - <ua>id</ua>=<un>1</un>, - <ua>street</ua>=<us>'100+Main+Street'</us>, - <ua>city</ua>=<us>Anywhereville</us>, - <ua>state</ua>=<us>NY</us>, - <ua>zip</ua>=<un>12345</un>, - <ua>isCurrent</ua>=<uk>true</uk> - ) - ) - ) - </p> - <p> - If we were to use <code>UrlEncodingSerializer</code> instead, we would get the following: - </p> - <p class='bcode'> - <ua>id</ua>=<un>1</un>& - <ua>name</ua>=<us>'John+Smith'</us>& - <ua>uri</ua>=<us>http://sample/addressBook/person/1</us>& - <ua>addressBookUri</ua>=<us>http://sample/addressBook</us>& - <ua>birthDate</ua>=<us>1946-08-12T00:00:00Z</us>& - <ua>addresses</ua>=@( - ( - <ua>uri</ua>=<us>http://sample/addressBook/address/1</us>, - <ua>personUri</ua>=<us>http://sample/addressBook/person/1</us>, - <ua>id</ua>=<un>1</un>, - <ua>street</ua>=<us>'100+Main+Street'</us>, - <ua>city</ua>=<us>Anywhereville</us>, - <ua>state</ua>=<us>NY</us>, - <ua>zip</ua>=<un>12345</un>, - <ua>isCurrent</ua>=<uk>true</uk> - ) - ) - </p> - </div> - <p> - Note how the top level <code>Person</code> bean is serialized using the standard <js>'&'</js> delimiter, - whereas the lower-level <code>Address</code> bean is serialized using the <js>','</js> character to prevent - the <code>addresses</code> field from being incompletely parsed. - </p> - - - <!-- ======================================================================================================== --> - <a id="SerializerConfigurableProperties"></a> - <h3 class='topic' onclick='toggle(this)'>2.4 - Configurable properties</h3> - <div class='topic'> - <p> - See the following classes for all configurable properties that can be used on this serializer: - </p> - <ul class='spaced-list'> - <li> - {@link org.apache.juneau.BeanContext} - Bean context properties. - <li> - {@link org.apache.juneau.uon.UonSerializer} - UON serializer context properties. - <li> - {@link org.apache.juneau.urlencoding.UrlEncodingSerializer} - URL-Encoding serializer context - properties. - </ul> - </div> - - - <!-- ======================================================================================================== --> - <a id="SerializerOtherNotes"></a> - <h3 class='topic' onclick='toggle(this)'>2.5 - Other notes</h3> - <div class='topic'> - <ul class='spaced-list'> - <li> - Like all other Juneau serializers, the URL-encoding serializers are thread safe and maintain an - internal cache of bean classes encountered. - <br>For performance reasons, it's recommended that serializers be reused whenever possible instead of - always creating new instances. - </ul> - </div> </div> @@ -685,39 +538,6 @@ ] } </p> - - - <!-- ======================================================================================================== --> - <a id="ParserConfigurableProperties"></a> - <h3 class='topic' onclick='toggle(this)'>3.2 - Configurable properties</h3> - <div class='topic'> - <p> - See the following classes for all configurable properties that can be used on this parser: - </p> - <ul class='spaced-list'> - <li> - {@link org.apache.juneau.BeanContext} - Bean context properties. - <li> - {@link org.apache.juneau.uon.UonParser} - UON parser context properties. - <li> - {@link org.apache.juneau.urlencoding.UrlEncodingParser} - URL-Encoding parser context properties. - </ul> - </div> - - - <!-- ======================================================================================================== --> - <a id="ParserOtherNotes"></a> - <h3 class='topic' onclick='toggle(this)'>3.3 - Other notes</h3> - <div class='topic'> - <ul class='spaced-list'> - <li> - Like all other Juneau parsers, the URL-encoding parsers are thread safe and maintain an internal cache - of bean classes encountered. - <br>For performance reasons, it's recommended that parser be reused whenever possible instead of always - creating new instances. - </ul> - </div> - </div> <p align="center"><i><b>*** fín ***</b></i></p> diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/urlencoding/package.html b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/urlencoding/package.html index 721625a..6a23232 100644 --- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/urlencoding/package.html +++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/urlencoding/package.html @@ -62,16 +62,7 @@ <li><p><a class='doclink' href='#OverviewExample'>Example</a></p> </ol> <li><p><a class='doclink' href='#UrlEncodingSerializer'>UrlEncodingSerializer and UonSerializer classes</a></p> - <ol> - <li><p><a class='doclink' href='#Collections'>Collections</a></p> - <li><p><a class='doclink' href='#SerializerConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='#SerializerOtherNotes'>Other notes</a></p> - </ol> <li><p><a class='doclink' href='#UrlEncodingParser'>UrlEncodingParser and UonParser classes</a></p> - <ol> - <li><p><a class='doclink' href='#ParserConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='#ParserOtherNotes'>Other notes</a></p> - </ol> </ol> <!-- ======================================================================================================== --> @@ -422,146 +413,6 @@ By default, the <code>UrlEncodingSerializer</code> class will URL-Encode special characters, and the <code>UonSerializer</code> will NOT URL-encode special characters. </p> - - - <!-- ======================================================================================================== --> - <a id="Collections"></a> - <h3 class='topic' onclick='toggle(this)'>2.2 - Collections</h3> - <div class='topic'> - <p> - In our example, let's add a list-of-beans property to our sample class: - </p> - <p class='bcode'> - <jk>public class</jk> Person { - - <jc>// Bean properties</jc> - <jk>public</jk> LinkedList<Address> <jf>addresses</jf> = <jk>new</jk> LinkedList<Address>(); - ... - } - </p> - <p> - The <code>Address</code> class has the following properties defined: - </p> - <p class='bcode'> - <jk>public class</jk> Address { - - <jc>// Bean properties</jc> - <jk>public</jk> URI <jf>uri</jf>; - <jk>public</jk> URI <jf>personUri</jf>; - <jk>public int</jk> <jf>id</jf>; - <jk>public</jk> String <jf>street</jf>, <jf>city</jf>, <jf>state</jf>; - <jk>public int</jk> <jf>zip</jf>; - <jk>public boolean</jk> <jf>isCurrent</jf>; - } - </p> - <p> - Next, add some quick-and-dirty code to add an address to our person bean: - </p> - <p class='bcode'> - <jc>// Use serializer with readable output, simple mode.</jc> - UonSerializer s = UonSerializer.<jsf>DEFAULT_READABLE</jsf>; - - <jc>// Create our bean.</jc> - Person p = <jk>new</jk> Person(1, <js>"John Smith"</js>, <js>"http://sample/addressBook/person/1"</js>, - <js>"http://sample/addressBook"</js>, <js>"Aug 12, 1946"</js>); - Address a = <jk>new</jk> Address(); - a.<jf>uri</jf> = <jk>new</jk> URI(<js>"http://sample/addressBook/address/1"</js>); - a.<jf>personUri</jf> = <jk>new</jk> URI(<js>"http://sample/addressBook/person/1"</js>); - a.<jf>id</jf> = 1; - a.<jf>street</jf> = <js>"100 Main Street"</js>; - a.<jf>city</jf> = <js>"Anywhereville"</js>; - a.<jf>state</jf> = <js>"NY"</js>; - a.<jf>zip</jf> = 12345; - a.<jf>isCurrent</jf> = <jk>true</jk>; - p.<jf>addresses</jf>.add(a); - </p> - <p> - Now when we run the sample code, we get the following (in readable format): - </p> - <p class='bcode'> - ( - <ua>id</ua>=<un>1</un>, - <ua>name</ua>=<us>'John+Smith'</us>, - <ua>uri</ua>=<us>http://sample/addressBook/person/1</us>, - <ua>addressBookUri</ua>=<us>http://sample/addressBook</us>, - <ua>birthDate</ua>=<us>1946-08-12T00:00:00Z</us>, - <ua>addresses</ua>=@( - ( - <ua>uri</ua>=<us>http://sample/addressBook/address/1</us>, - <ua>personUri</ua>=<us>http://sample/addressBook/person/1</us>, - <ua>id</ua>=<un>1</un>, - <ua>street</ua>=<us>'100+Main+Street'</us>, - <ua>city</ua>=<us>Anywhereville</us>, - <ua>state</ua>=<us>NY</us>, - <ua>zip</ua>=<un>12345</un>, - <ua>isCurrent</ua>=<uk>true</uk> - ) - ) - ) - </p> - <p> - If we were to use <code>UrlEncodingSerializer</code> instead, we would get the following: - </p> - <p class='bcode'> - <ua>id</ua>=<un>1</un>& - <ua>name</ua>=<us>'John+Smith'</us>& - <ua>uri</ua>=<us>http://sample/addressBook/person/1</us>& - <ua>addressBookUri</ua>=<us>http://sample/addressBook</us>& - <ua>birthDate</ua>=<us>1946-08-12T00:00:00Z</us>& - <ua>addresses</ua>=@( - ( - <ua>uri</ua>=<us>http://sample/addressBook/address/1</us>, - <ua>personUri</ua>=<us>http://sample/addressBook/person/1</us>, - <ua>id</ua>=<un>1</un>, - <ua>street</ua>=<us>'100+Main+Street'</us>, - <ua>city</ua>=<us>Anywhereville</us>, - <ua>state</ua>=<us>NY</us>, - <ua>zip</ua>=<un>12345</un>, - <ua>isCurrent</ua>=<uk>true</uk> - ) - ) - </p> - </div> - <p> - Note how the top level <code>Person</code> bean is serialized using the standard <js>'&'</js> delimiter, - whereas the lower-level <code>Address</code> bean is serialized using the <js>','</js> character to prevent - the <code>addresses</code> field from being incompletely parsed. - </p> - - - <!-- ======================================================================================================== --> - <a id="SerializerConfigurableProperties"></a> - <h3 class='topic' onclick='toggle(this)'>2.4 - Configurable properties</h3> - <div class='topic'> - <p> - See the following classes for all configurable properties that can be used on this serializer: - </p> - <ul class='spaced-list'> - <li> - {@link org.apache.juneau.BeanContext} - - Bean context properties. - <li> - {@link org.apache.juneau.uon.UonSerializer} - - UON serializer context properties. - <li> - {@link org.apache.juneau.urlencoding.UrlEncodingSerializer} - - URL-Encoding serializer context properties. - </ul> - </div> - - - <!-- ======================================================================================================== --> - <a id="SerializerOtherNotes"></a> - <h3 class='topic' onclick='toggle(this)'>2.5 - Other notes</h3> - <div class='topic'> - <ul class='spaced-list'> - <li> - Like all other Juneau serializers, the URL-encoding serializers are thread safe and maintain an internal - cache of bean classes encountered. - <br>For performance reasons, it's recommended that serializers be reused whenever possible instead of - always creating new instances. - </ul> - </div> </div> @@ -687,39 +538,6 @@ ] } </p> - - - <!-- ======================================================================================================== --> - <a id="ParserConfigurableProperties"></a> - <h3 class='topic' onclick='toggle(this)'>3.2 - Configurable properties</h3> - <div class='topic'> - <p> - See the following classes for all configurable properties that can be used on this parser: - </p> - <ul class='spaced-list'> - <li> - {@link org.apache.juneau.BeanContext} - Bean context properties. - <li> - {@link org.apache.juneau.uon.UonParser} - UON parser context properties. - <li> - {@link org.apache.juneau.urlencoding.UrlEncodingParser} - URL-Encoding parser context properties. - </ul> - </div> - - - <!-- ======================================================================================================== --> - <a id="ParserOtherNotes"></a> - <h3 class='topic' onclick='toggle(this)'>3.3 - Other notes</h3> - <div class='topic'> - <ul class='spaced-list'> - <li> - Like all other Juneau parsers, the URL-encoding parsers are thread safe and maintain an internal cache - of bean classes encountered. - <br>For performance reasons, it's recommended that parser be reused whenever possible instead of always - creating new instances. - </ul> - </div> - </div> <p align="center"><i><b>*** fín ***</b></i></p> diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/package.html b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/package.html index 6649d97..499dbfe 100644 --- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/package.html +++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/package.html @@ -74,16 +74,9 @@ <ol> <li><p><a class='doclink' href='#AutoDetectNamespaces'>Auto-detection of namespaces</a></p> </ol> - <li><p><a class='doclink' href='#Collections'>Collections</a></p> <li><p><a class='doclink' href='#XmlSchemaSupport'>XML-Schema support</a></p> - <li><p><a class='doclink' href='#SerializerConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='#SerializerOtherNotes'>Other notes</a></p> </ol> <li><p><a class='doclink' href='#XmlParser'>XmlParser class</a></p> - <ol> - <li><p><a class='doclink' href='#ParserConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='#ParserOtherNotes'>Other notes</a></p> - </ol> </ol> @@ -2177,89 +2170,6 @@ </div> - - <!-- ======================================================================================================== --> - <a id="Collections"></a> - <h3 class='topic' onclick='toggle(this)'>2.5 - Collections</h3> - <div class='topic'> - <p> - In our example, let's add a list-of-beans property to our sample class: - </p> - <p class='bcode'> - <jk>public class</jk> Person { - - <jc>// Bean properties</jc> - <jk>public</jk> LinkedList<Address> <jf>addresses</jf> = <jk>new</jk> LinkedList<Address>(); - ... - } - </p> - <p> - The <code>Address</code> class has the following properties defined: - </p> - <p class='bcode'> - <ja>@Xml</ja>(prefix=<js>"addr"</js>) - <ja>@Bean</ja>(typeName=<js>"address"</js>) - <jk>public class</jk> Address { - - <jc>// Bean properties</jc> - <ja>@Xml</ja>(format=<jsf>ATTR</jsf>) <jk>public</jk> URI <jf>uri</jf>; - <jk>public</jk> URI <jf>personUri</jf>; - <jk>public int</jk> <jf>id</jf>; - <ja>@Xml</ja>(prefix=<js>"mail"</js>) <jk>public</jk> String <jf>street</jf>, <jf>city</jf>, <jf>state</jf>; - <ja>@Xml</ja>(prefix=<js>"mail"</js>) <jk>public int</jk> <jf>zip</jf>; - <jk>public boolean</jk> <jf>isCurrent</jf>; - } - </p> - <p> - Next, add some quick-and-dirty code to add an address to our person bean: - </p> - <p class='bcode'> - <jc>// Create a new serializer with readable output.</jc> - XmlSerializer s = XmlSerializer.<jsm>create</jsm>().ws().sq().build(); - - <jc>// Create our bean.</jc> - Person p = <jk>new</jk> Person(1, <js>"John Smith"</js>, <js>"http://sample/addressBook/person/1"</js>, - <js>"http://sample/addressBook"</js>, <js>"Aug 12, 1946"</js>); - Address a = <jk>new</jk> Address(); - a.<jf>uri</jf> = <jk>new</jk> URI(<js>"http://sample/addressBook/address/1"</js>); - a.<jf>personUri</jf> = <jk>new</jk> URI(<js>"http://sample/addressBook/person/1"</js>); - a.<jf>id</jf> = 1; - a.<jf>street</jf> = <js>"100 Main Street"</js>; - a.<jf>city</jf> = <js>"Anywhereville"</js>; - a.<jf>state</jf> = <js>"NY"</js>; - a.<jf>zip</jf> = 12345; - a.<jf>isCurrent</jf> = <jk>true</jk>; - p.<jf>addresses</jf>.add(a); - </p> - <p> - Now when we run the sample code, we get the following: - </p> - <p class='bcode'> - <xt><per:person</xt> - <xa>xmlns</xa>=<xs>'http://www.apache.org/2013/Juneau'</xs> - <xa>xmlns:per</xa>=<xs>'http://www.apache.org/person/'</xs> - <xa>xmlns:addr</xa>=<xs>'http://www.apache.org/address/'</xs> - <xa>xmlns:mail</xa>=<xs>'http://www.apache.org/mail/'</xs> - <xa>uri</xa>=<xs>'http://sample/addressBook/person/1'</xs><xt>></xt> - <xt><per:id></xt>1<xt></per:id></xt> - <xt><per:name></xt>John Smith<xt></per:name></xt> - <xt><per:addressBookUri></xt>http://sample/addressBook<xt></per:addressBookUri></xt> - <xt><per:birthDate></xt>1946-08-12T04:00:00Z<xt></per:birthDate></xt> - <xt><per:addresses></xt> - <xt><addr:address</xt> <xa>uri</xa>=<xs>'http://sample/addressBook/address/1'</xs><xt>></xt> - <xt><addr:personUri></xt>http://sample/addressBook/person/1<xt></addr:personUri></xt> - <xt><addr:id></xt>1<xt></addr:id></xt> - <xt><mail:street></xt>100 Main Street<xt></mail:street></xt> - <xt><mail:city></xt>Anywhereville<xt></mail:city></xt> - <xt><mail:state></xt>NY<xt></mail:state></xt> - <xt><mail:zip></xt>12345<xt></mail:zip></xt> - <xt><addr:isCurrent></xt>true<xt></addr:isCurrent></xt> - <xt></addr:address></xt> - <xt></per:addresses></xt> - <xt></per:person></xt> - </p> - </div> - <!-- ======================================================================================================== --> <a id="XmlSchemaSupport"></a> @@ -2597,34 +2507,6 @@ {@link javax.xml.validation.Validator} using the input from the serialize method. </p> </div> - - - <!-- ======================================================================================================== --> - <a id="SerializerConfigurableProperties"></a> - <h3 class='topic' onclick='toggle(this)'>2.8 - Configurable properties</h3> - <div class='topic'> - <p> - See the following classes for all configurable properties that can be used on this serializer: - </p> - <ul> - <li>{@link org.apache.juneau.BeanContext} - Bean context properties. - <li>{@link org.apache.juneau.xml.XmlSerializer} - Serializer context properties. - </ul> - </div> - - - <!-- ======================================================================================================== --> - <a id="SerializerOtherNotes"></a> - <h3 class='topic' onclick='toggle(this)'>2.9 - Other notes</h3> - <div class='topic'> - <ul class='spaced-list'> - <li> - Like all other Juneau serializers, the XML serializer is thread safe and maintains an internal cache of - bean classes encountered. - <br>For performance reasons, it's recommended that serializers be reused whenever possible instead of - always creating new instances. - </ul> - </div> </div> @@ -2728,35 +2610,7 @@ ] } </p> - - <!-- ======================================================================================================== --> - <a id="ParserConfigurableProperties"></a> - <h3 class='topic' onclick='toggle(this)'>3.2 - Configurable properties</h3> - <div class='topic'> - <p> - See the following classes for all configurable properties that can be used on this parser: - </p> - <ul> - <li>{@link org.apache.juneau.BeanContext} - Bean context properties. - <li>{@link org.apache.juneau.xml.XmlParser} - Parser context properties. - </ul> - </div> - - - <!-- ======================================================================================================== --> - <a id="ParserOtherNotes"></a> - <h3 class='topic' onclick='toggle(this)'>3.3 - Other notes</h3> - <div class='topic'> - <ul class='spaced-list'> - <li> - Like all other Juneau parsers, the XML parser is thread safe and maintains an internal cache of bean - classes encountered. - <br>For performance reasons, it's recommended that parser be reused whenever possible instead of always - creating new instances. - </ul> - </div> - </div> <p align="center"><i><b>*** fín ***</b></i></p> diff --git a/juneau-doc/src/main/javadoc/overview.html b/juneau-doc/src/main/javadoc/overview.html index 61a869f..a0e3483 100644 --- a/juneau-doc/src/main/javadoc/overview.html +++ b/juneau-doc/src/main/javadoc/overview.html @@ -3873,14 +3873,14 @@ The {@link org.apache.juneau.serializer.Serializer#SERIALIZER_detectRecursions SERIALIZER_detectRecursions} option on the {@link org.apache.juneau.serializer.Serializer} class can cause a performance penalty of around 20%. - Therefore, it's recommended that this option be used only when necessary. + <br>Therefore, it's recommended that this option be used only when necessary. <li> In general, JSON serialization and parsing is about 20% faster than XML. JSON is also more compact than XML. - MessagePack is fastest and most compact of all. + <br>MessagePack is fastest and most compact of all. <li> The RDF parsers are SLOW. - RDF simply isn't efficient with node traversal, so creating tree structures out of RDF models + <br>RDF simply isn't efficient with node traversal, so creating tree structures out of RDF models is highly inefficient. <li> The {@link org.apache.juneau.parser.Parser} methods that take in {@link org.apache.juneau.ClassMeta} @@ -3915,16 +3915,9 @@ </ol> <li><p><a class='doclink' href='org/apache/juneau/json/package-summary.html#JsonSerializer'>JsonSerializer class</a></p> <ol> - <li><p><a class='doclink' href='org/apache/juneau/json/package-summary.html#Collections'>Collections</a></p> <li><p><a class='doclink' href='org/apache/juneau/json/package-summary.html#JsonSchemaSupport'>JSON-Schema support</a></p> - <li><p><a class='doclink' href='org/apache/juneau/json/package-summary.html#SerializerConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='org/apache/juneau/json/package-summary.html#SerializerOtherNotes'>Other notes</a></p> </ol> <li><p><a class='doclink' href='org/apache/juneau/json/package-summary.html#JsonParser'>JsonParser class</a></p> - <ol> - <li><p><a class='doclink' href='org/apache/juneau/json/package-summary.html#ParserConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='org/apache/juneau/json/package-summary.html#ParserOtherNotes'>Other notes</a></p> - </ol> </ol> <!-- ======================================================================================================= --> @@ -4049,16 +4042,9 @@ <ol> <li><p><a class='doclink' href='org/apache/juneau/xml/package-summary.html#AutoDetectNamespaces'>Auto-detection of namespaces</a></p> </ol> - <li><p><a class='doclink' href='org/apache/juneau/xml/package-summary.html#Collections'>Collections</a></p> <li><p><a class='doclink' href='org/apache/juneau/xml/package-summary.html#XmlSchemaSupport'>XML-Schema support</a></p> - <li><p><a class='doclink' href='org/apache/juneau/xml/package-summary.html#SerializerConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='org/apache/juneau/xml/package-summary.html#SerializerOtherNotes'>Other notes</a></p> </ol> <li><p><a class='doclink' href='org/apache/juneau/xml/package-summary.html#XmlParser'>XmlParser class</a></p> - <ol> - <li><p><a class='doclink' href='org/apache/juneau/xml/package-summary.html#ParserConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='org/apache/juneau/xml/package-summary.html#ParserOtherNotes'>Other notes</a></p> - </ol> </ol> <!-- ======================================================================================================= --> @@ -4162,16 +4148,7 @@ <li><p><a class='doclink' href='org/apache/juneau/uon/package-summary.html#OverviewExample'>Example</a></p> </ol> <li><p><a class='doclink' href='org/apache/juneau/uon/package-summary.html#UrlEncodingSerializer'>UrlEncodingSerializer and UonSerializer classes</a></p> - <ol> - <li><p><a class='doclink' href='org/apache/juneau/uon/package-summary.html#Collections'>Collections</a></p> - <li><p><a class='doclink' href='org/apache/juneau/uon/package-summary.html#SerializerConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='org/apache/juneau/uon/package-summary.html#SerializerOtherNotes'>Other notes</a></p> - </ol> <li><p><a class='doclink' href='org/apache/juneau/uon/package-summary.html#UrlEncodingParser'>UrlEncodingParser and UonParser classes</a></p> - <ol> - <li><p><a class='doclink' href='org/apache/juneau/uon/package-summary.html#ParserConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='org/apache/juneau/uon/package-summary.html#ParserOtherNotes'>Other notes</a></p> - </ol> </ol> <!-- ======================================================================================================= --> @@ -4210,16 +4187,7 @@ <li><p><a class='doclink' href='org/apache/juneau/urlencoding/package-summary.html#OverviewExample'>Example</a></p> </ol> <li><p><a class='doclink' href='org/apache/juneau/urlencoding/package-summary.html#UrlEncodingSerializer'>UrlEncodingSerializer and UonSerializer classes</a></p> - <ol> - <li><p><a class='doclink' href='org/apache/juneau/urlencoding/package-summary.html#Collections'>Collections</a></p> - <li><p><a class='doclink' href='org/apache/juneau/urlencoding/package-summary.html#SerializerConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='org/apache/juneau/urlencoding/package-summary.html#SerializerOtherNotes'>Other notes</a></p> - </ol> <li><p><a class='doclink' href='org/apache/juneau/urlencoding/package-summary.html#UrlEncodingParser'>UrlEncodingParser and UonParser classes</a></p> - <ol> - <li><p><a class='doclink' href='org/apache/juneau/urlencoding/package-summary.html#ParserConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='org/apache/juneau/urlencoding/package-summary.html#ParserOtherNotes'>Other notes</a></p> - </ol> </ol> <!-- ======================================================================================================= --> @@ -4337,18 +4305,10 @@ <ol> <li><p><a class='doclink' href='org/apache/juneau/jena/package-summary.html#Namespaces'>Namespaces</a></p> <li><p><a class='doclink' href='org/apache/juneau/jena/package-summary.html#UriProperties'>URI properties</a></p> - <li><p><a class='doclink' href='org/apache/juneau/jena/package-summary.html#Collections'>Collections</a></p> <li><p><a class='doclink' href='org/apache/juneau/jena/package-summary.html#RootProperty'>Root property</a></p> <li><p><a class='doclink' href='org/apache/juneau/jena/package-summary.html#TypedLiterals'>Typed literals</a></p> - <li><p><a class='doclink' href='org/apache/juneau/jena/package-summary.html#SerializerConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='org/apache/juneau/jena/package-summary.html#SerializerOtherNotes'>Other notes</a></p> </ol> <li><p><a class='doclink' href='org/apache/juneau/jena/package-summary.html#RdfParser'>RdfParser class</a></p> - <ol> - <li><p><a class='doclink' href='org/apache/juneau/jena/package-summary.html#ParserConfigurableProperties'>Configurable properties</a></p> - <li><p><a class='doclink' href='org/apache/juneau/jena/package-summary.html#ParserOtherNotes'>Other notes</a></p> - </ol> - </ol> <!-- ======================================================================================================= --> <a id="juneau-marshall-rdf.RdfDetails.Methodology"></a> -- To stop receiving notification emails like this one, please contact jamesbog...@apache.org.