http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Xml.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Xml.java b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Xml.java index a8fd4bd..15701e7 100644 --- a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Xml.java +++ b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Xml.java @@ -17,11 +17,13 @@ import org.apache.juneau.annotation.*; /** * A metadata object that allows for more fine-tuned XML model definitions. * <p> - * When using arrays, XML element names are not inferred (for singular/plural forms) and the name property should be used to add that information. + * When using arrays, XML element names are not inferred (for singular/plural forms) and the name property should be + * used to add that information. * * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> - * <li class='link'><a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects (org.apache.juneau.dto)</a> + * <li class='link'><a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> * <ul> * <li class='sublink'><a class='doclink' href='../../../../../overview-summary.html#DTOs.Swagger'>Swagger</a> * </ul> @@ -42,8 +44,10 @@ public class Xml extends SwaggerElement { * Bean property getter: <property>name</property>. * <p> * Replaces the name of the element/attribute used for the described schema property. - * When defined within the Items Object (<code>items</code>), it will affect the name of the individual XML elements within the list. - * When defined alongside <code>type</code> being array (outside the <code>items</code>), it will affect the wrapping element and only if wrapped is <jk>true</jk>. + * When defined within the Items Object (<code>items</code>), it will affect the name of the individual XML elements + * within the list. + * When defined alongside <code>type</code> being array (outside the <code>items</code>), it will affect the + * wrapping element and only if wrapped is <jk>true</jk>. * If wrapped is <jk>false</jk>, it will be ignored. * * @return The value of the <property>name</property> property on this bean, or <jk>null</jk> if it is not set. @@ -56,8 +60,10 @@ public class Xml extends SwaggerElement { * Bean property setter: <property>name</property>. * <p> * Replaces the name of the element/attribute used for the described schema property. - * When defined within the Items Object (<code>items</code>), it will affect the name of the individual XML elements within the list. - * When defined alongside <code>type</code> being array (outside the <code>items</code>), it will affect the wrapping element and only if wrapped is <jk>true</jk>. + * When defined within the Items Object (<code>items</code>), it will affect the name of the individual XML elements + * within the list. + * When defined alongside <code>type</code> being array (outside the <code>items</code>), it will affect the + * wrapping element and only if wrapped is <jk>true</jk>. * If wrapped is <jk>false</jk>, it will be ignored. * * @param name The new value for the <property>name</property> property on this bean. @@ -149,7 +155,8 @@ public class Xml extends SwaggerElement { /** * Bean property getter: <property>attribute</property>. * <p> - * Declares whether the property definition translates to an attribute instead of an element. Default value is <jk>false</jk>. + * Declares whether the property definition translates to an attribute instead of an element. + * Default value is <jk>false</jk>. * * @return The value of the <property>attribute</property> property on this bean, or <jk>null</jk> if it is not set. */ @@ -160,7 +167,8 @@ public class Xml extends SwaggerElement { /** * Bean property setter: <property>attribute</property>. * <p> - * Declares whether the property definition translates to an attribute instead of an element. Default value is <jk>false</jk>. + * Declares whether the property definition translates to an attribute instead of an element. + * Default value is <jk>false</jk>. * * @param attribute The new value for the <property>attribute</property> property on this bean. * @return This object (for method chaining). @@ -184,9 +192,12 @@ public class Xml extends SwaggerElement { * Bean property getter: <property>wrapped</property>. * <p> * MAY be used only for an array definition. - * Signifies whether the array is wrapped (for example, <code><books><book/><book/><books></code>) or unwrapped (<code><book/><book/></code>). + * Signifies whether the array is wrapped (for example, + * <code><books><book/><book/><books></code>) or unwrapped + * (<code><book/><book/></code>). * Default value is <jk>false</jk>. - * The definition takes effect only when defined alongside <code>type</code> being <code>array</code> (outside the <code>items</code>). + * The definition takes effect only when defined alongside <code>type</code> being <code>array</code> + * (outside the <code>items</code>). * * @return The value of the <property>wrapped</property> property on this bean, or <jk>null</jk> if it is not set. */ @@ -198,9 +209,12 @@ public class Xml extends SwaggerElement { * Bean property setter: <property>wrapped</property>. * <p> * MAY be used only for an array definition. - * Signifies whether the array is wrapped (for example, <code><books><book/><book/><books></code>) or unwrapped (<code><book/><book/></code>). + * Signifies whether the array is wrapped (for example, + * <code><books><book/><book/><books></code>) or unwrapped + * (<code><book/><book/></code>). * Default value is <jk>false</jk>. - * The definition takes effect only when defined alongside <code>type</code> being <code>array</code> (outside the <code>items</code>). + * The definition takes effect only when defined alongside <code>type</code> being <code>array</code> + * (outside the <code>items</code>). * * @param wrapped The new value for the <property>wrapped</property> property on this bean. * @return This object (for method chaining).
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/dto/swagger/package.html ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/package.html b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/package.html index 694657f..bde6318 100644 --- a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/package.html +++ b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/package.html @@ -69,7 +69,9 @@ <h2 class='topic' onclick='toggle(this)'>1 - Overview</h2> <div class='topic'> <p> - Juneau supports generation and consumption of Swagger 2.0 documents and fragments through the use of DTOs (Data Transfer Objects).<br> + Juneau supports generation and consumption of Swagger 2.0 documents and fragments through the use of DTOs + (Data Transfer Objects). + <br> It uses existing support for serializing and parsing POJOs to and from JSON to define these objects. </p> @@ -162,7 +164,8 @@ <jsm>contact</jsm>().email(<js>"[email protected]"</js>) ) .license( - <jsm>license</jsm>(<js>"Apache 2.0"</js>).url(<js>"http://www.apache.org/licenses/LICENSE-2.0.html"</js>) + <jsm>license</jsm>(<js>"Apache 2.0"</js>) + .url(<js>"http://www.apache.org/licenses/LICENSE-2.0.html"</js>) ) ) .host(<js>"petstore.swagger.io"</js>) http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/encoders/Encoder.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/encoders/Encoder.java b/juneau-core/src/main/java/org/apache/juneau/encoders/Encoder.java index 933bc07..7c7110f 100644 --- a/juneau-core/src/main/java/org/apache/juneau/encoders/Encoder.java +++ b/juneau-core/src/main/java/org/apache/juneau/encoders/Encoder.java @@ -19,7 +19,7 @@ import java.io.*; * * <h5 class='section'>Description:</h5> * <p> - * Used to wrap input and output streams withing compression/decompression streams. + * Used to wrap input and output streams within compression/decompression streams. * <p> * Encoders are registered with <code>RestServlets</code> through the <ja>@RestResource.encoders()</ja> annotation. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java b/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java index 194a39f..ae3128e 100644 --- a/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java +++ b/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java @@ -35,8 +35,8 @@ import org.apache.juneau.http.*; * Adding new entries will cause the entries to be prepended to the group. * This allows for previous encoders to be overridden through subsequent calls. * <p> - * For example, calling <code>groupBuilder.append(E1.<jk>class</jk>,E2.<jk>class</jk>).append(E3.<jk>class</jk>,E4.<jk>class</jk>)</code> - * will result in the order <code>E3, E4, E1, E2</code>. + * For example, calling <code>groupBuilder.append(E1.<jk>class</jk>,E2.<jk>class</jk>).append(E3.<jk>class</jk>, + * E4.<jk>class</jk>)</code> will result in the order <code>E3, E4, E1, E2</code>. * * <h5 class='section'>Example:</h5> * <p class='bcode'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroupBuilder.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroupBuilder.java b/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroupBuilder.java index 2d9a8ed..32958ec 100644 --- a/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroupBuilder.java +++ b/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroupBuilder.java @@ -33,6 +33,7 @@ public class EncoderGroupBuilder { /** * Clone an existing encoder group builder. + * * @param copyFrom The encoder group that we're copying settings and encoders from. */ public EncoderGroupBuilder(EncoderGroup copyFrom) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlBeanPropertyMeta.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlBeanPropertyMeta.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlBeanPropertyMeta.java index ce0be74..71358d2 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlBeanPropertyMeta.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlBeanPropertyMeta.java @@ -17,7 +17,8 @@ import org.apache.juneau.html.annotation.*; import org.apache.juneau.internal.*; /** - * Metadata on bean properties specific to the HTML serializers and parsers pulled from the {@link Html @Html} annotation on the bean property. + * Metadata on bean properties specific to the HTML serializers and parsers pulled from the {@link Html @Html} + * annotation on the bean property. */ @SuppressWarnings("rawtypes") public final class HtmlBeanPropertyMeta extends BeanPropertyMetaExtended { @@ -85,7 +86,8 @@ public final class HtmlBeanPropertyMeta extends BeanPropertyMetaExtended { /** * Returns whether this bean property should be serialized as plain text instead of HTML. * - * @return <jk>true</jk> if the the {@link Html} annotation is specified, and {@link Html#asPlainText()} is <jk>true</jk>. + * @return <jk>true</jk> if the the {@link Html} annotation is specified, and {@link Html#asPlainText()} is + * <jk>true</jk>. */ protected boolean isAsPlainText() { return asPlainText; @@ -94,7 +96,8 @@ public final class HtmlBeanPropertyMeta extends BeanPropertyMetaExtended { /** * Returns whether this bean property should not be serialized as an HTML table. * - * @return <jk>true</jk> if the the {@link Html} annotation is specified, and {@link Html#noTables()} is <jk>true</jk>. + * @return <jk>true</jk> if the the {@link Html} annotation is specified, and {@link Html#noTables()} is + * <jk>true</jk>. */ protected boolean isNoTables() { return noTables; @@ -103,7 +106,8 @@ public final class HtmlBeanPropertyMeta extends BeanPropertyMetaExtended { /** * Returns whether this bean property should not include table headers when serialized as an HTML table. * - * @return <jk>true</jk> if the the {@link Html} annotation is specified, and {@link Html#noTableHeaders()} is <jk>true</jk>. + * @return <jk>true</jk> if the the {@link Html} annotation is specified, and {@link Html#noTableHeaders()} is + * <jk>true</jk>. */ public boolean isNoTableHeaders() { return noTableHeaders; http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlClassMeta.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlClassMeta.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlClassMeta.java index 5442a2d..a30d977 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlClassMeta.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlClassMeta.java @@ -17,7 +17,8 @@ import org.apache.juneau.html.annotation.*; import org.apache.juneau.internal.*; /** - * Metadata on classes specific to the HTML serializers and parsers pulled from the {@link Html @Html} annotation on the class. + * Metadata on classes specific to the HTML serializers and parsers pulled from the {@link Html @Html} annotation on + * the class. */ public class HtmlClassMeta extends ClassMetaExtended { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java index 694a0a6..fc0c7d3 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java @@ -31,8 +31,8 @@ import org.apache.juneau.serializer.*; * * <h5 class='section'>Description:</h5> * <p> - * Same as {@link HtmlSerializer}, except wraps the response in <code><xt><html></code>, <code><xt><head></code>, - * and <code><xt><body></code> tags so that it can be rendered in a browser. + * Same as {@link HtmlSerializer}, except wraps the response in <code><xt><html></code>, + * <code><xt><head></code>, and <code><xt><body></code> tags so that it can be rendered in a browser. * * <h5 class='section'>Configurable properties:</h5> * <p> @@ -54,6 +54,7 @@ public class HtmlDocSerializer extends HtmlStrippedDocSerializer { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public HtmlDocSerializer(PropertyStore propertyStore) { @@ -67,7 +68,8 @@ public class HtmlDocSerializer extends HtmlStrippedDocSerializer { //-------------------------------------------------------------------------------- @Override /* Serializer */ - public HtmlDocSerializerSession createSession(Object output, ObjectMap op, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) { + public HtmlDocSerializerSession createSession(Object output, ObjectMap op, Method javaMethod, Locale locale, + TimeZone timeZone, MediaType mediaType, UriContext uriContext) { return new HtmlDocSerializerSession(ctx, op, output, javaMethod, locale, timeZone, mediaType, uriContext); } @@ -90,6 +92,7 @@ public class HtmlDocSerializer extends HtmlStrippedDocSerializer { /** * Calls the parent {@link #doSerialize(SerializerSession, Object)} method which invokes just the HTML serializer. + * * @param session The serializer session. * @param o The object being serialized. * @throws Exception http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java index 66e7929..40537ab 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java @@ -19,8 +19,8 @@ import org.apache.juneau.*; /** * Properties associated with the {@link HtmlDocSerializer} class. * <p> - * These are typically specified via <ja>@RestResource.properties()</ja> and <ja>@RestMethod.properties()</ja> annotations, - * although they can also be set programmatically via the <code>RestResponse.setProperty()</code> method. + * These are typically specified via <ja>@RestResource.properties()</ja> and <ja>@RestMethod.properties()</ja> + * annotations, although they can also be set programmatically via the <code>RestResponse.setProperty()</code> method. * * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -48,17 +48,23 @@ import org.apache.juneau.*; * </p> * * <p> - * The <code>$L{...}</code> variable represent localized strings pulled from the resource bundle identified by the <code>messages</code> annotation. + * The <code>$L{...}</code> variable represent localized strings pulled from the resource bundle identified by the + * <code>messages</code> annotation. * These variables are replaced at runtime based on the HTTP request locale. * Several built-in runtime variable types are defined, and the API can be extended to include user-defined variables. * * <h6 class='topic'>Inherited configurable properties</h6> * <ul class='doctree'> - * <li class='jc'><a class="doclink" href="../BeanContext.html#ConfigProperties">BeanContext</a> - Properties associated with handling beans on serializers and parsers. + * <li class='jc'><a class="doclink" href="../BeanContext.html#ConfigProperties">BeanContext</a> + * - Properties associated with handling beans on serializers and parsers. * <ul> - * <li class='jc'><a class="doclink" href="../serializer/SerializerContext.html#ConfigProperties">SerializerContext</a> - Configurable properties common to all serializers. + * <li class='jc'><a class="doclink" + * href="../serializer/SerializerContext.html#ConfigProperties">SerializerContext</a> + * - Configurable properties common to all serializers. * <ul> - * <li class='jc'><a class="doclink" href="../html/HtmlSerializerContext.html#ConfigProperties">HtmlSerializerContext</a> - Configurable properties on the HTML serializer. + * <li class='jc'><a class="doclink" + * href="../html/HtmlSerializerContext.html#ConfigProperties">HtmlSerializerContext</a> + * - Configurable properties on the HTML serializer. * </ul> * </ul> * </ul> @@ -134,7 +140,8 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext { * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> * <p> - * Specifies the text for the subtitle that shows up in the header section of the page generated by the basic template. + * Specifies the text for the subtitle that shows up in the header section of the page generated by the basic + * template. * <p> * * <h5 class='section'>Example:</h5> @@ -145,7 +152,8 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext { * <ja>@RestResource</ja>( * messages=<js>"nls/AddressBookResource"</js>, * properties={ - * <ja>@Property</ja>(name=HtmlDocSerializerContext.<jsf>HTMLDOC_description</jsf>, value=<js>"My description"</js>) + * <ja>@Property</ja>(name=HtmlDocSerializerContext.<jsf>HTMLDOC_description</jsf>, + alue=<js>"My description"</js>) * } * ) * <jk>public class</jk> AddressBookResource <jk>extends</jk> RestServletJenaDefault { @@ -223,7 +231,8 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext { * ) * </p> * <p> - * When this property is specified, the {@link #HTMLDOC_title} and {@link #HTMLDOC_description} properties are ignored. + * When this property is specified, the {@link #HTMLDOC_title} and {@link #HTMLDOC_description} properties are + * ignored. * <p> * A value of <js>"NONE"</js> can be used to represent no value to differentiate it from an empty string. */ @@ -247,9 +256,10 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext { * <p> * Relative URLs are considered relative to the servlet path. * For example, if the servlet path is <js>"http://localhost/myContext/myServlet"</js>, and the - * URL is <js>"foo"</js>, the link becomes <js>"http://localhost/myContext/myServlet/foo"</js>. + * URL is <js>"foo"</js>, the link becomes <js>"http://localhost/myContext/myServlet/foo"</js>. * Absolute (<js>"/myOtherContext/foo"</js>) and fully-qualified (<js>"http://localhost2/foo"</js>) URLs - * can also be used in addition to various other protocols specified by {@link UriResolver} such as <js>"servlet:/..."</js>. + * can also be used in addition to various other protocols specified by {@link UriResolver} such as + * <js>"servlet:/..."</js>. * * <h5 class='section'>Example:</h5> * <p> @@ -258,7 +268,8 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext { * <p class='bcode'> * <ja>@RestResource</ja>( * properties={ - * <ja>@Property</ja>(name=HtmlDocSerializerContext.<jsf>HTMLDOC_links</jsf>, value=<js>"{options:'?method=OPTIONS',doc:'doc'}"</js>) + * <ja>@Property</ja>(name=HtmlDocSerializerContext.<jsf>HTMLDOC_links</jsf>, + * value=<js>"{options:'?method=OPTIONS',doc:'doc'}"</js>) * } * ) * <jk>public class</jk> AddressBookResource <jk>extends</jk> RestServletJenaDefault { @@ -326,9 +337,9 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext { * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> * <p> - * Allows you to specifigy the contents of the aside section on the HTML page. + * Allows you to specify the contents of the aside section on the HTML page. * The aside section floats on the right of the page for providing content supporting the serialized content of - * the page. + * the page. * <p> * By default, the aside section is empty. * <p> @@ -449,7 +460,8 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext { * <p class='bcode'> * <ja>@RestResource</ja>( * properties={ - * <ja>@Property</ja>(name=HtmlDocSerializerContext.<jsf>HTMLDOC_css</jsf>, value=<js>"h3 { color: red; }\nh5 { font-weight: bold; }"</js>) + * <ja>@Property</ja>(name=HtmlDocSerializerContext.<jsf>HTMLDOC_css</jsf>, + * value=<js>"h3 { color: red; }\nh5 { font-weight: bold; }"</js>) * } * ) * </p> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java index 5d136cb..8e20a3e 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java @@ -57,7 +57,8 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { * Identifies the current request URI used for resolution of URIs to absolute or root-relative form. */ @SuppressWarnings({ "unchecked", "rawtypes" }) - protected HtmlDocSerializerSession(HtmlDocSerializerContext ctx, ObjectMap op, Object output, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) { + protected HtmlDocSerializerSession(HtmlDocSerializerContext ctx, ObjectMap op, Object output, Method javaMethod, + Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) { super(ctx, op, output, javaMethod, locale, timeZone, mediaType, uriContext); if (op == null || op.isEmpty()) { title = ctx.title; @@ -93,8 +94,9 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_cssUrl} setting value in this context. + * * @return The {@link HtmlDocSerializerContext#HTMLDOC_cssUrl} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * <jk>null</jk> if not specified. Never an empty string. */ public final String getCssUrl() { return cssUrl; @@ -102,6 +104,7 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_css} setting value in this context. + * * @return The {@link HtmlDocSerializerContext#HTMLDOC_css} setting value in this context. * <jk>null</jk> if not specified. Never an empty array. */ @@ -111,6 +114,7 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_nowrap} setting value in this context. + * * @return The {@link HtmlDocSerializerContext#HTMLDOC_nowrap} setting value in this context. */ public final boolean isNoWrap() { @@ -119,8 +123,9 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_title} setting value in this context. + * * @return The {@link HtmlDocSerializerContext#HTMLDOC_title} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * <jk>null</jk> if not specified. Never an empty string. */ public final String getTitle() { return title; @@ -128,8 +133,9 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_description} setting value in this context. + * * @return The {@link HtmlDocSerializerContext#HTMLDOC_description} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * <jk>null</jk> if not specified. Never an empty string. */ public final String getDescription() { return description; @@ -137,8 +143,9 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_branding} setting value in this context. + * * @return The {@link HtmlDocSerializerContext#HTMLDOC_branding} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * <jk>null</jk> if not specified. Never an empty string. */ public final String getBranding() { return branding; @@ -146,8 +153,9 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_header} setting value in this context. + * * @return The {@link HtmlDocSerializerContext#HTMLDOC_header} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * <jk>null</jk> if not specified. Never an empty string. */ public final String getHeader() { return header; @@ -155,8 +163,9 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_links} setting value in this context. + * * @return The {@link HtmlDocSerializerContext#HTMLDOC_links} setting value in this context. - * <jk>null</jk> if not specified. Never an empty map. + * <jk>null</jk> if not specified. Never an empty map. */ public final Map<String,Object> getLinks() { return links; @@ -164,8 +173,9 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the template to use for generating the HTML page. + * * @return The HTML page generator. - * Never <jk>null</jk>. + * Never <jk>null</jk>. */ public final HtmlDocTemplate getTemplate() { return template; @@ -173,8 +183,9 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_nav} setting value in this context. + * * @return The {@link HtmlDocSerializerContext#HTMLDOC_nav} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * <jk>null</jk> if not specified. Never an empty string. */ public final String getNav() { return nav; @@ -182,8 +193,9 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_aside} setting value in this context. + * * @return The {@link HtmlDocSerializerContext#HTMLDOC_aside} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * <jk>null</jk> if not specified. Never an empty string. */ public final String getAside() { return aside; @@ -191,8 +203,9 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_footer} setting value in this context. + * * @return The {@link HtmlDocSerializerContext#HTMLDOC_footer} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * <jk>null</jk> if not specified. Never an empty string. */ public final String getFooter() { return footer; @@ -200,8 +213,9 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_noResultsMessage} setting value in this context. + * * @return The {@link HtmlDocSerializerContext#HTMLDOC_noResultsMessage} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * <jk>null</jk> if not specified. Never an empty string. */ public final String getNoResultsMessage() { return noResultsMessage; http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java index 8de526b..2e743f6 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java @@ -13,7 +13,8 @@ package org.apache.juneau.html; /** - * Defines the interface for rendering the contents of an HTML page produced by the {@link HtmlDocSerializer} serializer. + * Defines the interface for rendering the contents of an HTML page produced by the {@link HtmlDocSerializer} + * serializer. * <p> * The HTML doc serializer produces the following document structure with the typical contents: * <p class='bcode'> @@ -51,6 +52,7 @@ public interface HtmlDocTemplate { /** * Renders the contents of the <code><xt><head></xt></code> element. + * * @param session The current serializer session. * @param w The writer being written to. * @param s The serializer calling this method. @@ -60,7 +62,9 @@ public interface HtmlDocTemplate { public void head(HtmlDocSerializerSession session, HtmlWriter w, HtmlDocSerializer s, Object o) throws Exception; /** - * Renders the contents of the <code><xt><head></xt>/<xt><style</xt> <xa>type</xa>=<xs>"text/css"</xs><xt>></xt></code> element. + * Renders the contents of the <code><xt><head></xt>/<xt><style</xt> + * <xa>type</xa>=<xs>"text/css"</xs><xt>></xt></code> element. + * * @param session The current serializer session. * @param w The writer being written to. * @param s The serializer calling this method. @@ -71,6 +75,7 @@ public interface HtmlDocTemplate { /** * Renders the contents of the <code><xt><body></xt></code> element. + * * @param session The current serializer session. * @param w The writer being written to. * @param s The serializer calling this method. @@ -81,6 +86,7 @@ public interface HtmlDocTemplate { /** * Renders the contents of the <code><xt><body></xt>/<xt><header></xt></code> element. + * * @param session The current serializer session. * @param w The writer being written to. * @param s The serializer calling this method. @@ -91,6 +97,7 @@ public interface HtmlDocTemplate { /** * Renders the contents of the <code><xt><body></xt>/<xt><nav></xt></code> element. + * * @param session The current serializer session. * @param w The writer being written to. * @param s The serializer calling this method. @@ -101,6 +108,7 @@ public interface HtmlDocTemplate { /** * Renders the contents of the <code><xt><body></xt>/<xt><article></xt></code> element. + * * @param session The current serializer session. * @param w The writer being written to. * @param s The serializer calling this method. @@ -111,6 +119,7 @@ public interface HtmlDocTemplate { /** * Renders the contents of the <code><xt><body></xt>/<xt><aside></xt></code> element. + * * @param session The current serializer session. * @param w The writer being written to. * @param s The serializer calling this method. @@ -121,6 +130,7 @@ public interface HtmlDocTemplate { /** * Renders the contents of the <code><xt><body></xt>/<xt><footer></xt></code> element. + * * @param session The current serializer session. * @param w The writer being written to. * @param s The serializer calling this method. @@ -130,35 +140,45 @@ public interface HtmlDocTemplate { public void footer(HtmlDocSerializerSession session, HtmlWriter w, HtmlDocSerializer s, Object o) throws Exception; /** - * Returns <jk>true</jk> if this page should render a <code><xt><head></xt>/<xt><style</xt> <xa>type</xa>=<xs>"text/css"</xs><xt>></xt></code> element. + * Returns <jk>true</jk> if this page should render a <code><xt><head></xt>/<xt><style</xt> + * <xa>type</xa>=<xs>"text/css"</xs><xt>></xt></code> element. + * * @param session The current serializer session. * @return A boolean flag. */ public boolean hasCss(HtmlDocSerializerSession session); /** - * Returns <jk>true</jk> if this page should render a <code><xt><body></xt>/<xt><header></xt></code> element. + * Returns <jk>true</jk> if this page should render a <code><xt><body></xt>/<xt><header></xt></code> + * element. + * * @param session The current serializer session. * @return A boolean flag. */ public boolean hasHeader(HtmlDocSerializerSession session); /** - * Returns <jk>true</jk> if this page should render a <code><xt><body></xt>/<xt><nav></xt></code> element. + * Returns <jk>true</jk> if this page should render a <code><xt><body></xt>/<xt><nav></xt></code> + * element. + * * @param session The current serializer session. * @return A boolean flag. */ public boolean hasNav(HtmlDocSerializerSession session); /** - * Returns <jk>true</jk> if this page should render a <code><xt><body></xt>/<xt><aside></xt></code> element. + * Returns <jk>true</jk> if this page should render a <code><xt><body></xt>/<xt><aside></xt></code> + * element. + * * @param session The current serializer session. * @return A boolean flag. */ public boolean hasAside(HtmlDocSerializerSession session); /** - * Returns <jk>true</jk> if this page should render a <code><xt><body></xt>/<xt><footer></xt></code> element. + * Returns <jk>true</jk> if this page should render a <code><xt><body></xt>/<xt><footer></xt></code> + * element. + * * @param session The current serializer session. * @return A boolean flag. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplateBasic.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplateBasic.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplateBasic.java index 67fb799..99a9688 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplateBasic.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplateBasic.java @@ -123,7 +123,8 @@ public class HtmlDocTemplateBasic implements HtmlDocTemplate { if (v.startsWith("<")) w.append(v); else - w.oTag("a").attr("class", "link").attr("href", session.resolveUri(v), true).cTag().text(e.getKey(), true).eTag("a"); + w.oTag("a").attr("class", "link").attr("href", session.resolveUri(v), true).cTag() + .text(e.getKey(), true).eTag("a"); } } } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlLink.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlLink.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlLink.java index 08c1808..5748815 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlLink.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlLink.java @@ -24,7 +24,8 @@ import java.lang.annotation.*; * <p> * Annotation that can be used to specify that a class has a URL associated with it. * <p> - * When rendered using the {@link org.apache.juneau.html.HtmlSerializer HtmlSerializer} class, this class will get rendered as a hyperlink like so... + * When rendered using the {@link org.apache.juneau.html.HtmlSerializer HtmlSerializer} class, this class will get + * rendered as a hyperlink like so... * <p class='code'> * <xt><a</xt> <xa>href</xa>=<xs>'hrefProperty'</xs><xt>></xt>nameProperty<xt></a></xt> * </p> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java index 0e2b201..b28e73b 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java @@ -61,6 +61,7 @@ public class HtmlParser extends XmlParser { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public HtmlParser(PropertyStore propertyStore) { @@ -79,7 +80,8 @@ public class HtmlParser extends XmlParser { * Precondition: Must be pointing at outer START_ELEMENT. * Postcondition: Pointing at outer END_ELEMENT. */ - private <T> T parseAnything(HtmlParserSession session, ClassMeta<T> eType, XMLStreamReader r, Object outer, boolean isRoot, BeanPropertyMeta pMeta) throws Exception { + private <T> T parseAnything(HtmlParserSession session, ClassMeta<T> eType, XMLStreamReader r, Object outer, + boolean isRoot, BeanPropertyMeta pMeta) throws Exception { if (eType == null) eType = (ClassMeta<T>)object(); @@ -134,7 +136,8 @@ public class HtmlParser extends XmlParser { else isValid = false; - } else if (tag == STRING || (tag == A && pMeta != null && pMeta.getExtendedMeta(HtmlBeanPropertyMeta.class).getLink() != null)) { + } else if (tag == STRING || (tag == A && pMeta != null + && pMeta.getExtendedMeta(HtmlBeanPropertyMeta.class).getLink() != null)) { String text = session.getElementText(r); if (sType.isObject() || sType.isCharSequence()) o = text; @@ -197,9 +200,11 @@ public class HtmlParser extends XmlParser { if (typeName.equals("object")) { if (sType.isObject()) { - o = parseIntoMap(session, r, (Map)new ObjectMap(session), sType.getKeyType(), sType.getValueType(), pMeta); + o = parseIntoMap(session, r, (Map)new ObjectMap(session), sType.getKeyType(), sType.getValueType(), + pMeta); } else if (sType.isMap()) { - o = parseIntoMap(session, r, (Map)(sType.canCreateNewInstance(outer) ? sType.newInstance(outer) : new ObjectMap(session)), sType.getKeyType(), sType.getValueType(), pMeta); + o = parseIntoMap(session, r, (Map)(sType.canCreateNewInstance(outer) ? sType.newInstance(outer) + : new ObjectMap(session)), sType.getKeyType(), sType.getValueType(), pMeta); } else if (sType.canCreateNewBean(outer)) { BeanMap m = session.newBeanMap(outer, sType.getInnerClass()); o = parseIntoBean(session, r, m).getBean(); @@ -212,7 +217,8 @@ public class HtmlParser extends XmlParser { if (sType.isObject()) o = parseTableIntoCollection(session, r, (Collection)new ObjectList(session), sType, pMeta); else if (sType.isCollection()) - o = parseTableIntoCollection(session, r, (Collection)(sType.canCreateNewInstance(outer) ? sType.newInstance(outer) : new ObjectList(session)), sType, pMeta); + o = parseTableIntoCollection(session, r, (Collection)(sType.canCreateNewInstance(outer) + ? sType.newInstance(outer) : new ObjectList(session)), sType, pMeta); else if (sType.isArray() || sType.isArgs()) { ArrayList l = (ArrayList)parseTableIntoCollection(session, r, new ArrayList(), sType, pMeta); o = session.toArray(sType, l); @@ -234,7 +240,8 @@ public class HtmlParser extends XmlParser { if (sType.isObject()) o = parseIntoCollection(session, r, new ObjectList(session), sType, pMeta); else if (sType.isCollection() || sType.isObject()) - o = parseIntoCollection(session, r, (Collection)(sType.canCreateNewInstance(outer) ? sType.newInstance(outer) : new ObjectList(session)), sType, pMeta); + o = parseIntoCollection(session, r, (Collection)(sType.canCreateNewInstance(outer) + ? sType.newInstance(outer) : new ObjectList(session)), sType, pMeta); else if (sType.isArray() || sType.isArgs()) o = session.toArray(sType, parseIntoCollection(session, r, new ArrayList(), sType, pMeta)); else @@ -286,7 +293,8 @@ public class HtmlParser extends XmlParser { /* * Reads an anchor tag and converts it into a bean. */ - private static <T> T parseAnchor(HtmlParserSession session, XMLStreamReader r, ClassMeta<T> beanType) throws XMLStreamException { + private static <T> T parseAnchor(HtmlParserSession session, XMLStreamReader r, ClassMeta<T> beanType) + throws XMLStreamException { String href = r.getAttributeValue(null, "href"); String name = session.getElementText(r); Class<T> beanClass = beanType.getInnerClass(); @@ -312,7 +320,8 @@ public class HtmlParser extends XmlParser { * Precondition: Must be pointing at <table> event. * Postcondition: Pointing at next START_ELEMENT or END_DOCUMENT event. */ - private <K,V> Map<K,V> parseIntoMap(HtmlParserSession session, XMLStreamReader r, Map<K,V> m, ClassMeta<K> keyType, ClassMeta<V> valueType, BeanPropertyMeta pMeta) throws Exception { + private <K,V> Map<K,V> parseIntoMap(HtmlParserSession session, XMLStreamReader r, Map<K,V> m, ClassMeta<K> keyType, + ClassMeta<V> valueType, BeanPropertyMeta pMeta) throws Exception { while (true) { HtmlTag tag = nextTag(r, TR, xTABLE); if (tag == xTABLE) @@ -341,7 +350,8 @@ public class HtmlParser extends XmlParser { * Precondition: Must be pointing at event following <ul> event. * Postcondition: Pointing at next START_ELEMENT or END_DOCUMENT event. */ - private <E> Collection<E> parseIntoCollection(HtmlParserSession session, XMLStreamReader r, Collection<E> l, ClassMeta<?> type, BeanPropertyMeta pMeta) throws Exception { + private <E> Collection<E> parseIntoCollection(HtmlParserSession session, XMLStreamReader r, Collection<E> l, + ClassMeta<?> type, BeanPropertyMeta pMeta) throws Exception { int argIndex = 0; while (true) { HtmlTag tag = nextTag(r, LI, xUL); @@ -358,7 +368,8 @@ public class HtmlParser extends XmlParser { * Precondition: Must be pointing at event following <ul> event. * Postcondition: Pointing at next START_ELEMENT or END_DOCUMENT event. */ - private <E> Collection<E> parseTableIntoCollection(HtmlParserSession session, XMLStreamReader r, Collection<E> l, ClassMeta<E> type, BeanPropertyMeta pMeta) throws Exception { + private <E> Collection<E> parseTableIntoCollection(HtmlParserSession session, XMLStreamReader r, Collection<E> l, + ClassMeta<E> type, BeanPropertyMeta pMeta) throws Exception { HtmlTag tag = nextTag(r, TR); List<String> keys = new ArrayList<String>(); @@ -411,7 +422,8 @@ public class HtmlParser extends XmlParser { l.add(m == null ? null : (E)m.getBean()); } else { String c = getAttributes(r).get(session.getBeanTypePropertyName(type.getElementType())); - Map m = (Map)(elementType.isMap() && elementType.canCreateNewInstance(l) ? elementType.newInstance(l) : new ObjectMap(session)); + Map m = (Map)(elementType.isMap() && elementType.canCreateNewInstance(l) ? elementType.newInstance(l) + : new ObjectMap(session)); for (int i = 0; i < keys.size(); i++) { tag = nextTag(r, TD, NULL); if (tag == NULL) { @@ -497,7 +509,9 @@ public class HtmlParser extends XmlParser { if (t == tag) return tag; - throw new XMLStreamException("Unexpected tag: " + tag + ". Expected one of the following: " + JsonSerializer.DEFAULT.toString(expected), r.getLocation()); + throw new XMLStreamException( + "Unexpected tag: " + tag + ". Expected one of the following: " + + JsonSerializer.DEFAULT.toString(expected), r.getLocation()); } /** @@ -513,7 +527,9 @@ public class HtmlParser extends XmlParser { int et = r.getEventType(); if (et != START_ELEMENT) - throw new XMLStreamException("skipToNextTag() call on invalid event ["+XmlUtils.toReadableEvent(r)+"]. Must only be called on START_ELEMENT events."); + throw new XMLStreamException( + "skipToNextTag() call on invalid event ["+XmlUtils.toReadableEvent(r) + +"]. Must only be called on START_ELEMENT events."); String n = r.getLocalName(); @@ -539,7 +555,9 @@ public class HtmlParser extends XmlParser { if (tag.isOneOf(expected)) r.next(); else - throw new XMLStreamException("Unexpected tag: " + tag + ". Expected one of the following: " + JsonSerializer.DEFAULT.toString(expected), r.getLocation()); + throw new XMLStreamException( + "Unexpected tag: " + tag + ". Expected one of the following: " + + JsonSerializer.DEFAULT.toString(expected), r.getLocation()); } private static int skipWs(XMLStreamReader r) throws XMLStreamException { @@ -555,7 +573,8 @@ public class HtmlParser extends XmlParser { //-------------------------------------------------------------------------------- @Override /* Parser */ - public HtmlParserSession createSession(Object input, ObjectMap op, Method javaMethod, Object outer, Locale locale, TimeZone timeZone, MediaType mediaType) { + public HtmlParserSession createSession(Object input, ObjectMap op, Method javaMethod, Object outer, Locale locale, + TimeZone timeZone, MediaType mediaType) { return new HtmlParserSession(ctx, op, input, javaMethod, outer, locale, timeZone, mediaType); } @@ -566,13 +585,16 @@ public class HtmlParser extends XmlParser { } @Override /* ReaderParser */ - protected <K,V> Map<K,V> doParseIntoMap(ParserSession session, Map<K,V> m, Type keyType, Type valueType) throws Exception { + protected <K,V> Map<K,V> doParseIntoMap(ParserSession session, Map<K,V> m, Type keyType, Type valueType) + throws Exception { HtmlParserSession s = (HtmlParserSession)session; - return parseIntoMap(s, s.getXmlStreamReader(), m, (ClassMeta<K>)s.getClassMeta(keyType), (ClassMeta<V>)s.getClassMeta(valueType), null); + return parseIntoMap(s, s.getXmlStreamReader(), m, (ClassMeta<K>)s.getClassMeta(keyType), + (ClassMeta<V>)s.getClassMeta(valueType), null); } @Override /* ReaderParser */ - protected <E> Collection<E> doParseIntoCollection(ParserSession session, Collection<E> c, Type elementType) throws Exception { + protected <E> Collection<E> doParseIntoCollection(ParserSession session, Collection<E> c, Type elementType) + throws Exception { HtmlParserSession s = (HtmlParserSession)session; return parseIntoCollection(s, s.getXmlStreamReader(), c, s.getClassMeta(elementType), null); } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java index 8504f6b..e27737a 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java @@ -25,9 +25,11 @@ import org.apache.juneau.xml.*; * * <h6 class='topic'>Inherited configurable properties</h6> * <ul class='doctree'> - * <li class='jc'><a class="doclink" href="../BeanContext.html#ConfigProperties">BeanContext</a> - Properties associated with handling beans on serializers and parsers. + * <li class='jc'><a class="doclink" href="../BeanContext.html#ConfigProperties">BeanContext</a> - Properties + * associated with handling beans on serializers and parsers. * <ul> - * <li class='jc'><a class="doclink" href="../parser/ParserContext.html#ConfigProperties">ParserContext</a> - Configurable properties common to all parsers. + * <li class='jc'><a class="doclink" href="../parser/ParserContext.html#ConfigProperties">ParserContext</a> - + * Configurable properties common to all parsers. * </ul> * </ul> */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserSession.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserSession.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserSession.java index 092aa0c..5e7881f 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserSession.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserSession.java @@ -62,7 +62,8 @@ public final class HtmlParserSession extends XmlParserSession { * If <jk>null</jk>, then the timezone defined on the context is used. * @param mediaType The session media type (e.g. <js>"application/json"</js>). */ - public HtmlParserSession(HtmlParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer, Locale locale, TimeZone timeZone, MediaType mediaType) { + public HtmlParserSession(HtmlParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer, + Locale locale, TimeZone timeZone, MediaType mediaType) { super(ctx, op, input, javaMethod, outer, locale, timeZone, mediaType); } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java index fabcdaa..7420331 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java @@ -35,13 +35,12 @@ import org.apache.juneau.transform.*; * * <h5 class='section'>Description:</h5> * <p> - * Essentially the same as {@link HtmlSerializer}, except serializes the POJO metamodel - * instead of the model itself. + * Essentially the same as {@link HtmlSerializer}, except serializes the POJO metamodel instead of the model itself. * <p> * Produces output that describes the POJO metamodel similar to an XML schema document. * <p> * The easiest way to create instances of this class is through the {@link HtmlSerializer#getSchemaSerializer()}, - * which will create a schema serializer with the same settings as the originating serializer. + * which will create a schema serializer with the same settings as the originating serializer. */ @Produces(value="text/html+schema", contentType="text/html") public final class HtmlSchemaDocSerializer extends HtmlDocSerializer { @@ -51,6 +50,7 @@ public final class HtmlSchemaDocSerializer extends HtmlDocSerializer { /** * Constructor. + * * @param propertyStore The property store to use for creating the context for this serializer. */ public HtmlSchemaDocSerializer(PropertyStore propertyStore) { @@ -60,6 +60,7 @@ public final class HtmlSchemaDocSerializer extends HtmlDocSerializer { /** * Constructor. + * * @param propertyStore The property store to use for creating the context for this serializer. * @param overrideProperties */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java index b5ab39c..77e93a9 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java @@ -41,13 +41,16 @@ import org.apache.juneau.xml.annotation.*; * <p> * The conversion is as follows... * <ul class='spaced-list'> - * <li>{@link Map Maps} (e.g. {@link HashMap}, {@link TreeMap}) and beans are converted to HTML tables with 'key' and 'value' columns. - * <li>{@link Collection Collections} (e.g. {@link HashSet}, {@link LinkedList}) and Java arrays are converted to HTML ordered lists. + * <li>{@link Map Maps} (e.g. {@link HashMap}, {@link TreeMap}) and beans are converted to HTML tables with + * 'key' and 'value' columns. + * <li>{@link Collection Collections} (e.g. {@link HashSet}, {@link LinkedList}) and Java arrays are converted + * to HTML ordered lists. * <li>{@code Collections} of {@code Maps} and beans are converted to HTML tables with keys as headers. * <li>Everything else is converted to text. * </ul> * <p> - * This serializer provides several serialization options. Typically, one of the predefined <jsf>DEFAULT</jsf> serializers will be sufficient. + * This serializer provides several serialization options. Typically, one of the predefined <jsf>DEFAULT</jsf> + * serializers will be sufficient. * However, custom serializers can be constructed to fine-tune behavior. * <p> * The {@link HtmlLink} annotation can be used on beans to add hyperlinks to the output. @@ -146,6 +149,7 @@ public class HtmlSerializer extends XmlSerializer { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public Sq(PropertyStore propertyStore) { @@ -164,6 +168,7 @@ public class HtmlSerializer extends XmlSerializer { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public SqReadable(PropertyStore propertyStore) { @@ -182,6 +187,7 @@ public class HtmlSerializer extends XmlSerializer { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public HtmlSerializer(PropertyStore propertyStore) { @@ -196,10 +202,10 @@ public class HtmlSerializer extends XmlSerializer { /** * Main serialization routine. + * * @param session The serialization context object. * @param o The object being serialized. * @param w The writer to serialize to. - * * @return The same writer passed in. * @throws IOException If a problem occurred trying to send output to the writer. */ @@ -215,7 +221,8 @@ public class HtmlSerializer extends XmlSerializer { * @param out The writer. * @param o The object to serialize. * @param eType The expected type of the object if this is a bean property. - * @param name The attribute name of this object if this object was a field in a JSON object (i.e. key of a {@link java.util.Map.Entry} or property name of a bean). + * @param name The attribute name of this object if this object was a field in a JSON object (i.e. key of a + * {@link java.util.Map.Entry} or property name of a bean). * @param indent The current indentation value. * @param pMeta The bean property being serialized, or <jk>null</jk> if we're not serializing a bean property. * @param isRoot <jk>true</jk> if this is the root element of the document. @@ -223,7 +230,8 @@ public class HtmlSerializer extends XmlSerializer { * @throws Exception If a problem occurred trying to convert the output. */ @SuppressWarnings({ "rawtypes", "unchecked" }) - protected ContentResult serializeAnything(HtmlSerializerSession session, HtmlWriter out, Object o, ClassMeta<?> eType, String name, int indent, BeanPropertyMeta pMeta, boolean isRoot) throws Exception { + protected ContentResult serializeAnything(HtmlSerializerSession session, HtmlWriter out, Object o, + ClassMeta<?> eType, String name, int indent, BeanPropertyMeta pMeta, boolean isRoot) throws Exception { ClassMeta<?> aType = null; // The actual type ClassMeta<?> wType = null; // The wrapped type (delegate) @@ -362,7 +370,8 @@ public class HtmlSerializer extends XmlSerializer { } @SuppressWarnings({ "rawtypes", "unchecked" }) - private void serializeMap(HtmlSerializerSession session, HtmlWriter out, Map m, ClassMeta<?> sType, ClassMeta<?> eKeyType, ClassMeta<?> eValueType, String typeName, BeanPropertyMeta ppMeta) throws Exception { + private void serializeMap(HtmlSerializerSession session, HtmlWriter out, Map m, ClassMeta<?> sType, + ClassMeta<?> eKeyType, ClassMeta<?> eValueType, String typeName, BeanPropertyMeta ppMeta) throws Exception { ClassMeta<?> keyType = eKeyType == null ? session.string() : eKeyType; ClassMeta<?> valueType = eValueType == null ? session.object() : eValueType; @@ -376,7 +385,8 @@ public class HtmlSerializer extends XmlSerializer { out.attr(session.getBeanTypePropertyName(sType), typeName); out.append(">").nl(i+1); - if (session.isAddKeyValueTableHeaders() && ! (aType.getExtendedMeta(HtmlClassMeta.class).isNoTableHeaders() || (ppMeta != null && ppMeta.getExtendedMeta(HtmlBeanPropertyMeta.class).isNoTableHeaders()))) { + if (session.isAddKeyValueTableHeaders() && ! (aType.getExtendedMeta(HtmlClassMeta.class).isNoTableHeaders() + || (ppMeta != null && ppMeta.getExtendedMeta(HtmlBeanPropertyMeta.class).isNoTableHeaders()))) { out.sTag(i+1, "tr").nl(i+2); out.sTag(i+2, "th").append("key").eTag("th").nl(i+3); out.sTag(i+2, "th").append("value").eTag("th").nl(i+3); @@ -420,7 +430,8 @@ public class HtmlSerializer extends XmlSerializer { out.ie(i).eTag("table").nl(i); } - private void serializeBeanMap(HtmlSerializerSession session, HtmlWriter out, BeanMap<?> m, ClassMeta<?> eType, BeanPropertyMeta ppMeta) throws Exception { + private void serializeBeanMap(HtmlSerializerSession session, HtmlWriter out, BeanMap<?> m, ClassMeta<?> eType, + BeanPropertyMeta ppMeta) throws Exception { int i = session.getIndent(); out.oTag(i, "table"); @@ -430,7 +441,8 @@ public class HtmlSerializer extends XmlSerializer { out.attr(session.getBeanTypePropertyName(m.getClassMeta()), typeName); out.append('>').nl(i); - if (session.isAddKeyValueTableHeaders() && ! (m.getClassMeta().getExtendedMeta(HtmlClassMeta.class).isNoTableHeaders() || (ppMeta != null && ppMeta.getExtendedMeta(HtmlBeanPropertyMeta.class).isNoTableHeaders()))) { + if (session.isAddKeyValueTableHeaders() && ! (m.getClassMeta().getExtendedMeta(HtmlClassMeta.class).isNoTableHeaders() + || (ppMeta != null && ppMeta.getExtendedMeta(HtmlBeanPropertyMeta.class).isNoTableHeaders()))) { out.sTag(i+1, "tr").nl(i+1); out.sTag(i+2, "th").append("key").eTag("th").nl(i+2); out.sTag(i+2, "th").append("value").eTag("th").nl(i+2); @@ -483,7 +495,8 @@ public class HtmlSerializer extends XmlSerializer { } @SuppressWarnings({ "rawtypes", "unchecked" }) - private void serializeCollection(HtmlSerializerSession session, HtmlWriter out, Object in, ClassMeta<?> sType, ClassMeta<?> eType, String name, BeanPropertyMeta ppMeta) throws Exception { + private void serializeCollection(HtmlSerializerSession session, HtmlWriter out, Object in, ClassMeta<?> sType, + ClassMeta<?> eType, String name, BeanPropertyMeta ppMeta) throws Exception { ClassMeta<?> seType = sType.getElementType(); if (seType == null) @@ -508,7 +521,8 @@ public class HtmlSerializer extends XmlSerializer { HtmlBeanPropertyMeta hbpMeta = (ppMeta == null ? null : ppMeta.getExtendedMeta(HtmlBeanPropertyMeta.class)); String btpn = session.getBeanTypePropertyName(eType); - // Look at the objects to see how we're going to handle them. Check the first object to see how we're going to handle this. + // Look at the objects to see how we're going to handle them. Check the first object to see how we're going to + // handle this. // If it's a map or bean, then we'll create a table. // Otherwise, we'll create a list. Object[] th = getTableHeaders(session, c, hbpMeta); @@ -767,7 +781,8 @@ public class HtmlSerializer extends XmlSerializer { //-------------------------------------------------------------------------------- @Override /* Serializer */ - public HtmlSerializerSession createSession(Object output, ObjectMap op, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) { + public HtmlSerializerSession createSession(Object output, ObjectMap op, Method javaMethod, Locale locale, + TimeZone timeZone, MediaType mediaType, UriContext uriContext) { return new HtmlSerializerSession(ctx, op, output, javaMethod, locale, timeZone, mediaType, uriContext); } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java index 5073f67..3a3c620 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java @@ -35,6 +35,7 @@ public class HtmlSerializerBuilder extends XmlSerializerBuilder { /** * Constructor. + * * @param propertyStore The initial configuration settings for this builder. */ public HtmlSerializerBuilder(PropertyStore propertyStore) { @@ -62,15 +63,17 @@ public class HtmlSerializerBuilder extends XmlSerializerBuilder { * </ul> * <p> * When creating anchor tags (e.g. <code><xt><a</xt> <xa>href</xa>=<xs>'...'</xs><xt>></xt>text<xt></a></xt></code>) - * in HTML, this setting defines what to set the inner text to. + * in HTML, this setting defines what to set the inner text to. * <p> * Possible values: * <ul class='spaced-list'> - * <li>{@link HtmlSerializerContext#TO_STRING} / <js>"toString"</js> - Set to whatever is returned by {@link #toString()} on the object. + * <li>{@link HtmlSerializerContext#TO_STRING} / <js>"toString"</js> - Set to whatever is returned by + * {@link #toString()} on the object. * <li>{@link HtmlSerializerContext#URI} / <js>"uri"</js> - Set to the URI value. * <li>{@link HtmlSerializerContext#LAST_TOKEN} / <js>"lastToken"</js> - Set to the last token of the URI value. * <li>{@link HtmlSerializerContext#PROPERTY_NAME} / <js>"propertyName"</js> - Set to the bean property name. - * <li>{@link HtmlSerializerContext#URI_ANCHOR} / <js>"uriAnchor"</js> - Set to the anchor of the URL. (e.g. <js>"http://localhost:9080/foobar#anchorTextHere"</js>) + * <li>{@link HtmlSerializerContext#URI_ANCHOR} / <js>"uriAnchor"</js> - Set to the anchor of the URL. + * (e.g. <js>"http://localhost:9080/foobar#anchorTextHere"</js>) * </ul> * <p> * <h5 class='section'>Notes:</h5> @@ -143,7 +146,8 @@ public class HtmlSerializerBuilder extends XmlSerializerBuilder { } /** - * <b>Configuration property:</b> The parameter name to use when using {@link HtmlSerializerContext#HTML_lookForLabelParameters}. + * <b>Configuration property:</b> The parameter name to use when using + * {@link HtmlSerializerContext#HTML_lookForLabelParameters}. * <p> * <ul> * <li><b>Name:</b> <js>"HtmlSerializer.labelParameter"</js> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java index fded1ab..11a43c0 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java @@ -26,9 +26,11 @@ import org.apache.juneau.xml.*; * * <h6 class='topic'>Inherited configurable properties</h6> * <ul class='doctree'> - * <li class='jc'><a class="doclink" href="../BeanContext.html#ConfigProperties">BeanContext</a> - Properties associated with handling beans on serializers and parsers. + * <li class='jc'><a class="doclink" href="../BeanContext.html#ConfigProperties">BeanContext</a> - Properties + * associated with handling beans on serializers and parsers. * <ul> - * <li class='jc'><a class="doclink" href="../serializer/SerializerContext.html#ConfigProperties">SerializerContext</a> - Configurable properties common to all serializers. + * <li class='jc'><a class="doclink" href="../serializer/SerializerContext.html#ConfigProperties"> + * SerializerContext</a> - Configurable properties common to all serializers. * </ul> * </ul> */ @@ -44,16 +46,18 @@ public class HtmlSerializerContext extends XmlSerializerContext { * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> * <p> - * When creating anchor tags (e.g. <code><xt><a</xt> <xa>href</xa>=<xs>'...'</xs><xt>></xt>text<xt></a></xt></code>) - * in HTML, this setting defines what to set the inner text to. + * When creating anchor tags (e.g. <code><xt><a</xt> <xa>href</xa>=<xs>'...'</xs> + * <xt>></xt>text<xt></a></xt></code>) in HTML, this setting defines what to set the inner text to. * <p> * Possible values: * <ul class='spaced-list'> - * <li>{@link #TO_STRING} / <js>"toString"</js> - Set to whatever is returned by {@link #toString()} on the object. + * <li>{@link #TO_STRING} / <js>"toString"</js> - Set to whatever is returned by {@link #toString()} on the + * object. * <li>{@link #URI} / <js>"uri"</js> - Set to the URI value. * <li>{@link #LAST_TOKEN} / <js>"lastToken"</js> - Set to the last token of the URI value. * <li>{@link #PROPERTY_NAME} / <js>"propertyName"</js> - Set to the bean property name. - * <li>{@link #URI_ANCHOR} / <js>"uriAnchor"</js> - Set to the anchor of the URL. (e.g. <js>"http://localhost:9080/foobar#anchorTextHere"</js>) + * <li>{@link #URI_ANCHOR} / <js>"uriAnchor"</js> - Set to the anchor of the URL. + * (e.g. <js>"http://localhost:9080/foobar#anchorTextHere"</js>) * </ul> */ public static final String HTML_uriAnchorText = "HtmlSerializer.uriAnchorText"; @@ -81,7 +85,7 @@ public class HtmlSerializerContext extends XmlSerializerContext { * </ul> * <p> * If a string looks like a URL (e.g. starts with <js>"http://"</js> or <js>"https://"</js>, then treat it like a URL - * and make it into a hyperlink based on the rules specified by {@link #HTML_uriAnchorText}. + * and make it into a hyperlink based on the rules specified by {@link #HTML_uriAnchorText}. */ public static final String HTML_detectLinksInStrings = "HtmlSerializer.detectLinksInStrings"; @@ -110,7 +114,6 @@ public class HtmlSerializerContext extends XmlSerializerContext { * <li><b>Default:</b> <js>"label"</js> * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> - * <p> */ public static final String HTML_labelParameter = "HtmlSerializer.labelParameter"; @@ -123,7 +126,6 @@ public class HtmlSerializerContext extends XmlSerializerContext { * <li><b>Default:</b> <jk>false</jk> * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> - * <p> */ public static final String HTML_addKeyValueTableHeaders = "HtmlSerializer.addKeyValueTableHeaders"; @@ -137,9 +139,11 @@ public class HtmlSerializerContext extends XmlSerializerContext { * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> * <p> - * If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred through reflection. + * If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred + * through reflection. * This is used to recreate the correct objects during parsing if the object types cannot be inferred. - * For example, when serializing a {@code Map<String,Object>} field, where the bean class cannot be determined from the value type. + * For example, when serializing a {@code Map<String,Object>} field, where the bean class cannot be determined + * from the value type. * <p> * When present, this value overrides the {@link SerializerContext#SERIALIZER_addBeanTypeProperties} setting and is * provided to customize the behavior of specific serializers in a {@link SerializerGroup}. @@ -169,7 +173,8 @@ public class HtmlSerializerContext extends XmlSerializerContext { detectLinksInStrings = ps.getProperty(HTML_detectLinksInStrings, Boolean.class, true); labelParameter = ps.getProperty(HTML_labelParameter, String.class, "label"); addKeyValueTableHeaders = ps.getProperty(HTML_addKeyValueTableHeaders, Boolean.class, false); - addBeanTypeProperties = ps.getProperty(HTML_addBeanTypeProperties, boolean.class, ps.getProperty(SERIALIZER_addBeanTypeProperties, boolean.class, true)); + addBeanTypeProperties = ps.getProperty(HTML_addBeanTypeProperties, boolean.class, + ps.getProperty(SERIALIZER_addBeanTypeProperties, boolean.class, true)); } @Override /* Context */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerSession.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerSession.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerSession.java index 6f528dd..5377a8a 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerSession.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerSession.java @@ -64,7 +64,8 @@ public class HtmlSerializerSession extends XmlSerializerSession { * @param uriContext The URI context. * Identifies the current request URI used for resolution of URIs to absolute or root-relative form. */ - protected HtmlSerializerSession(HtmlSerializerContext ctx, ObjectMap op, Object output, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) { + protected HtmlSerializerSession(HtmlSerializerContext ctx, ObjectMap op, Object output, Method javaMethod, + Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) { super(ctx, op, output, javaMethod, locale, timeZone, mediaType, uriContext); String labelParameter; if (op == null || op.isEmpty()) { @@ -90,14 +91,16 @@ public class HtmlSerializerSession extends XmlSerializerSession { Object output = getOutput(); if (output instanceof HtmlWriter) return (HtmlWriter)output; - return new HtmlWriter(super.getWriter(), isUseWhitespace(), getMaxIndent(), isTrimStrings(), getQuoteChar(), getUriResolver()); + return new HtmlWriter(super.getWriter(), isUseWhitespace(), getMaxIndent(), isTrimStrings(), getQuoteChar(), + getUriResolver()); } /** * Returns <jk>true</jk> if the specified object is a URL. * * @param cm The ClassMeta of the object being serialized. - * @param pMeta The property metadata of the bean property of the object. Can be <jk>null</jk> if the object isn't from a bean property. + * @param pMeta The property metadata of the bean property of the object. + * Can be <jk>null</jk> if the object isn't from a bean property. * @param o The object. * @return <jk>true</jk> if the specified object is a URL. */ @@ -114,7 +117,8 @@ public class HtmlSerializerSession extends XmlSerializerSession { /** * Returns the anchor text to use for the specified URL object. * - * @param pMeta The property metadata of the bean property of the object. Can be <jk>null</jk> if the object isn't from a bean property. + * @param pMeta The property metadata of the bean property of the object. + * Can be <jk>null</jk> if the object isn't from a bean property. * @param o The URL object. * @return The anchor text to use for the specified URL object. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java index 815e2ef..a43f1e7 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java @@ -30,7 +30,8 @@ import org.apache.juneau.serializer.*; * * <h5 class='section'>Description:</h5> * <p> - * Produces the same output as {@link HtmlDocSerializer}, but without the header and body tags and page title and description. + * Produces the same output as {@link HtmlDocSerializer}, but without the header and body tags and page title and + * description. * Used primarily for JUnit testing the {@link HtmlDocSerializer} class. */ @Produces(value="text/html+stripped",contentType="text/html") http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/HtmlWriter.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlWriter.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlWriter.java index fbbd225..559cae4 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlWriter.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlWriter.java @@ -34,7 +34,8 @@ public class HtmlWriter extends XmlWriter { * @param quoteChar The quote character to use (i.e. <js>'\''</js> or <js>'"'</js>) * @param uriResolver The URI resolver for resolving URIs to absolute or root-relative form. */ - public HtmlWriter(Writer out, boolean useWhitespace, int maxIndent, boolean trimStrings, char quoteChar, UriResolver uriResolver) { + public HtmlWriter(Writer out, boolean useWhitespace, int maxIndent, boolean trimStrings, char quoteChar, + UriResolver uriResolver) { super(out, useWhitespace, maxIndent, trimStrings, quoteChar, uriResolver, false, null); } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/SimpleHtmlWriter.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/SimpleHtmlWriter.java b/juneau-core/src/main/java/org/apache/juneau/html/SimpleHtmlWriter.java index fcac7ec..299ba7d 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/SimpleHtmlWriter.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/SimpleHtmlWriter.java @@ -19,7 +19,8 @@ import java.io.*; * * <h5 class='section'>Example:</h5> * <p class='bcode'> - * String table = <jk>new</jk> SimpleHtmlWriter().sTag(<js>"table"</js>).sTag(<js>"tr"</js>).sTag(<js>"td"</js>).append(<js>"hello"</js>).eTag(<js>"td"</js>).eTag(<js>"tr"</js>).eTag(<js>"table"</js>).toString(); + * String table = <jk>new</jk> SimpleHtmlWriter().sTag(<js>"table"</js>).sTag(<js>"tr"</js>).sTag(<js>"td"</js>) + * .append(<js>"hello"</js>).eTag(<js>"td"</js>).eTag(<js>"tr"</js>).eTag(<js>"table"</js>).toString(); * </p> */ public class SimpleHtmlWriter extends HtmlWriter { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/html/package.html ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/package.html b/juneau-core/src/main/java/org/apache/juneau/html/package.html index c07f97a..83e97fa 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/package.html +++ b/juneau-core/src/main/java/org/apache/juneau/html/package.html @@ -117,7 +117,8 @@ Maps and beans are represented as tables. </p> <p> - The <xa>_type</xa> attribute is added to differentiate between objects (maps/beans) and arrays (arrays/collections). + The <xa>_type</xa> attribute is added to differentiate between objects (maps/beans) and arrays + (arrays/collections). </p> <table class='styled' style='width:auto'> <tr> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/http/Accept.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Accept.java b/juneau-core/src/main/java/org/apache/juneau/http/Accept.java index 9fa6971..cdf7fa7 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Accept.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Accept.java @@ -128,7 +128,8 @@ import org.apache.juneau.internal.*; * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.http</a> - * <li class='extlink'><a class='doclink' href='https://www.w3.org/Protocols/rfc2616/rfc2616.html'>Hypertext Transfer Protocol -- HTTP/1.1</a> + * <li class='extlink'><a class='doclink' href='https://www.w3.org/Protocols/rfc2616/rfc2616.html'> + * Hypertext Transfer Protocol -- HTTP/1.1</a> * </ul> */ public final class Accept { @@ -175,13 +176,16 @@ public final class Accept { * <p> * Note that fuzzy matching is allowed on the media types where the <code>Accept</code> header may * contain additional subtype parts. - * <br>For example, given identical q-values and an <code>Accept</code> value of <js>"text/json+activity"</js>, + * <br> + * For example, given identical q-values and an <code>Accept</code> value of <js>"text/json+activity"</js>, * the media type <js>"text/json"</js> will match if <js>"text/json+activity"</js> or <js>"text/activity+json"</js> * isn't found. - * <br>The purpose for this is to allow serializers to match when artifacts such as <code>id</code> properties are present - * in the header. + * <br> + * The purpose for this is to allow serializers to match when artifacts such as <code>id</code> properties are + * present in the header. * <p> - * See <a class='doclink' href='https://www.w3.org/TR/activitypub/#retrieving-objects'>ActivityPub / Retrieving Objects</a> + * See <a class='doclink' href='https://www.w3.org/TR/activitypub/#retrieving-objects'> + * ActivityPub / Retrieving Objects</a> * <p> * * @param mediaTypes The media types to match against. @@ -217,10 +221,11 @@ public final class Accept { * Convenience method for searching through all of the subtypes of all the media ranges in this header * for the presence of a subtype fragment. * <p> - * For example, given the header <js>"text/json+activity"</js>, calling <code>hasSubtypePart(<js>"activity"</js>)</code> returns <jk>true</jk>. + * For example, given the header <js>"text/json+activity"</js>, calling + * <code>hasSubtypePart(<js>"activity"</js>)</code> returns <jk>true</jk>. * * @param part The media type subtype fragment. - * @return <jk>true</jk> if subtype fragement exists. + * @return <jk>true</jk> if subtype fragment exists. */ public boolean hasSubtypePart(String part) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/http/AcceptCharset.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/AcceptCharset.java b/juneau-core/src/main/java/org/apache/juneau/http/AcceptCharset.java index d208291..5a88ba5 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/AcceptCharset.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/AcceptCharset.java @@ -61,7 +61,8 @@ import org.apache.juneau.internal.*; * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.http</a> - * <li class='extlink'><a class='doclink' href='https://www.w3.org/Protocols/rfc2616/rfc2616.html'>Hypertext Transfer Protocol -- HTTP/1.1</a> + * <li class='extlink'><a class='doclink' href='https://www.w3.org/Protocols/rfc2616/rfc2616.html'> + * Hypertext Transfer Protocol -- HTTP/1.1</a> * </ul> */ public final class AcceptCharset extends HeaderRangeArray { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/http/AcceptEncoding.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/AcceptEncoding.java b/juneau-core/src/main/java/org/apache/juneau/http/AcceptEncoding.java index f7926d7..fa6f918 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/AcceptEncoding.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/AcceptEncoding.java @@ -28,7 +28,8 @@ import org.apache.juneau.internal.*; * * <h6 class='topic'>RFC2616 Specification</h6> * - * The Accept-Encoding request-header field is similar to Accept, but restricts the content-codings (section 3.5) that are acceptable in the response. + * The Accept-Encoding request-header field is similar to Accept, but restricts the content-codings (section 3.5) that + * are acceptable in the response. * * <p class='bcode'> * Accept-Encoding = "Accept-Encoding" ":" @@ -80,7 +81,8 @@ import org.apache.juneau.internal.*; * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.http</a> - * <li class='extlink'><a class='doclink' href='https://www.w3.org/Protocols/rfc2616/rfc2616.html'>Hypertext Transfer Protocol -- HTTP/1.1</a> + * <li class='extlink'><a class='doclink' href='https://www.w3.org/Protocols/rfc2616/rfc2616.html'> + * Hypertext Transfer Protocol -- HTTP/1.1</a> * </ul> */ public final class AcceptEncoding extends HeaderRangeArray { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/http/AcceptLanguage.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/AcceptLanguage.java b/juneau-core/src/main/java/org/apache/juneau/http/AcceptLanguage.java index ddc9242..3e6805d 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/AcceptLanguage.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/AcceptLanguage.java @@ -88,7 +88,8 @@ import org.apache.juneau.internal.*; * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.http</a> - * <li class='extlink'><a class='doclink' href='https://www.w3.org/Protocols/rfc2616/rfc2616.html'>Hypertext Transfer Protocol -- HTTP/1.1</a> + * <li class='extlink'><a class='doclink' href='https://www.w3.org/Protocols/rfc2616/rfc2616.html'> + * Hypertext Transfer Protocol -- HTTP/1.1</a> * </ul> */ public final class AcceptLanguage extends HeaderRangeArray { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/http/AcceptRanges.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/AcceptRanges.java b/juneau-core/src/main/java/org/apache/juneau/http/AcceptRanges.java index b05a427..6bd4051 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/AcceptRanges.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/AcceptRanges.java @@ -52,7 +52,8 @@ package org.apache.juneau.http; * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.http</a> - * <li class='extlink'><a class='doclink' href='https://www.w3.org/Protocols/rfc2616/rfc2616.html'>Hypertext Transfer Protocol -- HTTP/1.1</a> + * <li class='extlink'><a class='doclink' href='https://www.w3.org/Protocols/rfc2616/rfc2616.html'> + * Hypertext Transfer Protocol -- HTTP/1.1</a> * </ul> */ public final class AcceptRanges extends HeaderString { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/http/Age.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Age.java b/juneau-core/src/main/java/org/apache/juneau/http/Age.java index 08bb513..a452e5b 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Age.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Age.java @@ -47,7 +47,8 @@ package org.apache.juneau.http; * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.http</a> - * <li class='extlink'><a class='doclink' href='https://www.w3.org/Protocols/rfc2616/rfc2616.html'>Hypertext Transfer Protocol -- HTTP/1.1</a> + * <li class='extlink'><a class='doclink' href='https://www.w3.org/Protocols/rfc2616/rfc2616.html'> + * Hypertext Transfer Protocol -- HTTP/1.1</a> * </ul> */ public final class Age extends HeaderInteger {
