Clean up Javadocs Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau/commit/d45e1351 Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau/tree/d45e1351 Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau/diff/d45e1351
Branch: refs/heads/master Commit: d45e1351dd8a1569315200e9b80911a69695d194 Parents: a8d50ab Author: jamesbognar <[email protected]> Authored: Thu Sep 15 17:25:20 2016 -0400 Committer: jamesbognar <[email protected]> Committed: Thu Sep 15 17:25:20 2016 -0400 ---------------------------------------------------------------------- .../.settings/org.eclipse.wst.html.core.prefs | 2 +- .../java/org/apache/juneau/BeanContext.java | 439 +++++- .../java/org/apache/juneau/csv/package.html | 2 - .../juneau/html/HtmlDocSerializerContext.java | 126 +- .../apache/juneau/html/HtmlParserContext.java | 15 + .../juneau/html/HtmlSerializerContext.java | 72 +- .../org/apache/juneau/internal/package.html | 42 + .../apache/juneau/jena/RdfCommonContext.java | 442 +++++- .../java/org/apache/juneau/jena/RdfParser.java | 2 +- .../apache/juneau/jena/RdfParserContext.java | 36 +- .../apache/juneau/jena/RdfParserSession.java | 14 +- .../org/apache/juneau/jena/RdfSerializer.java | 2 +- .../juneau/jena/RdfSerializerContext.java | 78 +- .../juneau/jena/RdfSerializerSession.java | 14 +- .../java/org/apache/juneau/jena/package.html | 10 +- .../apache/juneau/json/JsonParserContext.java | 28 +- .../juneau/json/JsonSerializerContext.java | 57 +- .../java/org/apache/juneau/json/package.html | 4 +- .../juneau/msgpack/MsgPackParserContext.java | 14 + .../msgpack/MsgPackSerializerContext.java | 13 + .../org/apache/juneau/parser/ParserContext.java | 39 +- .../juneau/serializer/SerializerContext.java | 263 +++- .../juneau/serializer/SerializerSession.java | 16 +- .../juneau/soap/SoapXmlSerializerContext.java | 28 +- .../org/apache/juneau/svl/vars/package.html | 41 + .../juneau/urlencoding/UonParserContext.java | 45 +- .../urlencoding/UonSerializerContext.java | 59 +- .../org/apache/juneau/urlencoding/package.html | 2 +- .../org/apache/juneau/xml/XmlParserContext.java | 141 +- .../org/apache/juneau/xml/XmlSerializer.java | 44 +- .../apache/juneau/xml/XmlSerializerContext.java | 141 +- .../java/org/apache/juneau/xml/package.html | 183 +-- juneau-core/src/main/javadoc/overview.html | 1211 ++++++++++------ .../java/org/apache/juneau/html/CommonTest.java | 8 +- .../java/org/apache/juneau/jena/CommonTest.java | 8 +- .../java/org/apache/juneau/jena/RdfTest.java | 4 +- .../java/org/apache/juneau/json/CommonTest.java | 8 +- .../juneau/urlencoding/Common_UonTest.java | 8 +- .../urlencoding/Common_UrlEncodingTest.java | 8 +- .../java/org/apache/juneau/xml/CommonTest.java | 8 +- juneau-releng/user-dictionary.txt | 12 + juneau-server-test/META-INF/MANIFEST.MF | 2 +- .../juneau/server/AcceptCharsetResource.java | 75 - .../server/BeanContextPropertiesResource.java | 41 - .../juneau/server/CallbackStringsResource.java | 52 - .../juneau/server/CharsetEncodingsResource.java | 54 - .../juneau/server/ClientVersionResource.java | 93 -- .../apache/juneau/server/ConfigResource.java | 37 - .../apache/juneau/server/ContentResource.java | 80 - .../java/org/apache/juneau/server/DTO2s.java | 139 -- .../server/DefaultContentTypesResource.java | 127 -- .../juneau/server/ErrorConditionsResource.java | 134 -- .../apache/juneau/server/GroupsResource.java | 71 - .../org/apache/juneau/server/GzipResource.java | 110 -- .../juneau/server/InheritanceResource.java | 316 ---- .../org/apache/juneau/server/LargePojo.java | 45 - .../juneau/server/LargePojosResource.java | 39 - .../apache/juneau/server/MessagesResource.java | 61 - .../juneau/server/NlsPropertyResource.java | 60 - .../org/apache/juneau/server/NlsResource.java | 194 --- .../juneau/server/NoParserInputResource.java | 55 - .../juneau/server/OnPostCallResource.java | 93 -- .../apache/juneau/server/OnPreCallResource.java | 84 -- .../server/OptionsWithoutNlsResource.java | 43 - .../server/OverlappingMethodsResource.java | 145 -- .../apache/juneau/server/ParamsResource.java | 292 ---- .../apache/juneau/server/ParsersResource.java | 111 -- .../org/apache/juneau/server/PathResource.java | 68 - .../org/apache/juneau/server/PathsResource.java | 72 - .../juneau/server/PropertiesResource.java | 89 -- .../juneau/server/RestClient2Resource.java | 35 - .../java/org/apache/juneau/server/Root.java | 70 - .../juneau/server/SerializersResource.java | 102 -- .../juneau/server/StaticFilesResource.java | 35 - .../juneau/server/TransformsParentResource.java | 25 - .../juneau/server/TransformsResource.java | 113 -- .../org/apache/juneau/server/UrisResource.java | 120 -- .../juneau/server/UrlContentResource.java | 58 - .../server/test/AcceptCharsetResource.java | 76 + .../test/BeanContextPropertiesResource.java | 42 + .../server/test/CallbackStringsResource.java | 53 + .../server/test/CharsetEncodingsResource.java | 55 + .../server/test/ClientVersionResource.java | 93 ++ .../juneau/server/test/ConfigResource.java | 38 + .../juneau/server/test/ContentResource.java | 81 ++ .../org/apache/juneau/server/test/DTO2s.java | 139 ++ .../test/DefaultContentTypesResource.java | 128 ++ .../server/test/ErrorConditionsResource.java | 135 ++ .../juneau/server/test/GroupsResource.java | 72 + .../apache/juneau/server/test/GzipResource.java | 111 ++ .../juneau/server/test/InheritanceResource.java | 317 ++++ .../apache/juneau/server/test/LargePojo.java | 45 + .../juneau/server/test/LargePojosResource.java | 39 + .../juneau/server/test/MessagesResource.java | 62 + .../juneau/server/test/NlsPropertyResource.java | 61 + .../apache/juneau/server/test/NlsResource.java | 195 +++ .../server/test/NoParserInputResource.java | 56 + .../juneau/server/test/OnPostCallResource.java | 94 ++ .../juneau/server/test/OnPreCallResource.java | 85 ++ .../server/test/OptionsWithoutNlsResource.java | 44 + .../server/test/OverlappingMethodsResource.java | 146 ++ .../juneau/server/test/ParamsResource.java | 293 ++++ .../juneau/server/test/ParsersResource.java | 112 ++ .../apache/juneau/server/test/PathResource.java | 69 + .../juneau/server/test/PathsResource.java | 73 + .../juneau/server/test/PropertiesResource.java | 90 ++ .../juneau/server/test/RestClient2Resource.java | 36 + .../org/apache/juneau/server/test/Root.java | 71 + .../juneau/server/test/SerializersResource.java | 103 ++ .../juneau/server/test/StaticFilesResource.java | 36 + .../server/test/TransformsParentResource.java | 26 + .../juneau/server/test/TransformsResource.java | 113 ++ .../apache/juneau/server/test/UrisResource.java | 121 ++ .../juneau/server/test/UrlContentResource.java | 59 + .../juneau/server/Messages2Resource.properties | 16 - .../juneau/server/MessagesResource.properties | 16 - .../server/NlsPropertyResource.properties | 16 - .../apache/juneau/server/NlsResource.properties | 79 - .../server/test/Messages2Resource.properties | 16 + .../server/test/MessagesResource.properties | 16 + .../server/test/NlsPropertyResource.properties | 16 + .../juneau/server/test/NlsResource.properties | 79 + .../apache/juneau/server/test/xdocs/test.txt | 13 + .../juneau/server/test/xdocs/xdocs/test.txt | 13 + .../org/apache/juneau/server/xdocs/test.txt | 13 - .../apache/juneau/server/xdocs/xdocs/test.txt | 13 - .../apache/juneau/server/AcceptCharsetTest.java | 123 -- .../server/BeanContextPropertiesTest.java | 37 - .../juneau/server/CallbackStringsTest.java | 50 - .../juneau/server/CharsetEncodingsTest.java | 96 -- .../apache/juneau/server/ClientVersionTest.java | 90 -- .../org/apache/juneau/server/ConfigTest.java | 58 - .../org/apache/juneau/server/Constants.java | 53 - .../org/apache/juneau/server/ContentTest.java | 706 --------- .../java/org/apache/juneau/server/DTOs.java | 139 -- .../juneau/server/DefaultContentTypesTest.java | 497 ------- .../juneau/server/ErrorConditionsTest.java | 220 --- .../org/apache/juneau/server/GroupsTest.java | 122 -- .../java/org/apache/juneau/server/GzipTest.java | 344 ----- .../apache/juneau/server/InheritanceTest.java | 126 -- .../apache/juneau/server/JacocoDummyTest.java | 37 - .../apache/juneau/server/LargePojosTest.java | 83 -- .../org/apache/juneau/server/MessagesTest.java | 47 - .../apache/juneau/server/NlsPropertyTest.java | 48 - .../java/org/apache/juneau/server/NlsTest.java | 170 --- .../apache/juneau/server/NoParserInputTest.java | 70 - .../apache/juneau/server/OnPostCallTest.java | 121 -- .../org/apache/juneau/server/OnPreCallTest.java | 61 - .../juneau/server/OptionsWithoutNlsTest.java | 51 - .../juneau/server/OverlappingMethodsTest.java | 170 --- .../org/apache/juneau/server/ParamsTest.java | 716 --------- .../org/apache/juneau/server/ParsersTest.java | 162 --- .../java/org/apache/juneau/server/PathTest.java | 44 - .../org/apache/juneau/server/PathsTest.java | 1368 ------------------ .../apache/juneau/server/PropertiesTest.java | 48 - .../apache/juneau/server/RestClientTest.java | 199 --- .../org/apache/juneau/server/RestUtilsTest.java | 188 --- .../apache/juneau/server/SerializersTest.java | 152 -- .../apache/juneau/server/StaticFilesTest.java | 56 - .../apache/juneau/server/TestRestClient.java | 69 - .../org/apache/juneau/server/TestUtils.java | 60 - .../apache/juneau/server/TransformsTest.java | 68 - .../java/org/apache/juneau/server/UrisTest.java | 918 ------------ .../apache/juneau/server/UrlContentTest.java | 74 - .../juneau/server/UrlPathPatternTest.java | 39 - .../juneau/server/test/AcceptCharsetTest.java | 123 ++ .../server/test/BeanContextPropertiesTest.java | 37 + .../juneau/server/test/CallbackStringsTest.java | 50 + .../server/test/CharsetEncodingsTest.java | 96 ++ .../juneau/server/test/ClientVersionTest.java | 90 ++ .../apache/juneau/server/test/ConfigTest.java | 59 + .../apache/juneau/server/test/Constants.java | 53 + .../apache/juneau/server/test/ContentTest.java | 706 +++++++++ .../org/apache/juneau/server/test/DTOs.java | 139 ++ .../server/test/DefaultContentTypesTest.java | 497 +++++++ .../juneau/server/test/ErrorConditionsTest.java | 220 +++ .../apache/juneau/server/test/GroupsTest.java | 122 ++ .../org/apache/juneau/server/test/GzipTest.java | 344 +++++ .../juneau/server/test/InheritanceTest.java | 126 ++ .../juneau/server/test/JacocoDummyTest.java | 38 + .../juneau/server/test/LargePojosTest.java | 83 ++ .../apache/juneau/server/test/MessagesTest.java | 47 + .../juneau/server/test/NlsPropertyTest.java | 48 + .../org/apache/juneau/server/test/NlsTest.java | 170 +++ .../juneau/server/test/NoParserInputTest.java | 70 + .../juneau/server/test/OnPostCallTest.java | 121 ++ .../juneau/server/test/OnPreCallTest.java | 61 + .../server/test/OptionsWithoutNlsTest.java | 51 + .../server/test/OverlappingMethodsTest.java | 170 +++ .../apache/juneau/server/test/ParamsTest.java | 716 +++++++++ .../apache/juneau/server/test/ParsersTest.java | 162 +++ .../org/apache/juneau/server/test/PathTest.java | 44 + .../apache/juneau/server/test/PathsTest.java | 1368 ++++++++++++++++++ .../juneau/server/test/PropertiesTest.java | 48 + .../juneau/server/test/RestClientTest.java | 199 +++ .../juneau/server/test/RestUtilsTest.java | 188 +++ .../juneau/server/test/SerializersTest.java | 152 ++ .../juneau/server/test/StaticFilesTest.java | 56 + .../juneau/server/test/TestRestClient.java | 69 + .../apache/juneau/server/test/TestUtils.java | 60 + .../juneau/server/test/TransformsTest.java | 68 + .../org/apache/juneau/server/test/UrisTest.java | 918 ++++++++++++ .../juneau/server/test/UrlContentTest.java | 74 + .../juneau/server/test/UrlPathPatternTest.java | 40 + .../juneau/server/RestServletContext.java | 114 +- .../org/apache/juneau/server/vars/package.html | 41 + pom.xml | 2 +- 207 files changed, 14160 insertions(+), 12064 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/d45e1351/juneau-core/.settings/org.eclipse.wst.html.core.prefs ---------------------------------------------------------------------- diff --git a/juneau-core/.settings/org.eclipse.wst.html.core.prefs b/juneau-core/.settings/org.eclipse.wst.html.core.prefs index 926f31c..3b4d468 100644 --- a/juneau-core/.settings/org.eclipse.wst.html.core.prefs +++ b/juneau-core/.settings/org.eclipse.wst.html.core.prefs @@ -44,7 +44,7 @@ elemUnclosedEndTag=1 elemUnclosedStartTag=1 elemUnknownName=2 elemUnnecessaryEnd=2 -elementNamesToIgnore=jc,jd,jt,jk,js,jf,jsf,jsm,ja,xt,xa,xc,xs,mk,mv,cc,cs,ck,ce,cv,l,properties +elementNamesToIgnore=jc,jd,jt,jk,js,jf,jsa,jsf,jsm,jss,ja,xt,xa,xc,xs,mk,mv,cc,cs,ck,ce,cv,l,properties ignoreAttrNames=false ignoreElementNames=true piInvalidContent=2 http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/d45e1351/juneau-core/src/main/java/org/apache/juneau/BeanContext.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/BeanContext.java b/juneau-core/src/main/java/org/apache/juneau/BeanContext.java index 0834363..f0225f3 100644 --- a/juneau-core/src/main/java/org/apache/juneau/BeanContext.java +++ b/juneau-core/src/main/java/org/apache/juneau/BeanContext.java @@ -55,8 +55,8 @@ import org.apache.juneau.transform.*; * The settings on a bean context are fixed at the point they are created by the factory. * * - * <h5 class='topic'>BeanContext settings</h5> - * <code>BeanContexts</code> have several settings that can be used to tweak behavior on how beans are handled. + * <h5 class='topic'>BeanContext configuration properties</h5> + * <code>BeanContexts</code> have several configuration properties that can be used to tweak behavior on how beans are handled. * These are denoted as the static <jsf>BEAN_*</jsf> fields on this class. * <p> * Some settings (e.g. {@link BeanContext#BEAN_beansRequireDefaultConstructor}) are used to differentiate between bean and non-bean classes. @@ -85,6 +85,189 @@ import org.apache.juneau.transform.*; * </p> * * + * <h6 class='topic' id='ConfigProperties'>Properties associated with handling beans on serializers and parsers</h6> + * <table class='styled' style='border-collapse: collapse;'> + * <tr><th>Setting name</th><th>Description</th><th>Data type</th><th>Default value</th></tr> + * <tr> + * <td>{@link #BEAN_beansRequireDefaultConstructor}</td> + * <td>Beans require no-arg constructors.</td> + * <td><code>Boolean</code></td> + * <td><jk>false</jk></td> + * </tr> + * <tr> + * <td>{@link #BEAN_beansRequireSerializable}</td> + * <td>Beans require Serializable interface.</td> + * <td><code>Boolean</code></td> + * <td><jk>false</jk></td> + * </tr> + * <tr> + * <td>{@link #BEAN_beansRequireSettersForGetters}</td> + * <td>Beans require setters for getters.</td> + * <td><code>Boolean</code></td> + * <td><jk>false</jk></td> + * </tr> + * <tr> + * <td>{@link #BEAN_beansRequireSomeProperties}</td> + * <td>Beans require at least one property.</td> + * <td><code>Boolean</code></td> + * <td><jk>true</jk></td> + * </tr> + * <tr> + * <td>{@link #BEAN_beanMapPutReturnsOldValue}</td> + * <td>{@link BeanMap#put(String,Object) BeanMap.put()} method will return old property value.</td> + * <td><code>Boolean</code></td> + * <td><jk>false</jk></td> + * </tr> + * <tr> + * <td>{@link #BEAN_beanConstructorVisibility}</td> + * <td>Look for bean constructors with specified minimum visibility.</td> + * <td>{@link Visibility}</td> + * <td>{@link Visibility#PUBLIC}</td> + * </tr> + * <tr> + * <td>{@link #BEAN_beanClassVisibility}</td> + * <td>Look for bean classes with specified minimum visibility.</td> + * <td>{@link Visibility}</td> + * <td>{@link Visibility#PUBLIC}</td> + * </tr> + * <tr> + * <td>{@link #BEAN_beanFieldVisibility}</td> + * <td>Look for bean fields with specified minimum visibility.</td> + * <td>{@link Visibility}</td> + * <td>{@link Visibility#PUBLIC}</td> + * </tr> + * <tr> + * <td>{@link #BEAN_methodVisibility}</td> + * <td>Look for bean methods with specified minimum visibility.</td> + * <td>{@link Visibility}</td> + * <td>{@link Visibility#PUBLIC}</td> + * </tr> + * <tr> + * <td>{@link #BEAN_useJavaBeanIntrospector}</td> + * <td>Use Java {@link Introspector} for determining bean properties.</td> + * <td><code>Boolean</code></td> + * <td><jk>false</jk></td> + * </tr> + * <tr> + * <td>{@link #BEAN_useInterfaceProxies}</td> + * <td>Use interface proxies.</td> + * <td><code>Boolean</code></td> + * <td><jk>true</jk></td> + * </tr> + * <tr> + * <td>{@link #BEAN_ignoreUnknownBeanProperties}</td> + * <td>Ignore unknown properties.</td> + * <td><code>Boolean</code></td> + * <td><jk>false</jk></td> + * </tr> + * <tr> + * <td>{@link #BEAN_ignoreUnknownNullBeanProperties}</td> + * <td>Ignore unknown properties with null values.</td> + * <td><code>Boolean</code></td> + * <td><jk>true</jk></td> + * </tr> + * <tr> + * <td>{@link #BEAN_ignorePropertiesWithoutSetters}</td> + * <td>Ignore bean properties without setters.</td> + * <td><code>Boolean</code></td> + * <td><jk>true</jk></td> + * </tr> + * <tr> + * <td>{@link #BEAN_ignoreInvocationExceptionsOnGetters}</td> + * <td>Ignore invocation errors on getters.</td> + * <td><code>Boolean</code></td> + * <td><jk>false</jk></td> + * </tr> + * <tr> + * <td>{@link #BEAN_ignoreInvocationExceptionsOnSetters}</td> + * <td>Ignore invocation errors on setters.</td> + * <td><code>Boolean</code></td> + * <td><jk>false</jk></td> + * </tr> + * <tr> + * <td>{@link #BEAN_sortProperties}</td> + * <td>Sort bean properties in alphabetical order.</td> + * <td><code>Boolean</code></td> + * <td><jk>false</jk></td> + * </tr> + * <tr> + * <td> + * {@link #BEAN_notBeanPackages}<br> + * {@link #BEAN_notBeanPackages_add}<br> + * {@link #BEAN_notBeanPackages_remove} + * </td> + * <td>Packages whose classes should not be considered beans.</td> + * <td><code>Set<String></code></td> + * <td>See details</td> + * </tr> + * <tr> + * <td> + * {@link #BEAN_notBeanClasses}<br> + * {@link #BEAN_notBeanClasses_add}<br> + * {@link #BEAN_notBeanClasses_remove} + * </td> + * <td>Classes that should not be considered beans.</td> + * <td><code>Set<Class></code></td> + * <td>empty set</td> + * </tr> + * <tr> + * <td> + * {@link #BEAN_beanFilters}<br> + * {@link #BEAN_beanFilters_add}<br> + * {@link #BEAN_beanFilters_remove} + * </td> + * <td>Bean filters to apply to beans.</td> + * <td><code>List<Class></code></td> + * <td>empty list</td> + * </tr> + * <tr> + * <td> + * {@link #BEAN_pojoSwaps}<br> + * {@link #BEAN_pojoSwaps_add}<br> + * {@link #BEAN_pojoSwaps_remove} + * </td> + * <td>POJO swaps to apply to java objects.</td> + * <td><code>List<Class></code></td> + * <td>empty list</td> + * </tr> + * <tr> + * <td> + * {@link #BEAN_implClasses}<br> + * {@link #BEAN_implClasses_put} + * </td> + * <td>Implementation classes for interfaces and abstract classes.</td> + * <td><code>Map<Class,Class></code></td> + * <td>empty map</td> + * </tr> + * <tr> + * <td> + * {@link #BEAN_beanDictionary}<br> + * {@link #BEAN_beanDictionary_add}<br> + * {@link #BEAN_beanDictionary_remove} + * </td> + * <td>Bean lookup dictionary.</td> + * <td><code>List<Class></code></td> + * <td>empty list</td> + * </tr> + * <tr> + * <td> + * {@link #BEAN_beanTypePropertyName} + * </td> + * <td>Name to use for the bean type property used to represent a bean type.</td> + * <td><code>String</code></td> + * <td><js>"_type"</js></td> + * </tr> + * <tr> + * <td> + * {@link #BEAN_defaultParser} + * </td> + * <td>Default parser to use when converting <code>Strings</code> to POJOs.</td> + * <td><code>Class</code></td> + * <td>{@link JsonParser}</td> + * </tr> + * </table> + * + * * <h5 class='topic'>Bean Maps</h5> * <p> * {@link BeanMap BeanMaps} are wrappers around Java beans that allow properties to be retrieved and @@ -190,9 +373,14 @@ import org.apache.juneau.transform.*; @SuppressWarnings({"unchecked","rawtypes"}) public class BeanContext extends Context { - /** - * Require no-arg constructor ({@link Boolean}, default=<jk>false</jk>). + * <b>Configuration property:</b> Beans require no-arg constructors. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.beansRequireDefaultConstructor"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>false</jk> + * </ul> * <p> * If <jk>true</jk>, a Java class must implement a default no-arg constructor to be considered a bean. * <p> @@ -201,7 +389,13 @@ public class BeanContext extends Context { public static final String BEAN_beansRequireDefaultConstructor = "BeanContext.beansRequireDefaultConstructor"; /** - * Require {@link Serializable} interface ({@link Boolean}, default=<jk>false</jk>). + * <b>Configuration property:</b> Beans require {@link Serializable} interface. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.beansRequireSerializable"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>false</jk> + * </ul> * <p> * If <jk>true</jk>, a Java class must implement the {@link Serializable} interface to be considered a bean. * <p> @@ -210,7 +404,13 @@ public class BeanContext extends Context { public static final String BEAN_beansRequireSerializable = "BeanContext.beansRequireSerializable"; /** - * Require setters for getters ({@link Boolean}, default=<jk>false</jk>). + * <b>Configuration property:</b> Beans require setters for getters. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.beansRequireSettersForGetters"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>false</jk> + * </ul> * <p> * If <jk>true</jk>, only getters that have equivalent setters will be considered as properties on a bean. * Otherwise, they will be ignored. @@ -218,7 +418,13 @@ public class BeanContext extends Context { public static final String BEAN_beansRequireSettersForGetters = "BeanContext.beansRequireSettersForGetters"; /** - * Require some properties ({@link Boolean}, default=<jk>true</jk>). + * <b>Configuration property:</b> Beans require at least one property. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.beansRequireSomeProperties"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>true</jk> + * </ul> * <p> * If <jk>true</jk>, then a Java class must contain at least 1 property to be considered a bean. * <p> @@ -227,7 +433,13 @@ public class BeanContext extends Context { public static final String BEAN_beansRequireSomeProperties = "BeanContext.beansRequireSomeProperties"; /** - * Put returns old value ({@link Boolean}, default=<jk>false</jk>). + * <b>Configuration property:</b> {@link BeanMap#put(String,Object) BeanMap.put()} method will return old property value. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.beanMapPutReturnsOldValue"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>false</jk> + * </ul> * <p> * If <jk>true</jk>, then the {@link BeanMap#put(String,Object) BeanMap.put()} method will return old property values. * <p> @@ -236,12 +448,25 @@ public class BeanContext extends Context { public static final String BEAN_beanMapPutReturnsOldValue = "BeanContext.beanMapPutReturnsOldValue"; /** - * Look for bean constructors with the specified minimum visibility ({@link Visibility}, default={@link Visibility#PUBLIC}). + * <b>Configuration property:</b> Look for bean constructors with the specified minimum visibility. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.beanConstructorVisibility"</js> + * <li><b>Data type:</b> {@link Visibility} + * <li><b>Default:</b> {@link Visibility#PUBLIC} + * </ul> + * <p> */ public static final String BEAN_beanConstructorVisibility = "BeanContext.beanConstructorVisibility"; /** - * Look for bean classes with the specified minimum visibility ({@link Visibility}, default={@link Visibility#PUBLIC}). + * <b>Configuration property:</b> Look for bean classes with the specified minimum visibility. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.beanClassVisibility"</js> + * <li><b>Data type:</b> {@link Visibility} + * <li><b>Default:</b> {@link Visibility#PUBLIC} + * </ul> * <p> * Classes are not considered beans unless they meet the minimum visibility requirements. * For example, if the visibility is <code>PUBLIC</code> and the bean class is <jk>protected</jk>, then @@ -250,7 +475,13 @@ public class BeanContext extends Context { public static final String BEAN_beanClassVisibility = "BeanContext.beanClassVisibility"; /** - * Look for bean fields with the specified minimum visibility ({@link Visibility}, default={@link Visibility#PUBLIC}). + * <b>Configuration property:</b> Look for bean fields with the specified minimum visibility. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.beanFieldVisibility"</js> + * <li><b>Data type:</b> {@link Visibility} + * <li><b>Default:</b> {@link Visibility#PUBLIC} + * </ul> * <p> * Fields are not considered bean properties unless they meet the minimum visibility requirements. * For example, if the visibility is <code>PUBLIC</code> and the bean field is <jk>protected</jk>, then @@ -261,7 +492,13 @@ public class BeanContext extends Context { public static final String BEAN_beanFieldVisibility = "BeanContext.beanFieldVisibility"; /** - * Look for bean methods with the specified minimum visibility ({@link Visibility}, default={@link Visibility#PUBLIC}). + * <b>Configuration property:</b> Look for bean methods with the specified minimum visibility. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.methodVisibility"</js> + * <li><b>Data type:</b> {@link Visibility} + * <li><b>Default:</b> {@link Visibility#PUBLIC} + * </ul> * <p> * Methods are not considered bean getters/setters unless they meet the minimum visibility requirements. * For example, if the visibility is <code>PUBLIC</code> and the bean method is <jk>protected</jk>, then @@ -270,7 +507,13 @@ public class BeanContext extends Context { public static final String BEAN_methodVisibility = "BeanContext.methodVisibility"; /** - * Use Java {@link Introspector} for determining bean properties ({@link Boolean}, default=<jk>false</jk>). + * <b>Configuration property:</b> Use Java {@link Introspector} for determining bean properties. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.useJavaBeanIntrospector"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>false</jk> + * </ul> * <p> * Using the built-in Java bean introspector will not pick up fields or non-standard getters/setters. * Most {@link Bean @Bean} annotations will be ignored. @@ -278,7 +521,13 @@ public class BeanContext extends Context { public static final String BEAN_useJavaBeanIntrospector = "BeanContext.useJavaBeanIntrospector"; /** - * Use interface proxies ({@link Boolean}, default=<jk>true</jk>). + * <b>Configuration property:</b> Use interface proxies. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.useInterfaceProxies"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>true</jk> + * </ul> * <p> * If <jk>true</jk>, then interfaces will be instantiated as proxy classes through the use of an {@link InvocationHandler} * if there is no other way of instantiating them. @@ -286,7 +535,13 @@ public class BeanContext extends Context { public static final String BEAN_useInterfaceProxies = "BeanContext.useInterfaceProxies"; /** - * Ignore unknown properties ({@link Boolean}, default=<jk>false</jk>). + * <b>Configuration property:</b> Ignore unknown properties. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.ignoreUnknownBeanProperties"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>false</jk> + * </ul> * <p> * If <jk>true</jk>, trying to set a value on a non-existent bean property will silently be ignored. * Otherwise, a {@code RuntimeException} is thrown. @@ -294,7 +549,13 @@ public class BeanContext extends Context { public static final String BEAN_ignoreUnknownBeanProperties = "BeanContext.ignoreUnknownBeanProperties"; /** - * Ignore unknown properties with null values ({@link Boolean}, default=<jk>true</jk>). + * <b>Configuration property:</b> Ignore unknown properties with null values. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.ignoreUnknownNullBeanProperties"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>true</jk> + * </ul> * <p> * If <jk>true</jk>, trying to set a <jk>null</jk> value on a non-existent bean property will silently be ignored. * Otherwise, a {@code RuntimeException} is thrown. @@ -302,7 +563,13 @@ public class BeanContext extends Context { public static final String BEAN_ignoreUnknownNullBeanProperties = "BeanContext.ignoreUnknownNullBeanProperties"; /** - * Ignore properties without setters ({@link Boolean}, default=<jk>true</jk>). + * <b>Configuration property:</b> Ignore properties without setters. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.ignorePropertiesWithoutSetters"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>true</jk> + * </ul> * <p> * If <jk>true</jk>, trying to set a value on a bean property without a setter will silently be ignored. * Otherwise, a {@code RuntimeException} is thrown. @@ -310,7 +577,13 @@ public class BeanContext extends Context { public static final String BEAN_ignorePropertiesWithoutSetters = "BeanContext.ignorePropertiesWithoutSetters"; /** - * Ignore invocation errors on getters ({@link Boolean}, default=<jk>false</jk>). + * <b>Configuration property:</b> Ignore invocation errors on getters. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.ignoreInvocationExceptionsOnGetters"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>false</jk> + * </ul> * <p> * If <jk>true</jk>, errors thrown when calling bean getter methods will silently be ignored. * Otherwise, a {@code BeanRuntimeException} is thrown. @@ -318,7 +591,13 @@ public class BeanContext extends Context { public static final String BEAN_ignoreInvocationExceptionsOnGetters = "BeanContext.ignoreInvocationExceptionsOnGetters"; /** - * Ignore invocation errors on setters ({@link Boolean}, default=<jk>false</jk>). + * <b>Configuration property:</b> Ignore invocation errors on setters. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.ignoreInvocationExceptionsOnSetters"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>false</jk> + * </ul> * <p> * If <jk>true</jk>, errors thrown when calling bean setter methods will silently be ignored. * Otherwise, a {@code BeanRuntimeException} is thrown. @@ -326,7 +605,13 @@ public class BeanContext extends Context { public static final String BEAN_ignoreInvocationExceptionsOnSetters = "BeanContext.ignoreInvocationExceptionsOnSetters"; /** - * Sort bean properties in alphabetical order ({@link Boolean}, default=<jk>false</jk>). + * <b>Configuration property:</b> Sort bean properties in alphabetical order. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.sortProperties"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>false</jk> + * </ul> * <p> * When <jk>true</jk>, all bean properties will be serialized and access in alphabetical order. * Otherwise, the natural order of the bean properties is used which is dependent on the @@ -341,21 +626,26 @@ public class BeanContext extends Context { public static final String BEAN_sortProperties = "BeanContext.sortProperties"; /** - * List of packages whose classes should not be considered beans (<code>Set<String></code>). + * <b>Configuration property:</b> Packages whose classes should not be considered beans. * <p> - * When specified, the current list of ignore packages are appended to. - * The default list of ignore packages are as follows: * <ul> - * <li><code>java.lang</code> - * <li><code>java.lang.annotation</code> - * <li><code>java.lang.ref</code> - * <li><code>java.lang.reflect</code> - * <li><code>java.io</code> - * <li><code>java.net</code> - * <li><code>java.nio.*</code> - * <li><code>java.util.*</code> + * <li><b>Name:</b> <js>"BeanContext.notBeanPackages.set"</js> + * <li><b>Data type:</b> <code>Set<String></code> + * <li><b>Default:</b> + * <ul> + * <li><code>java.lang</code> + * <li><code>java.lang.annotation</code> + * <li><code>java.lang.ref</code> + * <li><code>java.lang.reflect</code> + * <li><code>java.io</code> + * <li><code>java.net</code> + * <li><code>java.nio.*</code> + * <li><code>java.util.*</code> + * </ul> * </ul> * <p> + * When specified, the current list of ignore packages are appended to. + * <p> * Any classes within these packages will be serialized to strings using {@link Object#toString()}. * <p> * Note that you can specify prefix patterns to include all subpackages. @@ -363,17 +653,23 @@ public class BeanContext extends Context { public static final String BEAN_notBeanPackages = "BeanContext.notBeanPackages.set"; /** - * Add to the list of packages whose classes should not be considered beans. + * <b>Configuration property:</b> Add to packages whose classes should not be considered beans. */ public static final String BEAN_notBeanPackages_add = "BeanContext.notBeanPackages.set.add"; /** - * Remove from the list of packages whose classes should not be considered beans. + * <b>Configuration property:</b> Remove from packages whose classes should not be considered beans. */ public static final String BEAN_notBeanPackages_remove = "BeanContext.notBeanPackages.set.remove"; /** - * An explicit list of Java classes to be excluded from consideration as being beans (<code>Set<Class></code>). + * <b>Configuration property:</b> Classes to be excluded from consideration as being beans. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.notBeanClasses.set"</js> + * <li><b>Data type:</b> <code>Set<Class></code> + * <li><b>Default:</b> empty set + * </ul> * <p> * Not-bean classes are typically converted to <code>Strings</code> during serialization even if they * appear to be bean-like. @@ -381,17 +677,23 @@ public class BeanContext extends Context { public static final String BEAN_notBeanClasses = "BeanContext.notBeanClasses.set"; /** - * Add to the list of packages whose classes should not be considered beans. + * <b>Configuration property:</b> Add to classes that should not be considered beans. */ public static final String BEAN_notBeanClasses_add = "BeanContext.notBeanClasses.set.add"; /** - * Remove from the list of packages whose classes should not be considered beans. + * <b>Configuration property:</b> Remove from classes that should not be considered beans. */ public static final String BEAN_notBeanClasses_remove = "BeanContext.notBeanClasses.set.remove"; /** - * List of bean filters registered on the bean context (<code>List<Class></code>). + * <b>Configuration property:</b> Bean filters to apply to beans. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.beanFilters.list"</js> + * <li><b>Data type:</b> <code>List<Class></code> + * <li><b>Default:</b> empty list + * </ul> * <p> * This is a programmatic equivalent to the {@link Bean @Bean} annotation. * It's useful when you want to use the Bean annotation functionality, but you don't have the ability @@ -399,9 +701,9 @@ public class BeanContext extends Context { * <p> * There are two category of classes that can be passed in through this method: * <ul class='spaced-list'> - * <li>Subclasses of {@link BeanFilterBuilder}. + * <li>Subclasses of {@link BeanFilterBuilder}. * These must have a public no-arg constructor. - * <li>Bean interface classes. + * <li>Bean interface classes. * A shortcut for defining a {@link InterfaceBeanFilterBuilder}. * Any subclasses of an interface class will only have properties defined on the interface. * All other bean properties will be ignored. @@ -410,20 +712,26 @@ public class BeanContext extends Context { public static final String BEAN_beanFilters = "BeanContext.beanFilters.list"; /** - * Add to the list of bean filters. + * <b>Configuration property:</b> Add to bean filters. */ public static final String BEAN_beanFilters_add = "BeanContext.beanFilters.list.add"; /** - * Remove from the list of bean filters. + * <b>Configuration property:</b> Remove from bean filters. */ public static final String BEAN_beanFilters_remove = "BeanContext.beanFilters.list.remove"; /** - * List of POJO swaps registered on the bean context (<code>List<Class></code>). + * <b>Configuration property:</b> POJO swaps to apply to Java objects. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.pojoSwaps.list"</js> + * <li><b>Data type:</b> <code>List<Class></code> + * <li><b>Default:</b> empty list + * </ul> * <p> * There are two category of classes that can be passed in through this method: - * <ul class='spaced-list'> + * <ul> * <li>Subclasses of {@link PojoSwap}. * <li>Surrogate classes. A shortcut for defining a {@link SurrogateSwap}. * </ul> @@ -431,17 +739,23 @@ public class BeanContext extends Context { public static final String BEAN_pojoSwaps = "BeanContext.pojoSwaps.list"; /** - * Add to the list of POJO swap classes. + * <b>Configuration property:</b> Add to POJO swap classes. */ public static final String BEAN_pojoSwaps_add = "BeanContext.pojoSwaps.list.add"; /** - * Remove from the list of POJO swap classes. + * <b>Configuration property:</b> Remove from POJO swap classes. */ public static final String BEAN_pojoSwaps_remove = "BeanContext.pojoSwaps.list.remove"; /** - * Specifies implementation classes for an interface or abstract class (<code>Map<Class,Class></code>). + * <b>Configuration property:</b> Implementation classes for interfaces and abstract classes. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.implClasses.map"</js> + * <li><b>Data type:</b> <code>Map<Class,Class></code> + * <li><b>Default:</b> empty map + * </ul> * <p> * For interfaces and abstract classes this method can be used to specify an implementation * class for the interface/abstract class so that instances of the implementation @@ -450,12 +764,18 @@ public class BeanContext extends Context { public static final String BEAN_implClasses = "BeanContext.implClasses.map"; /** - * Adds a new map entry to the {@link #BEAN_implClasses} property. + * <b>Configuration property:</b> Add an implementation class. */ public static final String BEAN_implClasses_put = "BeanContext.implClasses.map.put"; /** - * Specifies the list of classes that make up the bean dictionary for this bean context (<code>List<Class></code>). + * <b>Configuration property:</b> Bean lookup dictionary. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.beanDictionary.list"</js> + * <li><b>Data type:</b> <code>List<Class></code> + * <li><b>Default:</b> empty list + * </ul> * <p> * This list can consist of the following class types: * <ul> @@ -467,22 +787,37 @@ public class BeanContext extends Context { public static final String BEAN_beanDictionary = "BeanContext.beanDictionary.list"; /** - * Add to the bean dictionary list. + * <b>Configuration property:</b> Add to bean dictionary. */ public static final String BEAN_beanDictionary_add = "BeanContext.beanDictionary.list.add"; /** - * Remove from the bean dictionary list. + * <b>Configuration property:</b> Remove from bean dictionary. */ public static final String BEAN_beanDictionary_remove = "BeanContext.beanDictionary.list.remove"; /** - * The name to use for the bean type properties used to represent a bean type. ({@link String}, default=<js>"_type"</js>). + * <b>Configuration property:</b> Name to use for the bean type properties used to represent a bean type. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.beanTypePropertyName"</js> + * <li><b>Data type:</b> <code>String</code> + * <li><b>Default:</b> <js>"_type"</js> + * </ul> + * <p> */ public static final String BEAN_beanTypePropertyName = "BeanContext.beanTypePropertyName"; /** - * Specifies the default parser to use when converting <code>Strings</code> to POJOs in the {@link BeanContext#convertToType(Object, Class)} method (<code>Class</code>). + * <b>Configuration property:</b> Default parser to use when converting <code>Strings</code> to POJOs. + * <p> + * <ul> + * <li><b>Name:</b> <js>"BeanContext.defaultParser"</js> + * <li><b>Data type:</b> <code>Class</code> + * <li><b>Default:</b> {@link JsonSerializer} + * </ul> + * <p> + * Used in the in the {@link BeanContext#convertToType(Object, Class)} method.Ã */ public static final String BEAN_defaultParser = "BeanContext.defaultParser"; http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/d45e1351/juneau-core/src/main/java/org/apache/juneau/csv/package.html ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/csv/package.html b/juneau-core/src/main/java/org/apache/juneau/csv/package.html index 9dc8113..249baca 100644 --- a/juneau-core/src/main/java/org/apache/juneau/csv/package.html +++ b/juneau-core/src/main/java/org/apache/juneau/csv/package.html @@ -56,7 +56,5 @@ } </script> -This code is currently work-in-progress. - </body> </html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/d45e1351/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 3962821..9f12272 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 @@ -40,13 +40,73 @@ import org.apache.juneau.*; * Several built-in runtime variable types are defined, and the API can be extended to include user-defined variables. * </p> * + * + * <h6 class='topic' id='ConfigProperties'>Configurable properties on the HTML document serializer</h6> + * <table class='styled' style='border-collapse: collapse;'> + * <tr><th>Setting name</th><th>Description</th><th>Data type</th><th>Default value</th></tr> + * <tr> + * <td>{@link #HTMLDOC_title}</td> + * <td>Page title.</td> + * <td><code>String</code></td> + * <td><jk>null</jk></td> + * </tr> + * <tr> + * <td>{@link #HTMLDOC_description}</td> + * <td>Page description.</td> + * <td><code>String</code></td> + * <td><jk>null</jk></td> + * </tr> + * <tr> + * <td>{@link #HTMLDOC_links}<br>{@link #HTMLDOC_links_put}</td> + * <td>Page links.</td> + * <td><code>Map<String,String></code></td> + * <td>empty map</td> + * </tr> + * <tr> + * <td>{@link #HTMLDOC_cssUrl}</td> + * <td>Stylesheet URL.</td> + * <td><code>String</code></td> + * <td><js>"style.css"</js></td> + * </tr> + * <tr> + * <td>{@link #HTMLDOC_cssImports}<br>{@link #HTMLDOC_cssImports_add}</td> + * <td>CSS imports.</td> + * <td><code>List<String></code></td> + * <td>empty list</td> + * </tr> + * <tr> + * <td>{@link #HTMLDOC_nowrap}</td> + * <td>Prevent word wrap on page.</td> + * <td><code>Boolean</code></td> + * <td><jk>false</jk></td> + * </tr> + * </table> + * + * <h6 class='topic'>Configurable properties inherited from parent classes</h6> + * <ul class='javahierarchy'> + * <li class='c'><a class='doclink' href='../BeanContext.html#ConfigProperties'>BeanContext</a> - Properties associated with handling beans on serializers and parsers. + * <ul> + * <li class='c'><a class='doclink' href='../serializer/SerializerContext.html#ConfigProperties'>SerializerContext</a> - Configurable properties common to all serializers. + * <ul> + * <li class='c'><a class='doclink' href='../html/HtmlSerializerContext.html#ConfigProperties'>HtmlSerializerContext</a> - Configurable properties on the HTML serializer. + * </ul> + * </ul> + * </ul> + * + * * @author James Bognar ([email protected]) */ public final class HtmlDocSerializerContext extends HtmlSerializerContext { /** - * Adds a title at the top of a page. - * + * <b>Configuration property:</b> Page title. + * <p> + * <ul> + * <li><b>Name:</b> <js>"HtmlSerializer.title"</js> + * <li><b>Data type:</b> <code>String</code> + * <li><b>Default:</b> <jk>null</jk> + * </ul> + * <p> * <dl> * <dt>Example:</dt> * <dd> @@ -78,8 +138,14 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext { public static final String HTMLDOC_title = "HtmlSerializer.title"; /** - * Adds a description right below the title of a page. - * + * <b>Configuration property:</b> Page description. + * <p> + * <ul> + * <li><b>Name:</b> <js>"HtmlSerializer.description"</js> + * <li><b>Data type:</b> <code>String</code> + * <li><b>Default:</b> <jk>null</jk> + * </ul> + * <p> * <dl> * <dt>Example:</dt> * <dd> @@ -111,6 +177,14 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext { public static final String HTMLDOC_description = "HtmlSerializer.description"; /** + * <b>Configuration property:</b> Page links. + * <p> + * <ul> + * <li><b>Name:</b> <js>"HtmlDocSerializer.links.map"</js> + * <li><b>Data type:</b> <code>Map<String,String></code> + * <li><b>Default:</b> empty map + * </ul> + * <p> * Adds a list of hyperlinks immediately under the title and description but above the content of the page. * <p> * This can be used to provide convenient hyperlinks when viewing the REST interface from a browser. @@ -145,32 +219,56 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext { * </dd> * </dl> */ - public static final String HTMLDOC_links = "HtmlDocSerializer.links"; + public static final String HTMLDOC_links = "HtmlDocSerializer.links.map"; /** - * Similar to {@link #HTMLDOC_links} except appends on to the existing list of links. + * <b>Configuration property:</b> Add to the {@link #HTMLDOC_links} property. */ - public static final String HTMLDOC_links_add = "HtmlDocSerializer.links.add"; + public static final String HTMLDOC_links_put = "HtmlDocSerializer.links.map.put"; /** - * Adds a link to the specified stylesheet URL (<l>String</l>, default=<jk>null</jk>). + * <b>Configuration property:</b> Stylesheet URL. + * <p> + * <ul> + * <li><b>Name:</b> <js>"HtmlDocSerializer.cssUrl"</js> + * <li><b>Data type:</b> <code>String</code> + * <li><b>Default:</b> <js>"style.css"</js> + * </ul> + * <p> + * Adds a link to the specified stylesheet URL. * <p> - * If not specified, defaults to the built-in stylesheet located at <js>"/servletPath/style.css"</js>. - * Note that this stylesheet is controlled by the <code><ja>@RestResource</ja>.style()</code> annotation. + * If not specified, defaults to the built-in stylesheet located at <js>"style.css"</js>. + * Note that this stylesheet is controlled by the <code><ja>@RestResource</ja>.stylesheet()</code> annotation. */ public static final String HTMLDOC_cssUrl = "HtmlDocSerializer.cssUrl"; /** - * Imports the specified CSS page URLs into the page (<l>String[]</l>, default=<code>[]</code>). + * <b>Configuration property:</b> CSS imports. + * <p> + * <ul> + * <li><b>Name:</b> <js>"HtmlDocSerializer.cssImports.list"</js> + * <li><b>Data type:</b> <code>List<String></code> + * <li><b>Default:</b> empty list + * </ul> + * <p> + * Imports the specified CSS page URLs into the page. */ - public static final String HTMLDOC_cssImports = "HtmlDocSerializer.cssImports"; + public static final String HTMLDOC_cssImports = "HtmlDocSerializer.cssImports.list"; /** - * Append to the {@link #HTMLDOC_cssImports} property. + * <b>Configuration property:</b> Add to the {@link #HTMLDOC_cssImports} property. */ - public static final String HTMLDOC_cssImports_add = "HtmlDocSerializer.cssImports.add"; + public static final String HTMLDOC_cssImports_add = "HtmlDocSerializer.cssImports.list.add"; /** + * <b>Configuration property:</b> Prevent word wrap on page. + * <p> + * <ul> + * <li><b>Name:</b> <js>"HtmlDocSerializer.nowrap"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>false</jk> + * </ul> + * <p> * Adds <js>"* {white-space:nowrap}"</js> to the style header to prevent word wrapping. */ public static final String HTMLDOC_nowrap = "HtmlDocSerializer.nowrap"; http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/d45e1351/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 44fe215..2a145d4 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 @@ -36,6 +36,21 @@ import org.apache.juneau.parser.*; * <p> * See {@link ContextFactory} for more information about context properties. * + * + * <h6 class='topic' id='ConfigProperties'>Configurable properties on the HTML parser</h6> + * <table class='styled' style='border-collapse: collapse;'> + * <tr><th>Setting name</th><th>Description</th><th>Data type</th><th>Default value</th></tr> + * </table> + * + * <h6 class='topic'>Configurable properties inherited from parent classes</h6> + * <ul class='javahierarchy'> + * <li class='c'><a class='doclink' href='../BeanContext.html#ConfigProperties'>BeanContext</a> - Properties associated with handling beans on serializers and parsers. + * <ul> + * <li class='c'><a class='doclink' href='../parser/ParserContext.html#ConfigProperties'>ParserContext</a> - Configurable properties common to all parsers. + * </ul> + * </ul> + * + * * @author James Bognar ([email protected]) */ public final class HtmlParserContext extends ParserContext { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/d45e1351/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 b634645..216bfaa 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 @@ -34,12 +34,57 @@ import org.apache.juneau.xml.*; * <p> * See {@link ContextFactory} for more information about context properties. * + * + * <h6 class='topic' id='ConfigProperties'>Configurable properties on the HTML serializer</h6> + * <table class='styled' style='border-collapse: collapse;'> + * <tr><th>Setting name</th><th>Description</th><th>Data type</th><th>Default value</th></tr> + * <tr> + * <td>{@link #HTML_uriAnchorText}</td> + * <td>Anchor text source.</td> + * <td><code>String</code></td> + * <td><js>"TO_STRING"</js></td> + * </tr> + * <tr> + * <td>{@link #HTML_detectLinksInStrings}</td> + * <td>Look for URLs in {@link String Strings}.</td> + * <td><code>Boolean</code></td> + * <td><jk>true</jk></td> + * </tr> + * <tr> + * <td>{@link #HTML_lookForLabelParameters}</td> + * <td>Look for link labels in the <js>"label"</js> parameter of the URL.</td> + * <td><code>Boolean</code></td> + * <td><jk>true</jk></td> + * </tr> + * <tr> + * <td>{@link #HTML_labelParameter}</td> + * <td>The parameter name to use when using {@link #HTML_lookForLabelParameters}.</td> + * <td><code>String</code></td> + * <td><js>"label"</js></td> + * </tr> + * </table> + * + * <h6 class='topic'>Configurable properties inherited from parent classes</h6> + * <ul class='javahierarchy'> + * <li class='c'><a class='doclink' href='../BeanContext.html#ConfigProperties'>BeanContext</a> - Properties associated with handling beans on serializers and parsers. + * <ul> + * <li class='c'><a class='doclink' href='../serializer/SerializerContext.html#ConfigProperties'>SerializerContext</a> - Configurable properties common to all serializers. + * </ul> + * </ul> + * + * * @author James Bognar ([email protected]) */ public class HtmlSerializerContext extends XmlSerializerContext { /** - * Anchor text source ({@link String}, default={@link #TO_STRING}). + * <b>Configuration property:</b> Anchor text source. + * <p> + * <ul> + * <li><b>Name:</b> <js>"HtmlSerializer.uriAnchorText"</js> + * <li><b>Data type:</b> <code>String</code> + * <li><b>Default:</b> <js>"toString"</js> + * </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. @@ -68,7 +113,13 @@ public class HtmlSerializerContext extends XmlSerializerContext { /** - * Look for URLs in {@link String Strings} ({@link Boolean}, default=<jk>true</jk>). + * <b>Configuration property:</b> Look for URLs in {@link String Strings}. + * <p> + * <ul> + * <li><b>Name:</b> <js>"HtmlSerializer.detectLinksInStrings"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>true</jk> + * </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}. @@ -76,7 +127,13 @@ public class HtmlSerializerContext extends XmlSerializerContext { public static final String HTML_detectLinksInStrings = "HtmlSerializer.detectLinksInStrings"; /** - * Look for link labels in the <js>"label"</js> parameter of the URL ({@link Boolean}, default=<jk>true</jk>). + * <b>Configuration property:</b> Look for link labels in the <js>"label"</js> parameter of the URL. + * <p> + * <ul> + * <li><b>Name:</b> <js>"HtmlSerializer.lookForLabelParameters"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>true</jk> + * </ul> * <p> * If the URL has a label parameter (e.g. <js>"?label=foobar"</js>), then use that as the anchor text of the link. * <p> @@ -85,7 +142,14 @@ public class HtmlSerializerContext extends XmlSerializerContext { public static final String HTML_lookForLabelParameters = "HtmlSerializer.lookForLabelParameters"; /** - * The parameter name to use when using {@link #HTML_lookForLabelParameters} ({@link String}, default=<js>"label"</js>). + * <b>Configuration property:</b> The parameter name to use when using {@link #HTML_lookForLabelParameters}. + * <p> + * <ul> + * <li><b>Name:</b> <js>"HtmlSerializer.labelParameter"</js> + * <li><b>Data type:</b> <code>String</code> + * <li><b>Default:</b> <js>"label"</js> + * </ul> + * <p> */ public static final String HTML_labelParameter = "HtmlSerializer.labelParameter"; http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/d45e1351/juneau-core/src/main/java/org/apache/juneau/internal/package.html ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/package.html b/juneau-core/src/main/java/org/apache/juneau/internal/package.html new file mode 100644 index 0000000..181414a --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/internal/package.html @@ -0,0 +1,42 @@ +<!DOCTYPE HTML> +<!-- +/*************************************************************************************************************************** + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * + ***************************************************************************************************************************/ + --> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <style type="text/css"> + /* For viewing in Page Designer */ + @IMPORT url("../../../../../../javadoc.css"); + + /* For viewing in REST interface */ + @IMPORT url("../htdocs/javadoc.css"); + body { + margin: 20px; + } + </style> + <script> + /* Replace all @code and @link tags. */ + window.onload = function() { + document.body.innerHTML = document.body.innerHTML.replace(/\{\@code ([^\}]+)\}/g, '<code>$1</code>'); + document.body.innerHTML = document.body.innerHTML.replace(/\{\@link (([^\}]+)\.)?([^\.\}]+)\}/g, '<code>$3</code>'); + } + </script> +</head> +<body> +<p>Internal classes not meant for external use</p> + +</body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/d45e1351/juneau-core/src/main/java/org/apache/juneau/jena/RdfCommonContext.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/jena/RdfCommonContext.java b/juneau-core/src/main/java/org/apache/juneau/jena/RdfCommonContext.java index 449cd9a..eef8653 100644 --- a/juneau-core/src/main/java/org/apache/juneau/jena/RdfCommonContext.java +++ b/juneau-core/src/main/java/org/apache/juneau/jena/RdfCommonContext.java @@ -21,11 +21,204 @@ import org.apache.juneau.xml.annotation.*; /** * Configurable properties common to both the {@link RdfSerializer} and {@link RdfParser} classes. * + * + * <h6 class='topic' id='ConfigProperties'>Configurable properties common to the RDF serializers and parsers</h6> + * <table class='styled' style='border-collapse: collapse;'> + * <tr><th>Setting name</th><th>Description</th><th>Data type</th><th>Default value</th></tr> + * <tr> + * <td>{@link #RDF_language}</td> + * <td>RDF language.</td> + * <td><code>String</code></td> + * <td><js>"RDF/XML-ABBREV"</js></td> + * </tr> + * <tr> + * <td>{@link #RDF_juneauNs}</td> + * <td>XML namespace for Juneau properties.</td> + * <td>{@link Namespace}</td> + * <td><code>{j:<js>'http://www.ibm.com/juneau/'</js>}</code></td> + * </tr> + * <tr> + * <td>{@link #RDF_juneauBpNs}</td> + * <td>Default XML namespace for bean properties.</td> + * <td>{@link Namespace}</td> + * <td><code>{j:<js>'http://www.ibm.com/juneaubp/'</js>}</code></td> + * </tr> + * <tr> + * <td>{@link #RDF_useXmlNamespaces}</td> + * <td>Reuse XML namespaces when RDF namespaces not specified.</td> + * <td><code>Boolean</code></td> + * <td><jk>true</jk></td> + * </tr> + * <tr> + * <td>{@link #RDF_arp_iriRules}</td> + * <td>RDF/XML property: <code>iri_rules</code>.</td> + * <td><code>String</code></td> + * <td><js>"lax"</js></td> + * </tr> + * <tr> + * <td>{@link #RDF_arp_errorMode}</td> + * <td>RDF/XML ARP property: <code>error-mode</code>.</td> + * <td><code>String</code></td> + * <td><js>"lax"</js></td> + * </tr> + * <tr> + * <td>{@link #RDF_arp_embedding}</td> + * <td>RDF/XML ARP property: <code>embedding</code>.</td> + * <td><code>Boolean</code></td> + * <td><jk>false</jk></td> + * </tr> + * <tr> + * <td>{@link #RDF_arp_err_}</td> + * <td>RDF/XML ARP property: <code>ERR_xxx</code>.</td> + * <td><code>String</code></td> + * <td></td> + * </tr> + * <tr> + * <td>{@link #RDF_arp_warn_}</td> + * <td>RDF/XML ARP property: <code>WARN_xxx</code>.</td> + * <td><code>String</code></td> + * <td></td> + * </tr> + * <tr> + * <td>{@link #RDF_arp_ign_}</td> + * <td>RDF/XML ARP property: <code>IGN_xxx</code>.</td> + * <td><code>String</code></td> + * <td></td> + * </tr> + * <tr> + * <td>{@link #RDF_rdfxml_xmlBase}</td> + * <td>RDF/XML property: <code>xmlbase</code>.</td> + * <td><code>String</code></td> + * <td><jk>null</jk></td> + * </tr> + * <tr> + * <td>{@link #RDF_rdfxml_longId}</td> + * <td>RDF/XML property: <code>longId</code>.</td> + * <td><code>Boolean</code></td> + * <td><jk>false</jk></td> + * </tr> + * <tr> + * <td>{@link #RDF_rdfxml_allowBadUris}</td> + * <td>RDF/XML property: <code>allowBadURIs</code>.</td> + * <td><code>Boolean</code></td> + * <td><jk>false</jk></td> + * </tr> + * <tr> + * <td>{@link #RDF_rdfxml_relativeUris}</td> + * <td>RDF/XML property: <code>relativeURIs</code>.</td> + * <td><code>String</code></td> + * <td><js>"same-document, absolute, relative, parent"</js></td> + * </tr> + * <tr> + * <td>{@link #RDF_rdfxml_showXmlDeclaration}</td> + * <td>RDF/XML property: <code>showXmlDeclaration</code>.</td> + * <td><code>String</code></td> + * <td><js>"default"</js></td> + * </tr> + * <tr> + * <td>{@link #RDF_rdfxml_showDoctypeDeclaration}</td> + * <td>RDF/XML property: <code>showDoctypeDeclaration</code>.</td> + * <td><code>Boolean</code></td> + * <td><jk>true</jk></td> + * </tr> + * <tr> + * <td>{@link #RDF_rdfxml_tab}</td> + * <td>RDF/XML property: <code>tab</code>.</td> + * <td><code>Integer</code></td> + * <td><code>2</code></td> + * </tr> + * <tr> + * <td>{@link #RDF_rdfxml_attributeQuoteChar}</td> + * <td>RDF/XML property: <code>attributeQuoteChar</code>.</td> + * <td><code>Character</code></td> + * <td><js>'"'</js></td> + * </tr> + * <tr> + * <td>{@link #RDF_rdfxml_blockRules}</td> + * <td>RDF/XML property: <code>blockRules</code>.</td> + * <td><code>String</code></td> + * <td><js>""</js></td> + * </tr> + * <tr> + * <td>{@link #RDF_n3_minGap}</td> + * <td>N3/Turtle property: <code>minGap</code>.</td> + * <td><code>Integer</code></td> + * <td><code>1</code></td> + * </tr> + * <tr> + * <td>{@link #RDF_n3_objectLists}</td> + * <td>N3/Turtle property: <code>objectLists</code>.</td> + * <td><code>Boolean</code></td> + * <td><jk>true</jk></td> + * </tr> + * <tr> + * <td>{@link #RDF_n3_subjectColumn}</td> + * <td>N3/Turtle property: <code>subjectColumn</code>.</td> + * <td>code>Integer</code></td> + * <td>indent column</td> + * </tr> + * <tr> + * <td>{@link #RDF_n3_propertyColumn}</td> + * <td>N3/Turtle property: <code>propertyColumn</code>.</td> + * <td><code>Integer</code></td> + * <td><code>8</code></td> + * </tr> + * <tr> + * <td>{@link #RDF_n3_indentProperty}</td> + * <td>N3/Turtle property: <code>indentProperty</code>.</td> + * <td><code>Integer</code></td> + * <td><code>6</code></td> + * </tr> + * <tr> + * <td>{@link #RDF_n3_widePropertyLen}</td> + * <td>N3/Turtle property: <code>widePropertyLen</code>.</td> + * <td><code>Integer</code></td> + * <td><code>20</code></td> + * </tr> + * <tr> + * <td>{@link #RDF_n3_abbrevBaseUri}</td> + * <td>N3/Turtle property: <code>abbrevBaseURI</code>.</td> + * <td><code>Boolean</code></td> + * <td><jk>true</jk></td> + * </tr> + * <tr> + * <td>{@link #RDF_n3_usePropertySymbols}</td> + * <td>N3/Turtle property: <code>usePropertySymbols</code>.</td> + * <td><code>Boolean</code></td> + * <td><jk>true</jk></td> + * </tr> + * <tr> + * <td>{@link #RDF_n3_useTripleQuotedStrings}</td> + * <td>N3/Turtle property: <code>useTripleQuotedStrings</code>.</td> + * <td><code>Boolean</code></td> + * <td><jk>true</jk></td> + * </tr> + * <tr> + * <td>{@link #RDF_n3_useDoubles}</td> + * <td>N3/Turtle property: <code>useDoubles</code>.</td> + * <td><code>Boolean</code></td> + * <td><jk>true</jk></td> + * </tr> + * <tr> + * <td>{@link #RDF_collectionFormat}</td> + * <td>RDF format for representing collections and arrays.</td> + * <td><code>String</code></td> + * <td><js>"DEFAULT"</js></td> + * </tr> + * <tr> + * <td>{@link #RDF_looseCollections}</td> + * <td>Collections should be serialized and parsed as loose collections.</td> + * <td><code>Boolean</code></td> + * <td><jk>false</jk></td> + * </tr> + * </table> + * + * * @author James Bognar ([email protected]) */ @SuppressWarnings("serial") public interface RdfCommonContext { -// TODO - RENAME? + /** * Maps RDF writer names to property prefixes that apply to them. */ @@ -41,7 +234,13 @@ public interface RdfCommonContext { }}; /** - * The RDF language to serialize to ({@link String}, default=<js>"RDF/XML-ABBREV"</js>). + * <b>Configuration property:</b> RDF language. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.language"</js> + * <li><b>Data type:</b> <code>String</code> + * <li><b>Default:</b> <js>"RDF/XML-ABBREV"</js> + * </ul> * <p> * Can be any of the following: * <ul class='spaced-list'> @@ -64,17 +263,35 @@ public interface RdfCommonContext { public static final String RDF_language = "Rdf.language"; /** - * The XML namespace for Juneau properties ({@link Namespace}, default=<js>{j:'http://www.ibm.com/juneau/'}</js>). + * <b>Configuration property:</b> XML namespace for Juneau properties. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.juneauNs"</js> + * <li><b>Data type:</b> {@link Namespace} + * <li><b>Default:</b> <code>{j:<js>'http://www.ibm.com/juneau/'</js>}</code> + * </ul> */ public static final String RDF_juneauNs = "Rdf.juneauNs"; /** - * The default XML namespace for bean properties ({@link Namespace}, default=<js>{j:'http://www.ibm.com/juneaubp/'}</js>). + * <b>Configuration property:</b> Default XML namespace for bean properties. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.juneauBpNs"</js> + * <li><b>Data type:</b> {@link Namespace} + * <li><b>Default:</b> <code>{j:<js>'http://www.ibm.com/juneaubp/'</js>}</code> + * </ul> */ public static final String RDF_juneauBpNs = "Rdf.juneauBpNs"; /** - * Reuse XML namespaces when RDF namespaces not specified ({@link Boolean}, default=<jk>true</jk>). + * <b>Configuration property:</b> Reuse XML namespaces when RDF namespaces not specified. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.useXmlNamespaces"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>true</jk> + * </ul> * <p> * When specified, namespaces defined using {@link XmlNs} and {@link Xml} will be inherited by the RDF serializers. * Otherwise, namespaces will be defined using {@link RdfNs} and {@link Rdf}. @@ -82,7 +299,13 @@ public interface RdfCommonContext { public static final String RDF_useXmlNamespaces = "Rdf.useXmlNamespaces"; /** - * RDF/XML property: <code>iri_rules</code> ({@link String}, default=<js>"lax"</js>). + * <b>Configuration property:</b> RDF/XML property: <code>iri_rules</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.rdfXml.iri-rules"</js> + * <li><b>Data type:</b> <code>String</code> + * <li><b>Default:</b> <js>"lax"</js> + * </ul> * <p> * Set the engine for checking and resolving. * <p> @@ -96,7 +319,13 @@ public interface RdfCommonContext { public static final String RDF_arp_iriRules = "Rdf.jena.rdfXml.iri-rules"; /** - * RDF/XML ARP property: <code>error-mode</code> ({@link String}, default=<js>"lax"</js>). + * <b>Configuration property:</b> RDF/XML ARP property: <code>error-mode</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.rdfXml.error-mode"</js> + * <li><b>Data type:</b> <code>String</code> + * <li><b>Default:</b> <js>"lax"</js> + * </ul> * <p> * This allows a coarse-grained approach to control of error handling. * <p> @@ -122,7 +351,13 @@ public interface RdfCommonContext { public static final String RDF_arp_errorMode = "Rdf.jena.rdfXml.error-mode"; /** - * RDF/XML ARP property: <code>embedding</code> ({@link Boolean}, default=<jk>false</jk>). + * <b>Configuration property:</b> RDF/XML ARP property: <code>embedding</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.rdfXml.embedding"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>false</jk> + * </ul> * <p> * Sets ARP to look for RDF embedded within an enclosing XML document. * <p> @@ -134,7 +369,12 @@ public interface RdfCommonContext { public static final String RDF_arp_embedding = "Rdf.jena.rdfXml.embedding"; /** - * RDF/XML ARP property: <code>ERR_xxx</code> ({@link String}). + * <b>Configuration property:</b> RDF/XML ARP property: <code>ERR_xxx</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.rdfXml.ERR_"</js> + * <li><b>Data type:</b> <code>String</code> + * </ul> * <p> * Provides fine-grained control over detected error conditions. * <p> @@ -155,28 +395,50 @@ public interface RdfCommonContext { public static final String RDF_arp_err_ = "Rdf.jena.rdfXml.ERR_"; /** - * RDF/XML ARP property: <code>WARN_xxx</code> ({@link String}). + * <b>Configuration property:</b> RDF/XML ARP property: <code>WARN_xxx</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.rdfXml.WARN_"</js> + * <li><b>Data type:</b> <code>String</code> + * </ul> * <p> * See {@link #RDF_arp_err_} for details. */ public static final String RDF_arp_warn_ = "Rdf.jena.rdfXml.WARN_"; /** - * RDF/XML ARP property: <code>IGN_xxx</code> ({@link String}). + * RDF/XML ARP property: <code>IGN_xxx</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.rdfXml.IGN_"</js> + * <li><b>Data type:</b> <code>String</code> + * </ul> * <p> * See {@link #RDF_arp_err_} for details. */ public static final String RDF_arp_ign_ = "Rdf.jena.rdfXml.IGN_"; /** - * RDF/XML property: <code>xmlbase</code> ({@link String}, default=<jk>null</jk>). + * <b>Configuration property:</b> RDF/XML property: <code>xmlbase</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.rdfXml.xmlbase"</js> + * <li><b>Data type:</b> <code>String</code> + * <li><b>Default:</b> <jk>null</jk> + * </ul> * <p> * The value to be included for an <xa>xml:base</xa> attribute on the root element in the file. */ public static final String RDF_rdfxml_xmlBase = "Rdf.jena.rdfXml.xmlbase"; /** - * RDF/XML property: <code>longId</code> ({@link Boolean}, default=<jk>false</jk>). + * <b>Configuration property:</b> RDF/XML property: <code>longId</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.rdfXml.longId"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>false</jk> + * </ul> * <p> * Whether to use long ID's for anon resources. * Short ID's are easier to read, but can run out of memory on very large models. @@ -184,14 +446,26 @@ public interface RdfCommonContext { public static final String RDF_rdfxml_longId = "Rdf.jena.rdfXml.longId"; /** - * RDF/XML property: <code>allowBadURIs</code> ({@link Boolean}, default=<jk>false</jk>). + * <b>Configuration property:</b> RDF/XML property: <code>allowBadURIs</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.rdfXml.allowBadURIs"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>false</jk> + * </ul> * <p> * URIs in the graph are, by default, checked prior to serialization. */ public static final String RDF_rdfxml_allowBadUris = "Rdf.jena.rdfXml.allowBadURIs"; /** - * RDF/XML property: <code>relativeURIs</code> ({@link String}). + * <b>Configuration property:</b> RDF/XML property: <code>relativeURIs</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.rdfXml.relativeURIs"</js> + * <li><b>Data type:</b> <code>String</code> + * <li><b>Default:</b> <js>"same-document, absolute, relative, parent"</js> + * </ul> * <p> * What sort of relative URIs should be used. * <p> @@ -212,7 +486,13 @@ public interface RdfCommonContext { public static final String RDF_rdfxml_relativeUris = "Rdf.jena.rdfXml.relativeURIs"; /** - * RDF/XML property: <code>showXmlDeclaration</code> ({@link String}, default=<js>"default"</js>). + * <b>Configuration property:</b> RDF/XML property: <code>showXmlDeclaration</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.rdfXml.showXmlDeclaration"</js> + * <li><b>Data type:</b> <code>String</code> + * <li><b>Default:</b> <js>"default"</js> + * </ul> * <p> * Possible values: * <ul class='spaced-list'> @@ -225,7 +505,13 @@ public interface RdfCommonContext { public static final String RDF_rdfxml_showXmlDeclaration = "Rdf.jena.rdfXml.showXmlDeclaration"; /** - * RDF/XML property: <code>showDoctypeDeclaration</code> ({@link Boolean}, default=<jk>true</jk>). + * <b>Configuration property:</b> RDF/XML property: <code>showDoctypeDeclaration</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.rdfXml.showDoctypeDeclaration"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>true</jk> + * </ul> * <p> * If true, an XML Doctype declaration is included in the output. * This declaration includes a <code>!ENTITY</code> declaration for each prefix mapping in the model, and any attribute value that starts with the URI of that mapping is written as starting with the corresponding entity invocation. @@ -233,63 +519,117 @@ public interface RdfCommonContext { public static final String RDF_rdfxml_showDoctypeDeclaration = "Rdf.jena.rdfXml.showDoctypeDeclaration"; /** - * RDF/XML property: <code>tab</code> ({@link Integer}, default=<code>2</code>). + * <b>Configuration property:</b> RDF/XML property: <code>tab</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.rdfXml.tab"</js> + * <li><b>Data type:</b> <code>Integer</code> + * <li><b>Default:</b> <code>2</code> + * </ul> * <p> * The number of spaces with which to indent XML child elements. */ public static final String RDF_rdfxml_tab = "Rdf.jena.rdfXml.tab"; /** - * RDF/XML property: <code>attributeQuoteChar</code> ({@link Character}, default=<js>'"'</js>). + * <b>Configuration property:</b> RDF/XML property: <code>attributeQuoteChar</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.rdfXml.attributeQuoteChar"</js> + * <li><b>Data type:</b> <code>Character</code> + * <li><b>Default:</b> <js>'"'</js> + * </ul> * <p> * The XML attribute quote character. */ public static final String RDF_rdfxml_attributeQuoteChar = "Rdf.jena.rdfXml.attributeQuoteChar"; /** - * RDF/XML property: <code>blockRules</code> ({@link String}, default=<js>""</js>). + * <b>Configuration property:</b> RDF/XML property: <code>blockRules</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.rdfXml.blockRules"</js> + * <li><b>Data type:</b> <code>String</code> + * <li><b>Default:</b> <js>""</js> + * </ul> * <p> * A list of <code>Resource</code> or a <code>String</code> being a comma separated list of fragment IDs from <a href='http://www.w3.org/TR/rdf-syntax-grammar'>RDF Syntax Grammar</a> indicating grammar rules that will not be used. */ public static final String RDF_rdfxml_blockRules = "Rdf.jena.rdfXml.blockRules"; /** - * N3/Turtle property: <code>minGap</code> ({@link Integer}, default=<code>1</code>). + * <b>Configuration property:</b> N3/Turtle property: <code>minGap</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.n3.minGap"</js> + * <li><b>Data type:</b> <code>Integer</code> + * <li><b>Default:</b> <code>1</code> + * </ul> * <p> * Minimum gap between items on a line. */ public static final String RDF_n3_minGap = "Rdf.jena.n3.minGap"; /** - * N3/Turtle property: <code>objectLists</code> ({@link Boolean}, default=<jk>true</jk>). + * <b>Configuration property:</b> N3/Turtle property: <code>objectLists</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.n3.objectLists"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>true</jk> + * </ul> * <p> * Print object lists as comma separated lists. */ public static final String RDF_n3_objectLists = "Rdf.jena.n3.objectLists"; /** - * N3/Turtle property: <code>subjectColumn</code> ({@link Integer}, default=indentProperty). + * <b>Configuration property:</b> N3/Turtle property: <code>subjectColumn</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.n3.subjectColumn"</js> + * <li><b>Data type:</b> <code>Integer</code> + * <li><b>Default:</b> indentProperty + * </ul> * <p> * If the subject is shorter than this value, the first property may go on the same line. */ public static final String RDF_n3_subjectColumn = "Rdf.jena.n3.subjectColumn"; /** - * N3/Turtle property: <code>propertyColumn</code> ({@link Integer}, default=<code>8</code>). + * <b>Configuration property:</b> N3/Turtle property: <code>propertyColumn</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.n3.propertyColumn"</js> + * <li><b>Data type:</b> <code>Integer</code> + * <li><b>Default:</b> <code>8</code> + * </ul> * <p> * Width of the property column. */ public static final String RDF_n3_propertyColumn = "Rdf.jena.n3.propertyColumn"; /** - * N3/Turtle property: <code>indentProperty</code> ({@link Integer}, default=<code>6</code>). + * <b>Configuration property:</b> N3/Turtle property: <code>indentProperty</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.n3.indentProperty"</js> + * <li><b>Data type:</b> <code>Integer</code> + * <li><b>Default:</b> <code>6</code> + * </ul> * <p> * Width to indent properties. */ public static final String RDF_n3_indentProperty = "Rdf.jena.n3.indentProperty"; /** - * N3/Turtle property: <code>widePropertyLen</code> ({@link Integer}, default=<code>20</code>). + * <b>Configuration property:</b> N3/Turtle property: <code>widePropertyLen</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.n3.widePropertyLen"</js> + * <li><b>Data type:</b> <code>Integer</code> + * <li><b>Default:</b> <code>20</code> + * </ul> * <p> * Width of the property column. * Must be longer than <code>propertyColumn</code>. @@ -297,35 +637,65 @@ public interface RdfCommonContext { public static final String RDF_n3_widePropertyLen = "Rdf.jena.n3.widePropertyLen"; /** - * N3/Turtle property: <code>abbrevBaseURI</code> ({@link Boolean}, default=<jk>true</jk>). + * <b>Configuration property:</b> N3/Turtle property: <code>abbrevBaseURI</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.n3.abbrevBaseURI"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>true</jk> + * </ul> * <p> * Control whether to use abbreviations <code><></code> or <code><#></code>. */ public static final String RDF_n3_abbrevBaseUri = "Rdf.jena.n3.abbrevBaseURI"; /** - * N3/Turtle property: <code>usePropertySymbols</code> ({@link Boolean}, default=<jk>true</jk>). + * <b>Configuration property:</b> N3/Turtle property: <code>usePropertySymbols</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.n3.usePropertySymbols"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>true</jk> + * </ul> * <p> * Control whether to use <code>a</code>, <code>=</code> and <code>=></code> in output */ public static final String RDF_n3_usePropertySymbols = "Rdf.jena.n3.usePropertySymbols"; /** - * N3/Turtle property: <code>useTripleQuotedStrings</code> ({@link Boolean}, default=<jk>true</jk>). + * <b>Configuration property:</b> N3/Turtle property: <code>useTripleQuotedStrings</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.n3.useTripleQuotedStrings"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>true</jk> + * </ul> * <p> * Allow the use of <code>"""</code> to delimit long strings. */ public static final String RDF_n3_useTripleQuotedStrings = "Rdf.jena.n3.useTripleQuotedStrings"; /** - * N3/Turtle property: <code>useDoubles</code> ({@link Boolean}, default=<jk>true</jk>). + * <b>Configuration property:</b> N3/Turtle property: <code>useDoubles</code>. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.jena.n3.useDoubles"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>true</jk> + * </ul> * <p> * Allow the use doubles as <code>123.456</code>. */ public static final String RDF_n3_useDoubles = "Rdf.jena.n3.useDoubles"; /** - * The RDF format for representing collections and arrays. ({@link String}, default=<js>"DEFAULT"</js>). + * <b>Configuration property:</b> RDF format for representing collections and arrays. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.collectionFormat"</js> + * <li><b>Data type:</b> <code>String</code> + * <li><b>Default:</b> <js>"DEFAULT"</js> + * </ul> * <p> * Possible values: * <ul class='spaced-list'> @@ -343,7 +713,13 @@ public interface RdfCommonContext { public static final String RDF_collectionFormat = "Rdf.collectionFormat"; /** - * Specifies that collections should be serialized and parsed as loose collections. ({@link Boolean}, default=<jk>false</jk>). + * <b>Configuration property:</b> Collections should be serialized and parsed as loose collections. + * <p> + * <ul> + * <li><b>Name:</b> <js>"Rdf.looseCollections"</js> + * <li><b>Data type:</b> <code>Boolean</code> + * <li><b>Default:</b> <jk>false</jk> + * </ul> * <p> * When specified, collections of resources are handled as loose collections of resources in RDF instead of * resources that are children of an RDF collection (e.g. Sequence, Bag). @@ -381,5 +757,5 @@ public interface RdfCommonContext { * </dd> * </dl> */ - public static final String RDF_looseCollection = "Rdf.looseCollection"; + public static final String RDF_looseCollections = "Rdf.looseCollections"; } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/d45e1351/juneau-core/src/main/java/org/apache/juneau/jena/RdfParser.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/jena/RdfParser.java b/juneau-core/src/main/java/org/apache/juneau/jena/RdfParser.java index 7a8b741..00dd08a 100644 --- a/juneau-core/src/main/java/org/apache/juneau/jena/RdfParser.java +++ b/juneau-core/src/main/java/org/apache/juneau/jena/RdfParser.java @@ -124,7 +124,7 @@ public class RdfParser extends ReaderParser { List<Resource> roots = getRoots(s, model); // Special case where we're parsing a loose collection of resources. - if (s.isLooseCollection() && (type.isCollection() || type.isArray())) { + if (s.isLooseCollections() && (type.isCollection() || type.isArray())) { Collection c = null; if (type.isArray()) c = new ArrayList();
