Repository: incubator-juneau Updated Branches: refs/heads/master 5c4762eed -> 33f89d581
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/33f89d58 Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau/tree/33f89d58 Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau/diff/33f89d58 Branch: refs/heads/master Commit: 33f89d5811fefbc0562bbde57a67967511edbbca Parents: 5c4762e Author: JamesBognar <[email protected]> Authored: Mon Jun 26 10:10:01 2017 -0400 Committer: JamesBognar <[email protected]> Committed: Mon Jun 26 10:10:01 2017 -0400 ---------------------------------------------------------------------- .../java/org/apache/juneau/jena/Constants.java | 4 +- .../org/apache/juneau/jena/RdfBeanMeta.java | 6 +- .../apache/juneau/jena/RdfBeanPropertyMeta.java | 9 +- .../org/apache/juneau/jena/RdfClassMeta.java | 9 +- .../apache/juneau/jena/RdfCollectionFormat.java | 2 +- .../apache/juneau/jena/RdfCommonContext.java | 41 ++- .../java/org/apache/juneau/jena/RdfParser.java | 31 +- .../apache/juneau/jena/RdfParserBuilder.java | 18 +- .../apache/juneau/jena/RdfParserContext.java | 9 +- .../apache/juneau/jena/RdfParserSession.java | 17 +- .../org/apache/juneau/jena/RdfSerializer.java | 15 +- .../juneau/jena/RdfSerializerBuilder.java | 32 +- .../juneau/jena/RdfSerializerContext.java | 22 +- .../juneau/jena/RdfSerializerSession.java | 13 +- .../java/org/apache/juneau/jena/RdfUtils.java | 3 +- .../java/org/apache/juneau/jena/package.html | 299 ++++++++++++------- .../.settings/org.eclipse.wst.html.core.prefs | 43 +++ .../.settings/org.eclipse.wst.html.core.prefs | 43 +++ .../eclipse-preferences/user-dictionary.txt | 6 + 19 files changed, 428 insertions(+), 194 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-core-rdf/src/main/java/org/apache/juneau/jena/Constants.java ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/Constants.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/Constants.java index 00873ba..47fcb73 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/Constants.java +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/Constants.java @@ -46,8 +46,8 @@ public final class Constants { /** * RDF property identifier <js>"items"</js>. * <p> - * For resources that are collections, this property identifies the RDF Sequence - * container for the items in the collection. + * For resources that are collections, this property identifies the RDF Sequence container for the items in the + * collection. */ public static final String RDF_juneauNs_ITEMS = "items"; http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfBeanMeta.java ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfBeanMeta.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfBeanMeta.java index 1923ac3..b929db3 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfBeanMeta.java +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfBeanMeta.java @@ -16,7 +16,8 @@ import org.apache.juneau.*; import org.apache.juneau.jena.annotation.*; /** - * Metadata on beans specific to the RDF serializers and parsers pulled from the {@link Rdf @Rdf} annotation on the class. + * Metadata on beans specific to the RDF serializers and parsers pulled from the {@link Rdf @Rdf} annotation on the + * class. */ public class RdfBeanMeta extends BeanMetaExtended { @@ -42,7 +43,8 @@ public class RdfBeanMeta extends BeanMetaExtended { } /** - * Returns <jk>true</jk> if one of the properties on this bean is annotated with {@link Rdf#beanUri()} as <jk>true</jk> + * Returns <jk>true</jk> if one of the properties on this bean is annotated with {@link Rdf#beanUri()} as + * <jk>true</jk> * * @return <jk>true</jk> if there is a URI property associated with this bean. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfBeanPropertyMeta.java ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfBeanPropertyMeta.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfBeanPropertyMeta.java index dbf14da..1bee6bd 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfBeanPropertyMeta.java +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfBeanPropertyMeta.java @@ -21,7 +21,8 @@ import org.apache.juneau.jena.annotation.*; import org.apache.juneau.xml.*; /** - * Metadata on bean properties specific to the RDF serializers and parsers pulled from the {@link Rdf @Rdf} annotation on the bean property. + * Metadata on bean properties specific to the RDF serializers and parsers pulled from the {@link Rdf @Rdf} annotation + * on the bean property. */ public class RdfBeanPropertyMeta extends BeanPropertyMetaExtended { @@ -51,7 +52,8 @@ public class RdfBeanPropertyMeta extends BeanPropertyMetaExtended { } /** - * Returns the RDF collection format of this property from the {@link Rdf#collectionFormat} annotation on this bean property. + * Returns the RDF collection format of this property from the {@link Rdf#collectionFormat} annotation on this bean + * property. * * @return The RDF collection format, or {@link RdfCollectionFormat#DEFAULT} if annotation not specified. */ @@ -75,8 +77,7 @@ public class RdfBeanPropertyMeta extends BeanPropertyMetaExtended { * <li>{@link Rdf#prefix()} annotation defined on bean interface packages. * </ol> * - * @return The namespace associated with this bean property, or <jk>null</jk> if no namespace is - * associated with it. + * @return The namespace associated with this bean property, or <jk>null</jk> if no namespace is associated with it. */ public Namespace getNamespace() { return namespace; http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfClassMeta.java ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfClassMeta.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfClassMeta.java index 4de7e2c..e8c2773 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfClassMeta.java +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfClassMeta.java @@ -20,7 +20,8 @@ import org.apache.juneau.jena.annotation.*; import org.apache.juneau.xml.*; /** - * Metadata on classes specific to the RDF serializers and parsers pulled from the {@link Rdf @Rdf} annotation on the class. + * Metadata on classes specific to the RDF serializers and parsers pulled from the {@link Rdf @Rdf} annotation on the + * class. */ public class RdfClassMeta extends ClassMetaExtended { @@ -59,7 +60,8 @@ public class RdfClassMeta extends ClassMetaExtended { /** * Returns the {@link Rdf#collectionFormat()} annotation defined on the class. * - * @return The value of the {@link Rdf#collectionFormat()} annotation, or <jk>null</jk> if annotation is not specified. + * @return The value of the {@link Rdf#collectionFormat()} annotation, or <jk>null</jk> if annotation is not + * specified. */ protected RdfCollectionFormat getCollectionFormat() { return collectionFormat; @@ -78,8 +80,7 @@ public class RdfClassMeta extends ClassMetaExtended { * <li>{@link Rdf#prefix()} annotation defined on interface packages. * </ol> * - * @return The namespace associated with this class, or <jk>null</jk> if no namespace is - * associated with it. + * @return The namespace associated with this class, or <jk>null</jk> if no namespace is associated with it. */ protected Namespace getNamespace() { return namespace; http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCollectionFormat.java ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCollectionFormat.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCollectionFormat.java index c7de4e8..e1f64a9 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCollectionFormat.java +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCollectionFormat.java @@ -16,7 +16,7 @@ import org.apache.juneau.jena.annotation.*; /** * Used in conjunction with the {@link Rdf#collectionFormat() @Rdf.collectionFormat()} annotation to fine-tune how - * classes, beans, and bean properties are serialized, particularly collections. + * classes, beans, and bean properties are serialized, particularly collections. */ public enum RdfCollectionFormat { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCommonContext.java ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCommonContext.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCommonContext.java index 1745f7f..2405235 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCommonContext.java +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCommonContext.java @@ -52,10 +52,13 @@ public interface RdfCommonContext { * <li><js>"RDF/XML-ABBREV"</js> * <li><js>"N-TRIPLE"</js> * <li><js>"N3"</js> - General name for the N3 writer. - * Will make a decision on exactly which writer to use (pretty writer, plain writer or simple writer) when created. - * Default is the pretty writer but can be overridden with system property <code>com.hp.hpl.jena.n3.N3JenaWriter.writer</code>. + * Will make a decision on exactly which writer to use (pretty writer, plain writer or simple writer) when + * created. + * Default is the pretty writer but can be overridden with system property + * <code>com.hp.hpl.jena.n3.N3JenaWriter.writer</code>. * <li><js>"N3-PP"</js> - Name of the N3 pretty writer. - * The pretty writer uses a frame-like layout, with prefixing, clustering like properties and embedding one-referenced bNodes. + * The pretty writer uses a frame-like layout, with prefixing, clustering like properties and embedding + * one-referenced bNodes. * <li><js>"N3-PLAIN"</js> - Name of the N3 plain writer. * The plain writer writes records by subject. * <li><js>"N3-TRIPLES"</js> - Name of the N3 triples writer. @@ -115,9 +118,13 @@ public interface RdfCommonContext { * <p> * Possible values: * <ul class='spaced-list'> - * <li><js>"lax"</js> - The rules for RDF URI references only, which does permit spaces although the use of spaces is not good practice. - * <li><js>"strict"</js> - Sets the IRI engine with rules for valid IRIs, XLink and RDF; it does not permit spaces in IRIs. - * <li><js>"iri"</js> - Sets the IRI engine to IRI (<a class="doclink" href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>, <a class="doclink" href="http://www.ietf.org/rfc/rfc3987.txt">RFC 3987</a>). + * <li><js>"lax"</js> - The rules for RDF URI references only, which does permit spaces although the use of spaces + * is not good practice. + * <li><js>"strict"</js> - Sets the IRI engine with rules for valid IRIs, XLink and RDF; it does not permit spaces + * in IRIs. + * <li><js>"iri"</js> - Sets the IRI engine to IRI + * (<a class="doclink" href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>, + * <a class="doclink" href="http://www.ietf.org/rfc/rfc3987.txt">RFC 3987</a>). * </ul> */ public static final String RDF_arp_iriRules = "Rdf.jena.rdfXml.iri-rules"; @@ -278,9 +285,9 @@ public interface RdfCommonContext { * <li><js>"same-document"</js> - Same-document references (e.g. <js>""</js> or <js>"#foo"</js>) * <li><js>"network"</js> - Network paths (e.g. <js>"//example.org/foo"</js> omitting the URI scheme) * <li><js>"absolute"</js> - Absolute paths (e.g. <js>"/foo"</js> omitting the scheme and authority) - * <li><js>"relative"</js> - Relative path not begining in <js>"../"</js> - * <li><js>"parent"</js> - Relative path begining in <js>"../"</js> - * <li><js>"grandparent"</js> - Relative path begining in <js>"../../"</js> + * <li><js>"relative"</js> - Relative path not beginning in <js>"../"</js> + * <li><js>"parent"</js> - Relative path beginning in <js>"../"</js> + * <li><js>"grandparent"</js> - Relative path beginning in <js>"../../"</js> * </ul> * <p> * The default value is <js>"same-document, absolute, relative, parent"</js>. @@ -302,7 +309,8 @@ public interface RdfCommonContext { * <ul class='spaced-list'> * <li><js>"true"</js> - Add XML Declaration to the output. * <li><js>"false"</js> - Don't add XML Declaration to the output. - * <li><js>"default"</js> - Only add an XML Declaration when asked to write to an <code>OutputStreamWriter</code> that uses some encoding other than <code>UTF-8</code> or <code>UTF-16</code>. + * <li><js>"default"</js> - Only add an XML Declaration when asked to write to an <code>OutputStreamWriter</code> + * that uses some encoding other than <code>UTF-8</code> or <code>UTF-16</code>. * In this case the encoding is shown in the XML declaration. * </ul> */ @@ -317,8 +325,10 @@ public interface RdfCommonContext { * <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. + * 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. */ public static final String RDF_rdfxml_showDoctypeDeclaration = "Rdf.jena.rdfXml.showDoctypeDeclaration"; @@ -357,7 +367,9 @@ public interface RdfCommonContext { * <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 class="doclink" href="http://www.w3.org/TR/rdf-syntax-grammar">RDF Syntax Grammar</a> indicating grammar rules that will not be used. + * A list of <code>Resource</code> or a <code>String</code> being a comma separated list of fragment IDs from + * <a class="doclink" 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"; @@ -512,7 +524,8 @@ public interface RdfCommonContext { * <p> * <h5 class='section'>Notes:</h5> * <ul> - * <li>If you use <js>"BAG"</js> or <js>"MULTI_VALUED"</js>, the order of the elements in the collection will get lost. + * <li>If you use <js>"BAG"</js> or <js>"MULTI_VALUED"</js>, the order of the elements in the collection will get + * lost. * </ul> */ public static final String RDF_collectionFormat = "Rdf.collectionFormat"; http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParser.java ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParser.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParser.java index c5cd6f4..33f74c1 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParser.java +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParser.java @@ -34,7 +34,7 @@ import com.hp.hpl.jena.util.iterator.*; * <h5 class='section'>Configurable properties:</h5> * <p> * Refer to <a class="doclink" href="package-summary.html#ParserConfigurableProperties">Configurable Properties</a> - * for the entire list of configurable properties. + * for the entire list of configurable properties. * * <h6 class='topic'>Behavior-specific subclasses</h6> * <p> @@ -72,6 +72,7 @@ public class RdfParser extends ReaderParser { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public Xml(PropertyStore propertyStore) { @@ -90,6 +91,7 @@ public class RdfParser extends ReaderParser { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public NTriple(PropertyStore propertyStore) { @@ -108,6 +110,7 @@ public class RdfParser extends ReaderParser { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public Turtle(PropertyStore propertyStore) { @@ -126,6 +129,7 @@ public class RdfParser extends ReaderParser { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public N3(PropertyStore propertyStore) { @@ -143,6 +147,7 @@ public class RdfParser extends ReaderParser { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public RdfParser(PropertyStore propertyStore) { @@ -173,11 +178,16 @@ public class RdfParser extends ReaderParser { if (type.isArray() || type.isArgs()) c = new ArrayList(); else - c = (type.canCreateNewInstance(session.getOuter()) ? (Collection<?>)type.newInstance(session.getOuter()) : new ObjectList(session)); + c = ( + type.canCreateNewInstance(session.getOuter()) + ? (Collection<?>)type.newInstance(session.getOuter()) + : new ObjectList(session) + ); int argIndex = 0; for (Resource resource : roots) - c.add(parseAnything(s, type.isArgs() ? type.getArg(argIndex++) : type.getElementType(), resource, session.getOuter(), null)); + c.add(parseAnything(s, type.isArgs() ? type.getArg(argIndex++) : type.getElementType(), resource, + session.getOuter(), null)); if (type.isArray() || type.isArgs()) return (T)session.toArray(type, c); @@ -266,7 +276,8 @@ public class RdfParser extends ReaderParser { } @SuppressWarnings({ "unchecked", "rawtypes" }) - private <T> T parseAnything(RdfParserSession session, ClassMeta<T> eType, RDFNode n, Object outer, BeanPropertyMeta pMeta) throws Exception { + private <T> T parseAnything(RdfParserSession session, ClassMeta<T> eType, RDFNode n, Object outer, + BeanPropertyMeta pMeta) throws Exception { if (eType == null) eType = (ClassMeta<T>)object(); @@ -425,7 +436,8 @@ public class RdfParser extends ReaderParser { throw new ParseException(session, "Unknown value type for node ''{0}''", n); } - private <K,V> Map<K,V> parseIntoMap(RdfParserSession session, Resource r, Map<K,V> m, ClassMeta<K> keyType, ClassMeta<V> valueType, BeanPropertyMeta pMeta) throws Exception { + private <K,V> Map<K,V> parseIntoMap(RdfParserSession session, Resource r, Map<K,V> m, ClassMeta<K> keyType, + ClassMeta<V> valueType, BeanPropertyMeta pMeta) throws Exception { // Add URI as "uri" to generic maps. if (r.getURI() != null) { K uri = convertAttrToType(session, m, "uri", keyType); @@ -450,7 +462,8 @@ public class RdfParser extends ReaderParser { } @SuppressWarnings("unchecked") - private <E> Collection<E> parseIntoCollection(RdfParserSession session, Container c, Collection<E> l, ClassMeta<?> type, BeanPropertyMeta pMeta) throws Exception { + private <E> Collection<E> parseIntoCollection(RdfParserSession session, Container c, Collection<E> l, + ClassMeta<?> type, BeanPropertyMeta pMeta) throws Exception { int argIndex = 0; for (NodeIterator ni = c.iterator(); ni.hasNext();) { E e = (E)parseAnything(session, type.isArgs() ? type.getArg(argIndex++) : type.getElementType(), ni.next(), l, pMeta); @@ -460,7 +473,8 @@ public class RdfParser extends ReaderParser { } @SuppressWarnings("unchecked") - private <E> Collection<E> parseIntoCollection(RdfParserSession session, RDFList list, Collection<E> l, ClassMeta<?> type, BeanPropertyMeta pMeta) throws Exception { + private <E> Collection<E> parseIntoCollection(RdfParserSession session, RDFList list, Collection<E> l, + ClassMeta<?> type, BeanPropertyMeta pMeta) throws Exception { int argIndex = 0; for (ExtendedIterator<RDFNode> ni = list.iterator(); ni.hasNext();) { E e = (E)parseAnything(session, type.isArgs() ? type.getArg(argIndex++) : type.getElementType(), ni.next(), l, pMeta); @@ -475,7 +489,8 @@ public class RdfParser extends ReaderParser { //-------------------------------------------------------------------------------- @Override /* Parser */ - public RdfParserSession createSession(Object input, ObjectMap op, Method javaMethod, Object outer, Locale locale, TimeZone timeZone, MediaType mediaType) { + public RdfParserSession createSession(Object input, ObjectMap op, Method javaMethod, Object outer, Locale locale, + TimeZone timeZone, MediaType mediaType) { return new RdfParserSession(ctx, op, input, javaMethod, outer, locale, timeZone, mediaType); } } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserBuilder.java ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserBuilder.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserBuilder.java index aa798ad..8003b0d 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserBuilder.java +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserBuilder.java @@ -38,6 +38,7 @@ public class RdfParserBuilder extends ParserBuilder { /** * Constructor. + * * @param propertyStore The initial configuration settings for this builder. */ public RdfParserBuilder(PropertyStore propertyStore) { @@ -94,10 +95,13 @@ public class RdfParserBuilder extends ParserBuilder { * <li><js>"RDF/XML-ABBREV"</js> * <li><js>"N-TRIPLE"</js> * <li><js>"N3"</js> - General name for the N3 writer. - * Will make a decision on exactly which writer to use (pretty writer, plain writer or simple writer) when created. - * Default is the pretty writer but can be overridden with system property <code>com.hp.hpl.jena.n3.N3JenaWriter.writer</code>. + * Will make a decision on exactly which writer to use (pretty writer, plain writer or simple writer) when + * created. + * Default is the pretty writer but can be overridden with system property + * <code>com.hp.hpl.jena.n3.N3JenaWriter.writer</code>. * <li><js>"N3-PP"</js> - Name of the N3 pretty writer. - * The pretty writer uses a frame-like layout, with prefixing, clustering like properties and embedding one-referenced bNodes. + * The pretty writer uses a frame-like layout, with prefixing, clustering like properties and embedding + * one-referenced bNodes. * <li><js>"N3-PLAIN"</js> - Name of the N3 plain writer. * The plain writer writes records by subject. * <li><js>"N3-TRIPLES"</js> - Name of the N3 triples writer. @@ -121,6 +125,7 @@ public class RdfParserBuilder extends ParserBuilder { /** * Shortcut for calling <code>language(<jsf>LANG_RDF_XML</jsf>)</code> + * * @return This object (for method chaining). */ public RdfParserBuilder xml() { @@ -129,6 +134,7 @@ public class RdfParserBuilder extends ParserBuilder { /** * Shortcut for calling <code>language(<jsf>LANG_RDF_XML_ABBREV</jsf>)</code> + * * @return This object (for method chaining). */ public RdfParserBuilder xmlabbrev() { @@ -137,6 +143,7 @@ public class RdfParserBuilder extends ParserBuilder { /** * Shortcut for calling <code>language(<jsf>LANG_NTRIPLE</jsf>)</code> + * * @return This object (for method chaining). */ public RdfParserBuilder ntriple() { @@ -145,6 +152,7 @@ public class RdfParserBuilder extends ParserBuilder { /** * Shortcut for calling <code>language(<jsf>LANG_N3</jsf>)</code> + * * @return This object (for method chaining). */ public RdfParserBuilder n3() { @@ -153,6 +161,7 @@ public class RdfParserBuilder extends ParserBuilder { /** * Shortcut for calling <code>language(<jsf>LANG_TURTLE</jsf>)</code> + * * @return This object (for method chaining). */ public RdfParserBuilder turtle() { @@ -248,7 +257,8 @@ public class RdfParserBuilder extends ParserBuilder { * <p> * <h5 class='section'>Notes:</h5> * <ul> - * <li>If you use <js>"BAG"</js> or <js>"MULTI_VALUED"</js>, the order of the elements in the collection will get lost. + * <li>If you use <js>"BAG"</js> or <js>"MULTI_VALUED"</js>, the order of the elements in the collection will get + * lost. * </ul> * <p> * <h5 class='section'>Notes:</h5> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserContext.java ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserContext.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserContext.java index 6aa4959..fb083da 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserContext.java +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserContext.java @@ -28,11 +28,14 @@ import org.apache.juneau.xml.*; * * <h6 class='topic' id='ConfigProperties'>Configurable properties inherited by the RDF parsers</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> - * <li class='jic'><a class="doclink" href="RdfCommonContext.html#ConfigProperties">RdfCommonContext</a> - Configurable properties common to the RDF serializers and parsers. + * <li class='jic'><a class="doclink" href="RdfCommonContext.html#ConfigProperties">RdfCommonContext</a> + * - Configurable properties common to the RDF serializers and parsers. * </ul> * </ul> * </ul> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserSession.java ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserSession.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserSession.java index 257fc7a..5bed276 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserSession.java +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserSession.java @@ -48,13 +48,13 @@ public class RdfParserSession extends ParserSession { * @param ctx The context creating this session object. * The context contains all the configuration settings for this object. * @param input The input. Can be any of the following types: - * <ul> - * <li><jk>null</jk> - * <li>{@link Reader} - * <li>{@link CharSequence} - * <li>{@link InputStream} containing UTF-8 encoded text. - * <li>{@link File} containing system encoded text. - * </ul> + * <ul> + * <li><jk>null</jk> + * <li>{@link Reader} + * <li>{@link CharSequence} + * <li>{@link InputStream} containing UTF-8 encoded text. + * <li>{@link File} containing system encoded text. + * </ul> * @param op The override properties. * These override any context properties defined in the context. * @param javaMethod The java method that called this parser, usually the method in a REST servlet. @@ -65,7 +65,8 @@ public class RdfParserSession extends ParserSession { * 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>). */ - protected RdfParserSession(RdfParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer, Locale locale, TimeZone timeZone, MediaType mediaType) { + protected RdfParserSession(RdfParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer, + Locale locale, TimeZone timeZone, MediaType mediaType) { super(ctx, op, input, javaMethod, outer, locale, timeZone, mediaType); ObjectMap jenaSettings = new ObjectMap(); jenaSettings.putAll(ctx.jenaSettings); http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializer.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializer.java index ccbc6b3..fbaf525 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializer.java +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializer.java @@ -77,6 +77,7 @@ public class RdfSerializer extends WriterSerializer { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public Xml(PropertyStore propertyStore) { @@ -95,6 +96,7 @@ public class RdfSerializer extends WriterSerializer { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public XmlAbbrev(PropertyStore propertyStore) { @@ -113,6 +115,7 @@ public class RdfSerializer extends WriterSerializer { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public NTriple(PropertyStore propertyStore) { @@ -131,6 +134,7 @@ public class RdfSerializer extends WriterSerializer { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public Turtle(PropertyStore propertyStore) { @@ -149,6 +153,7 @@ public class RdfSerializer extends WriterSerializer { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public N3(PropertyStore propertyStore) { @@ -166,6 +171,7 @@ public class RdfSerializer extends WriterSerializer { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public RdfSerializer(PropertyStore propertyStore) { @@ -207,7 +213,8 @@ public class RdfSerializer extends WriterSerializer { s.getRdfWriter().write(model, session.getWriter(), "http://unknown/"); } - private RDFNode serializeAnything(RdfSerializerSession session, Object o, boolean isURI, ClassMeta<?> eType, String attrName, BeanPropertyMeta bpm, Resource parentResource) throws SerializeException { + private RDFNode serializeAnything(RdfSerializerSession session, Object o, boolean isURI, ClassMeta<?> eType, + String attrName, BeanPropertyMeta bpm, Resource parentResource) throws SerializeException { Model m = session.getModel(); ClassMeta<?> aType = null; // The actual type @@ -415,7 +422,8 @@ public class RdfSerializer extends WriterSerializer { return session.getModel().createList(l.iterator()); } - private void serializeToMultiProperties(RdfSerializerSession session, Collection c, ClassMeta<?> sType, BeanPropertyMeta bpm, String attrName, Resource parentResource) throws SerializeException { + private void serializeToMultiProperties(RdfSerializerSession session, Collection c, ClassMeta<?> sType, + BeanPropertyMeta bpm, String attrName, Resource parentResource) throws SerializeException { ClassMeta<?> elementType = sType.getElementType(); for (Object e : c) { Namespace ns = null; @@ -441,7 +449,8 @@ public class RdfSerializer extends WriterSerializer { //-------------------------------------------------------------------------------- @Override /* Serializer */ - public RdfSerializerSession createSession(Object output, ObjectMap op, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) { + public RdfSerializerSession createSession(Object output, ObjectMap op, Method javaMethod, Locale locale, + TimeZone timeZone, MediaType mediaType, UriContext uriContext) { return new RdfSerializerSession(ctx, op, output, javaMethod, locale, timeZone, mediaType, uriContext); } } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerBuilder.java ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerBuilder.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerBuilder.java index d022797..85484e7 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerBuilder.java +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerBuilder.java @@ -38,6 +38,7 @@ public class RdfSerializerBuilder extends SerializerBuilder { /** * Constructor. + * * @param propertyStore The initial configuration settings for this builder. */ public RdfSerializerBuilder(PropertyStore propertyStore) { @@ -69,10 +70,13 @@ public class RdfSerializerBuilder extends SerializerBuilder { * <li><js>"RDF/XML-ABBREV"</js> * <li><js>"N-TRIPLE"</js> * <li><js>"N3"</js> - General name for the N3 writer. - * Will make a decision on exactly which writer to use (pretty writer, plain writer or simple writer) when created. - * Default is the pretty writer but can be overridden with system property <code>com.hp.hpl.jena.n3.N3JenaWriter.writer</code>. + * Will make a decision on exactly which writer to use (pretty writer, plain writer or simple writer) when + * created. + * Default is the pretty writer but can be overridden with system property + * <code>com.hp.hpl.jena.n3.N3JenaWriter.writer</code>. * <li><js>"N3-PP"</js> - Name of the N3 pretty writer. - * The pretty writer uses a frame-like layout, with prefixing, clustering like properties and embedding one-referenced bNodes. + * The pretty writer uses a frame-like layout, with prefixing, clustering like properties and embedding + * one-referenced bNodes. * <li><js>"N3-PLAIN"</js> - Name of the N3 plain writer. * The plain writer writes records by subject. * <li><js>"N3-TRIPLES"</js> - Name of the N3 triples writer. @@ -97,6 +101,7 @@ public class RdfSerializerBuilder extends SerializerBuilder { /** * Shortcut for calling <code>language(<jsf>LANG_RDF_XML</jsf>)</code> + * * @return This object (for method chaining). */ public RdfSerializerBuilder xml() { @@ -105,6 +110,7 @@ public class RdfSerializerBuilder extends SerializerBuilder { /** * Shortcut for calling <code>language(<jsf>LANG_RDF_XML_ABBREV</jsf>)</code> + * * @return This object (for method chaining). */ public RdfSerializerBuilder xmlabbrev() { @@ -113,6 +119,7 @@ public class RdfSerializerBuilder extends SerializerBuilder { /** * Shortcut for calling <code>language(<jsf>LANG_NTRIPLE</jsf>)</code> + * * @return This object (for method chaining). */ public RdfSerializerBuilder ntriple() { @@ -121,6 +128,7 @@ public class RdfSerializerBuilder extends SerializerBuilder { /** * Shortcut for calling <code>language(<jsf>LANG_N3</jsf>)</code> + * * @return This object (for method chaining). */ public RdfSerializerBuilder n3() { @@ -129,6 +137,7 @@ public class RdfSerializerBuilder extends SerializerBuilder { /** * Shortcut for calling <code>language(<jsf>LANG_TURTLE</jsf>)</code> + * * @return This object (for method chaining). */ public RdfSerializerBuilder turtle() { @@ -241,13 +250,12 @@ public class RdfSerializerBuilder extends SerializerBuilder { * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> * <p> - * When enabled an RDF property <code>http://www.apache.org/juneau/root</code> is added with a value of <js>"true"</js> - * to identify the root node in the graph. + * When enabled an RDF property <code>http://www.apache.org/juneau/root</code> is added with a value of + * <js>"true"</js> to identify the root node in the graph. * This helps locate the root node during parsing. * <p> - * If disabled, the parser has to search through the model to find any resources without - * incoming predicates to identify root notes, which can introduce a considerable performance - * degradation. + * If disabled, the parser has to search through the model to find any resources without incoming predicates to + * identify root notes, which can introduce a considerable performance degradation. * <p> * <h5 class='section'>Notes:</h5> * <ul> @@ -275,9 +283,8 @@ public class RdfSerializerBuilder extends SerializerBuilder { * <p> * Detect namespace usage before serialization. * <p> - * If enabled, then the data structure will first be crawled looking for - * namespaces that will be encountered before the root element is - * serialized. + * If enabled, then the data structure will first be crawled looking for namespaces that will be encountered before + * the root element is serialized. * <p> * <h5 class='section'>Notes:</h5> * <ul> @@ -339,7 +346,8 @@ public class RdfSerializerBuilder extends SerializerBuilder { * <p> * <h5 class='section'>Notes:</h5> * <ul> - * <li>If you use <js>"BAG"</js> or <js>"MULTI_VALUED"</js>, the order of the elements in the collection will get lost. + * <li>If you use <js>"BAG"</js> or <js>"MULTI_VALUED"</js>, the order of the elements in the collection will get + * lost. * </ul> * <p> * <h5 class='section'>Notes:</h5> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerContext.java ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerContext.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerContext.java index ccaf698..1c3e794 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerContext.java +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerContext.java @@ -28,11 +28,14 @@ import org.apache.juneau.xml.*; * * <h6 class='topic' id='ConfigProperties'>Configurable properties inherited by the RDF serializers</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="RdfCommonContext.html#ConfigProperties">RdfCommonContext</a> - Configurable properties common to the RDF serializers and parsers. + * <li class='jc'><a class="doclink" href="RdfCommonContext.html#ConfigProperties">RdfCommonContext</a> + * - Configurable properties common to the RDF serializers and parsers. * </ul> * </ul> * </ul> @@ -62,12 +65,11 @@ public final class RdfSerializerContext extends SerializerContext implements Rdf * </ul> * <p> * When enabled an RDF property <code>http://www.apache.org/juneau/root</code> is added with a value of <js>"true"</js> - * to identify the root node in the graph. + * to identify the root node in the graph. * This helps locate the root node during parsing. * <p> - * If disabled, the parser has to search through the model to find any resources without - * incoming predicates to identify root notes, which can introduce a considerable performance - * degradation. + * If disabled, the parser has to search through the model to find any resources without incoming predicates to + * identify root notes, which can introduce a considerable performance degradation. */ public static final String RDF_addRootProperty = "RdfSerializer.addRootProperty"; @@ -113,9 +115,11 @@ public final class RdfSerializerContext extends SerializerContext implements Rdf * <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}. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerSession.java ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerSession.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerSession.java index eac8700..4b055b7 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerSession.java +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerSession.java @@ -54,20 +54,21 @@ public final class RdfSerializerSession extends SerializerSession { * Create a new session using properties specified in the context. * * @param ctx The context creating this session object. - * The context contains all the configuration settings for this object. + * The context contains all the configuration settings for this object. * @param output The output object. See {@link JsonSerializerSession#getWriter()} for valid class types. * @param op The override properties. - * These override any context properties defined in the context. + * These override any context properties defined in the context. * @param javaMethod The java method that called this serializer, usually the method in a REST servlet. * @param locale The session locale. - * If <jk>null</jk>, then the locale defined on the context is used. + * If <jk>null</jk>, then the locale defined on the context is used. * @param timeZone The session timezone. - * If <jk>null</jk>, then the timezone defined on the context is used. + * 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>). * @param uriContext The URI context. - * Identifies the current request URI used for resolution of URIs to absolute or root-relative form. + * Identifies the current request URI used for resolution of URIs to absolute or root-relative form. */ - protected RdfSerializerSession(RdfSerializerContext ctx, ObjectMap op, Object output, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) { + protected RdfSerializerSession(RdfSerializerContext ctx, ObjectMap op, Object output, Method javaMethod, + Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) { super(ctx, op, output, javaMethod, locale, timeZone, mediaType, uriContext); ObjectMap jenaSettings = new ObjectMap(); jenaSettings.put("rdfXml.tab", isUseWhitespace() ? 2 : 0); http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfUtils.java ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfUtils.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfUtils.java index 4377e2e..518df2b 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfUtils.java +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfUtils.java @@ -25,8 +25,7 @@ public class RdfUtils { /** * Find the namespace given a list of <ja>@Rdf</ja> and <ja>@RdfSchema</ja> annotations. - * The annotations should be a child-to-parent ordering of annotations found on - * a class or method. + * The annotations should be a child-to-parent ordering of annotations found on a class or method. * * @param rdfs The <code>@Rdf</code> annotations to search. * @param schemas The list of known RDF schemas. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-core-rdf/src/main/java/org/apache/juneau/jena/package.html ---------------------------------------------------------------------- diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/package.html b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/package.html index 2808bd4..522be72 100644 --- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/package.html +++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/package.html @@ -100,26 +100,33 @@ Juneau can serialize and parse instances of any of the following POJO types: </p> <ul class='spaced-list'> - <li>Java primitive objects (e.g. <code>String</code>, <code>Integer</code>, <code>Boolean</code>, <code>Float</code>). - <li>Java collections framework objects (e.g. <code>HashSet</code>, <code>TreeMap</code>) containing anything on this list. + <li>Java primitive objects (e.g. <code>String</code>, <code>Integer</code>, <code>Boolean</code>, + <code>Float</code>). + <li>Java collections framework objects (e.g. <code>HashSet</code>, <code>TreeMap</code>) containing anything on + this list. <li>Multi-dimensional arrays of any type on this list. <li>Java Beans with properties of any type on this list. - <li>Classes with standard transformations to and from <code>Strings</code> (e.g. classes containing <code>toString()</code>, - <code>fromString()</code>, <code>valueOf()</code>, <code>constructor(String)</code>). + <li>Classes with standard transformations to and from <code>Strings</code> (e.g. classes containing + <code>toString()</code>, <code>fromString()</code>, <code>valueOf()</code>, <code>constructor(String)</code>). </ul> <p> - In addition to the types shown above, Juneau includes the ability to define 'swaps' to transform non-standard object and - property types to serializable forms (e.g. to transform <code>Calendars</code> to and from <code>ISO8601</code> strings, - or <code>byte[]</code> arrays to and from base-64 encoded strings).<br> - These can be associated with serializers/parsers, or can be associated with classes or bean properties through type and method annotations. + In addition to the types shown above, Juneau includes the ability to define 'swaps' to transform non-standard + object and property types to serializable forms (e.g. to transform <code>Calendars</code> to and from + <code>ISO8601</code> strings, or <code>byte[]</code> arrays to and from base-64 encoded strings). + <br> + These can be associated with serializers/parsers, or can be associated with classes or bean properties through + type and method annotations. </p> <p> - Refer to <a href='../../../../overview-summary.html#Core.PojoCategories' class='doclink'>POJO Categories</a> for a complete definition of supported POJOs. + Refer to <a href='../../../../overview-summary.html#Core.PojoCategories' class='doclink'>POJO Categories</a> + for a complete definition of supported POJOs. </p> <h6 class='topic'>Prerequisites</h6> <p> - Juneau uses the Jena library for these formats. <br> - The predefined serializers and parsers convert POJOs to and from RDF models and then uses Jena to convert them to and from the various RDF languages. + Juneau uses the Jena library for these formats. + <br> + The predefined serializers and parsers convert POJOs to and from RDF models and then uses Jena to convert + them to and from the various RDF languages. </p> <p> Jena libraries must be provided on the classpath separately if you plan on making use of the RDF support. @@ -140,18 +147,20 @@ <h3 class='topic' onclick='toggle(this)'>1.1 - RDF support overview - example</h3> <div class='topic'> <p> - The example shown here is from the Address Book resource located in the <code>org.apache.juneau.sample.war</code> application. + The example shown here is from the Address Book resource located in the + <code>org.apache.juneau.sample.war</code> application. </p> <p> - The POJO model consists of a <code>List</code> of <code>Person</code> beans, with each <code>Person</code> containing - zero or more <code>Address</code> beans. + The POJO model consists of a <code>List</code> of <code>Person</code> beans, with each <code>Person</code> + containing zero or more <code>Address</code> beans. </p> <p> When you point a browser at <code>/sample/addressBook</code>, the POJO is rendered as HTML: </p> <img class='bordered' src="doc-files/Example_HTML.png"> <p> - By appending <code>?Accept=<i>mediaType</i>&plainText=true</code> to the URL, you can view the data in the various RDF supported formats. + By appending <code>?Accept=<i>mediaType</i>&plainText=true</code> to the URL, you can view the data + in the various RDF supported formats. </p> <h6 class='figure'>RDF/XML</h6> @@ -176,7 +185,8 @@ <h2 class='topic' onclick='toggle(this)'>2 - RdfSerializer class</h2> <div class='topic'> <p> - The {@link org.apache.juneau.jena.RdfSerializer} class is the top-level class for all Jena-based serializers.<br> + The {@link org.apache.juneau.jena.RdfSerializer} class is the top-level class for all Jena-based serializers. + <br> Language-specific serializers are defined as inner subclasses of the <code>RdfSerializer</code> class: </p> <ul> @@ -197,10 +207,12 @@ <li>{@link org.apache.juneau.jena.RdfSerializer#DEFAULT_N3} </ul> <p> - Abbreviated RDF/XML is currently the most widely accepted and readable RDF syntax, so the examples shown here will use that format. + Abbreviated RDF/XML is currently the most widely accepted and readable RDF syntax, so the examples shown here + will use that format. </p> <p> - For brevity, the examples will use public fields instead of getters/setters to reduce the size of the examples.<br> + For brevity, the examples will use public fields instead of getters/setters to reduce the size of the examples. + <br> In the real world, you'll typically want to use standard bean getters and setters. </p> <p> @@ -227,7 +239,8 @@ </p> <p class='bcode'> <jc>// Create a new serializer with readable output.</jc> - RdfSerializer s = <jk>new</jk> RdfSerializerBuilder().xmlabbrev().property(RdfProperties.<jsf>RDF_rdfxml_tab</jsf>, 3).build(); + RdfSerializer s = <jk>new</jk> RdfSerializerBuilder().xmlabbrev() + .property(RdfProperties.<jsf>RDF_rdfxml_tab</jsf>, 3).build(); <jc>// Create our bean.</jc> Person p = <jk>new</jk> Person(1, <js>"John Smith"</js>); @@ -240,7 +253,8 @@ </p> <p class='bcode'> <jc>// Create a new serializer with readable output by cloning an existing serializer.</jc> - RdfSerializer s = RdfSerializer.<jsf>DEFAULT_XMLABBREV</jsf>.builder().property(RdfProperties.<jsf>RDF_rdfxml_tab</jsf>, 3).build(); + RdfSerializer s = RdfSerializer.<jsf>DEFAULT_XMLABBREV</jsf>.builder() + .property(RdfProperties.<jsf>RDF_rdfxml_tab</jsf>, 3).build(); </p> <p> This code produces the following output: @@ -257,9 +271,10 @@ <xt></rdf:RDF></xt> </p> <p> - Notice that we've taken an arbitrary POJO and converted it to RDF.<br> - The Juneau serializers and parsers are designed to work with arbitrary POJOs without requiring - any annotations.<br> + Notice that we've taken an arbitrary POJO and converted it to RDF. + <br> + The Juneau serializers and parsers are designed to work with arbitrary POJOs without requiring any annotations. + <br> That being said, several annotations are provided to customize how POJOs are handled to produce usable RDF. </p> @@ -268,19 +283,24 @@ <h3 class='topic' onclick='toggle(this)'>2.1 - Namespaces</h3> <div class='topic'> <p> - You'll notice in the previous example that Juneau namespaces are used to represent bean property names.<br> + You'll notice in the previous example that Juneau namespaces are used to represent bean property names. + <br> These are used by default when namespaces are not explicitly specified. </p> <p> - The <code>juneau</code> namespace is used for generic names for objects that don't have namespaces associated with them. + The <code>juneau</code> namespace is used for generic names for objects that don't have namespaces + associated with them. </p> <p> - The <code>juneaubp</code> namespace is used on bean properties that don't have namespaces associated with them. + The <code>juneaubp</code> namespace is used on bean properties that don't have namespaces associated with + them. </p> <p> - The easiest way to specify namespaces is through annotations.<br> - In this example, we're going to associate the prefix <code>'per'</code> to our bean class and all - properties of this class.<br> + The easiest way to specify namespaces is through annotations. + <br> + In this example, we're going to associate the prefix <code>'per'</code> to our bean class and all properties + of this class. + <br> We do this by adding the following annotation to our class: </p> <p class='bcode'> @@ -288,8 +308,8 @@ <jk>public class</jk> Person { </p> <p> - In general, the best approach is to define the namespace URIs at the package level using a <code>package-info.java</code> - class, like so: + In general, the best approach is to define the namespace URIs at the package level using a + <code>package-info.java</code> class, like so: </p> <p class='bcode'> <jc>// RDF namespaces used in this package</jc> @@ -306,8 +326,8 @@ <jk>import</jk> org.apache.juneau.xml.annotation.*; </p> <p> - This assigns a default prefix of <js>"ab"</js> for all classes and properties within the project, - and specifies various other prefixes used within this project. + This assigns a default prefix of <js>"ab"</js> for all classes and properties within the project, and + specifies various other prefixes used within this project. </p> <p> Now when we rerun the sample code, we'll get the following: @@ -325,11 +345,13 @@ <xt></rdf:RDF></xt> </p> <p> - Namespace auto-detection ({@link org.apache.juneau.xml.XmlSerializerContext#XML_autoDetectNamespaces}) is enabled - on serializers by default.<br> - This causes the serializer to make a first-pass over the data structure to look for namespaces.<br> - In high-performance environments, you may want to consider disabling auto-detection and providing an explicit list of namespaces to the serializer - to avoid this scanning step. + Namespace auto-detection ({@link org.apache.juneau.xml.XmlSerializerContext#XML_autoDetectNamespaces}) is + enabled on serializers by default. + <br> + This causes the serializer to make a first-pass over the data structure to look for namespaces. + <br> + In high-performance environments, you may want to consider disabling auto-detection and providing an + explicit list of namespaces to the serializer to avoid this scanning step. </p> <p class='bcode'> <jc>// Create a new serializer, but manually specify the namespaces.</jc> @@ -341,7 +363,8 @@ .build(); </p> <p> - This code change will produce the same output as before, but will perform slightly better since it doesn't have to crawl the POJO tree before serializing the result. + This code change will produce the same output as before, but will perform slightly better since it doesn't + have to crawl the POJO tree before serializing the result. </p> </div> @@ -350,14 +373,18 @@ <h3 class='topic' onclick='toggle(this)'>2.2 - URI properties</h3> <div class='topic'> <p> - Bean properties of type <code>java.net.URI</code> or <code>java.net.URL</code> have special meaning to the RDF serializer.<br> + Bean properties of type <code>java.net.URI</code> or <code>java.net.URL</code> have special meaning to the + RDF serializer. + <br> They are interpreted as resource identifiers. </p> <p> - In the following code, we're adding 2 new properties.<br> - The first property is annotated with <ja>@BeanProperty</ja> to identify that this property is the - resource identifier for this bean.<br> - The second unannotated property is interpreted as a reference to another resource. + In the following code, we're adding 2 new properties. + <br> + The first property is annotated with <ja>@BeanProperty</ja> to identify that this property is the resource + identifier for this bean. + <br> + The second un-annotated property is interpreted as a reference to another resource. </p> <p class='bcode'> <jk>public class</jk> Person { @@ -384,7 +411,8 @@ </p> <p class='bcode'> <jc>// Create our bean.</jc> - Person p = <jk>new</jk> Person(1, <js>"John Smith"</js>, <js>"http://sample/addressBook/person/1"</js>, <js>"http://sample/addressBook"</js>); + Person p = <jk>new</jk> Person(1, <js>"John Smith"</js>, <js>"http://sample/addressBook/person/1"</js>, + <js>"http://sample/addressBook"</js>); </p> <p> Now when we run the sample code, we get the following: @@ -404,12 +432,12 @@ </p> <p> The {@link org.apache.juneau.annotation.URI} annotation can also be used on classes and properties - to identify them as URLs when they're not instances of <code>java.net.URI</code> or <code>java.net.URL</code> - (not needed if <code><ja>@Rdf</ja>(beanUri=<jk>true</jk>)</code> is already specified). + to identify them as URLs when they're not instances of <code>java.net.URI</code> or <code>java.net.URL</code> + (not needed if <code><ja>@Rdf</ja>(beanUri=<jk>true</jk>)</code> is already specified). </p> <p> - The following properties would have produced the same output as before. Note that the <ja>@URI</ja> annotation is only needed - on the second property. + The following properties would have produced the same output as before. + Note that the <ja>@URI</ja> annotation is only needed on the second property. </p> <p class='bcode'> <jk>public class</jk> Person { @@ -423,10 +451,12 @@ Also take note of the {@link org.apache.juneau.serializer.SerializerContext#SERIALIZER_uriResolution}, {@link org.apache.juneau.serializer.SerializerContext#SERIALIZER_uriRelativity}, and and {@link org.apache.juneau.serializer.SerializerContext#SERIALIZER_uriContext} - settings that can be specified on the serializer to resolve relative and context-root-relative URIs to fully-qualified URIs. + settings that can be specified on the serializer to resolve relative and context-root-relative URIs to + fully-qualified URIs. </p> <p> - This can be useful if you want to keep the URI authority and context root information out of the bean logic layer. + This can be useful if you want to keep the URI authority and context root information out of the bean logic + layer. </p> <p> The following code produces the same output as before, but the URIs on the beans are relative. @@ -453,20 +483,26 @@ <h3 class='topic' onclick='toggle(this)'>2.3 - @Bean and @BeanProperty annotations</h3> <div class='topic'> <p> - The {@link org.apache.juneau.annotation.Bean} and {@link org.apache.juneau.annotation.BeanProperty} annotations - are used to customize the behavior of beans across the entire framework.<br> - In addition to using them to identify the resource URI for the bean shown above, they have various other uses: + The {@link org.apache.juneau.annotation.Bean} and {@link org.apache.juneau.annotation.BeanProperty} + annotations are used to customize the behavior of beans across the entire framework. + <br> + In addition to using them to identify the resource URI for the bean shown above, they have various other + uses: </p> <ul class='spaced-list'> <li>Hiding bean properties. <li>Specifying the ordering of bean properties. <li>Overriding the names of bean properties. - <li>Associating transforms at both the class and property level (to convert non-serializable POJOs to serializable forms). + <li>Associating transforms at both the class and property level (to convert non-serializable POJOs to + serializable forms). </ul> <p> For example, we now add a <code>birthDate</code> property, and associate a swap with it to transform - it to an ISO8601 date-time string in GMT time.<br> - By default, <code>Calendars</code> are treated as beans by the framework, which is usually not how you want them serialized.<br> + it to an ISO8601 date-time string in GMT time. + <br> + By default, <code>Calendars</code> are treated as beans by the framework, which is usually not how you want + them serialized. + <br> Using swaps, we can convert them to standardized string forms. </p> <p class='bcode'> @@ -477,10 +513,12 @@ ... <jc>// Normal constructor</jc> - <jk>public</jk> Person(<jk>int</jk> id, String name, String uri, String addressBookUri, String birthDate) <jk>throws</jk> Exception { + <jk>public</jk> Person(<jk>int</jk> id, String name, String uri, String addressBookUri, String birthDate) + <jk>throws</jk> Exception { ... <jk>this</jk>.<jf>birthDate</jf> = <jk>new</jk> GregorianCalendar(); - <jk>this</jk>.<jf>birthDate</jf>.setTime(DateFormat.<jsm>getDateInstance</jsm>(DateFormat.<jsf>MEDIUM</jsf>).parse(birthDate)); + <jk>this</jk>.<jf>birthDate</jf>.setTime( + DateFormat.<jsm>getDateInstance</jsm>(DateFormat.<jsf>MEDIUM</jsf>).parse(birthDate)); } } </p> @@ -489,7 +527,8 @@ </p> <p class='bcode'> <jc>// Create our bean.</jc> - Person p = <jk>new</jk> Person(1, <js>"John Smith"</js>, <js>"http://sample/addressBook/person/1"</js>, <js>"http://sample/addressBook"</js>, <js>"Aug 12, 1946"</js>); + Person p = <jk>new</jk> Person(1, <js>"John Smith"</js>, <js>"http://sample/addressBook/person/1"</js>, + <js>"http://sample/addressBook"</js>, <js>"Aug 12, 1946"</js>); </p> <p> Now when we rerun the sample code, we'll get the following: @@ -516,7 +555,8 @@ <h3 class='topic' onclick='toggle(this)'>2.4 - Collections</h3> <div class='topic'> <p> - Collections and arrays are converted to RDF sequences.<br> + Collections and arrays are converted to RDF sequences. + <br> In our example, let's add a list-of-beans property to our sample class: </p> <p class='bcode'> @@ -557,7 +597,8 @@ RdfSerializer s = <jk>new</jk> RdfSerializerBuilder().xmlabbrev().property(RdfProperties.<jsf>RDF_rdfxml_tab</jsf>, 3).build(); <jc>// Create our bean.</jc> - Person p = <jk>new</jk> Person(1, <js>"John Smith"</js>, <js>"http://sample/addressBook/person/1"</js>, <js>"http://sample/addressBook"</js>, <js>"Aug 12, 1946"</js>); + Person p = <jk>new</jk> Person(1, <js>"John Smith"</js>, <js>"http://sample/addressBook/person/1"</js>, + <js>"http://sample/addressBook"</js>, <js>"Aug 12, 1946"</js>); Address a = <jk>new</jk> Address(); a.<jf>uri</jf> = <jk>new</jk> URI(<js>"http://sample/addressBook/address/1"</js>); a.<jf>personUri</jf> = <jk>new</jk> URI(<js>"http://sample/addressBook/person/1"</js>); @@ -610,20 +651,29 @@ <h3 class='topic' onclick='toggle(this)'>2.5 - Root property</h3> <div class='topic'> <p> - For all RDF languages, the POJO objects get broken down into simple triplets.<br> - Unfortunately, for tree-structured data like the POJOs shown above, this causes the root node of the tree to become lost.<br> - There is no easy way to identify that <code>person/1</code> is the root node in our tree once in triplet form, and in - some cases it's impossible. + For all RDF languages, the POJO objects get broken down into simple triplets. + <br> + Unfortunately, for tree-structured data like the POJOs shown above, this causes the root node of the tree + to become lost. + <br> + There is no easy way to identify that <code>person/1</code> is the root node in our tree once in triplet + form, and in some cases it's impossible. </p> <p> - By default, the {@link org.apache.juneau.jena.RdfParser} class handles this by scanning - all the nodes and identifying the nodes without incoming references.<br> - However, this is inefficient, especially for large models.<br> - And in cases where the root node is referenced by another node in the model by URL, it's not possible to locate the root at all. + By default, the {@link org.apache.juneau.jena.RdfParser} class handles this by scanning all the nodes and + identifying the nodes without incoming references. + <br> + However, this is inefficient, especially for large models. + <br> + And in cases where the root node is referenced by another node in the model by URL, it's not possible to + locate the root at all. </p> <p> - To resolve this issue, the property {@link org.apache.juneau.jena.RdfSerializerContext#RDF_addRootProperty} was introduced.<br> - When enabled, this adds a special <code>root</code> attribute to the root node to make it easy to locate by the parser. + To resolve this issue, the property {@link org.apache.juneau.jena.RdfSerializerContext#RDF_addRootProperty} + was introduced. + <br> + When enabled, this adds a special <code>root</code> attribute to the root node to make it easy to locate + by the parser. </p> <p> To enable, set the <jsf>RDF_addRootProperty</jsf> property to <jk>true</jk> on the serializer: @@ -678,8 +728,8 @@ <h3 class='topic' onclick='toggle(this)'>2.6 - Typed literals</h3> <div class='topic'> <p> - XML-Schema datatypes can be added to non-<code>String</code> literals through the {@link org.apache.juneau.jena.RdfSerializerContext#RDF_addLiteralTypes} - setting. + XML-Schema data-types can be added to non-<code>String</code> literals through the + {@link org.apache.juneau.jena.RdfSerializerContext#RDF_addLiteralTypes} setting. </p> <p> To enable, set the <jsf>RDF_addLiteralTypes</jsf> property to <jk>true</jk> on the serializer: @@ -733,19 +783,24 @@ <h3 class='topic' onclick='toggle(this)'>2.7 - Non-tree models and recursion detection</h3> <div class='topic'> <p> - The RDF serializer is designed to be used against tree structures.<br> - It expects that there not be loops in the POJO model (e.g. children with references to parents, etc...).<br> + The RDF serializer is designed to be used against tree structures. + <br> + It expects that there not be loops in the POJO model (e.g. children with references to parents, etc...). + <br> If you try to serialize models with loops, you will usually cause a <code>StackOverflowError</code> to - be thrown (if {@link org.apache.juneau.serializer.SerializerContext#SERIALIZER_maxDepth} is not reached first). + be thrown (if {@link org.apache.juneau.serializer.SerializerContext#SERIALIZER_maxDepth} is not reached + first). </p> <p> If you still want to use the XML serializer on such models, Juneau provides the - {@link org.apache.juneau.serializer.SerializerContext#SERIALIZER_detectRecursions} setting.<br> - It tells the serializer to look for instances of an object in the current branch of the tree and - skip serialization when a duplicate is encountered. + {@link org.apache.juneau.serializer.SerializerContext#SERIALIZER_detectRecursions} setting. + <br> + It tells the serializer to look for instances of an object in the current branch of the tree and skip + serialization when a duplicate is encountered. </p> <p> - Recursion detection introduces a performance penalty of around 20%.<br> + Recursion detection introduces a performance penalty of around 20%. + <br> For this reason the setting is disabled by default. </p> </div> @@ -770,8 +825,10 @@ <h3 class='topic' onclick='toggle(this)'>2.9 - Other notes</h3> <div class='topic'> <ul class='spaced-list'> - <li>Like all other Juneau serializers, the RDF serializer is thread safe and maintains an internal cache of bean classes encountered. - For performance reasons, it's recommended that serializers be reused whenever possible instead of always creating new instances. + <li>Like all other Juneau serializers, the RDF serializer is thread safe and maintains an internal cache of + bean classes encountered. + For performance reasons, it's recommended that serializers be reused whenever possible instead of always + creating new instances. </ul> </div> </div> @@ -782,7 +839,8 @@ <h2 class='topic' onclick='toggle(this)'>3 - RdfParser class</h2> <div class='topic'> <p> - The {@link org.apache.juneau.jena.RdfParser} class is the top-level class for all Jena-based parsers.<br> + The {@link org.apache.juneau.jena.RdfParser} class is the top-level class for all Jena-based parsers. + <br> Language-specific parsers are defined as inner subclasses of the <code>RdfParser</code> class: </p> <ul> @@ -804,7 +862,8 @@ <li>{@link org.apache.juneau.jena.RdfParser#DEFAULT_N3} </ul> <p> - For an example, we will build upon the previous example and parse the generated RDF/XML back into the original bean. + For an example, we will build upon the previous example and parse the generated RDF/XML back into the original + bean. </p> <p class='bcode'> <jc>// Create a new serializer with readable output.</jc> @@ -815,7 +874,8 @@ .build(); <jc>// Create our bean.</jc> - Person p = <jk>new</jk> Person(1, <js>"John Smith"</js>, <js>"http://sample/addressBook/person/1"</js>, <js>"http://sample/addressBook"</js>, <js>"Aug 12, 1946"</js>); + Person p = <jk>new</jk> Person(1, <js>"John Smith"</js>, <js>"http://sample/addressBook/person/1"</js>, + <js>"http://sample/addressBook"</js>, <js>"Aug 12, 1946"</js>); Address a = <jk>new</jk> Address(); a.<jf>uri</jf> = <jk>new</jk> URI(<js>"http://sample/addressBook/address/1"</js>); a.<jf>personUri</jf> = <jk>new</jk> URI(<js>"http://sample/addressBook/person/1"</js>); @@ -868,25 +928,28 @@ <h3 class='topic' onclick='toggle(this)'>3.1 - Parsing into generic POJO models</h3> <div class='topic'> <p> - The RDF parser is not limited to parsing back into the original bean classes.<br> - If the bean classes are not available on the parsing side, the parser can also be used to - parse into a generic model consisting of <code>Maps</code>, <code>Collections</code>, and primitive - objects. + The RDF parser is not limited to parsing back into the original bean classes. + <br> + If the bean classes are not available on the parsing side, the parser can also be used to parse into a + generic model consisting of <code>Maps</code>, <code>Collections</code>, and primitive objects. </p> <p> You can parse into any <code>Map</code> type (e.g. <code>HashMap</code>, <code>TreeMap</code>), but - using {@link org.apache.juneau.ObjectMap} is recommended since it has many convenience methods - for converting values to various types. <br> - The same is true when parsing collections. You can use any Collection (e.g. <code>HashSet</code>, <code>LinkedList</code>) - or array (e.g. <code>Object[]</code>, <code>String[]</code>, <code>String[][]</code>), but using - {@link org.apache.juneau.ObjectList} is recommended. + using {@link org.apache.juneau.ObjectMap} is recommended since it has many convenience methods + for converting values to various types. + <br> + The same is true when parsing collections. You can use any Collection (e.g. <code>HashSet</code>, + <code>LinkedList</code>) or array (e.g. <code>Object[]</code>, <code>String[]</code>, + <code>String[][]</code>), but using {@link org.apache.juneau.ObjectList} is recommended. </p> <p> - When the map or list type is not specified, or is the abstract <code>Map</code>, <code>Collection</code>, or <code>List</code> types, - the parser will use <code>ObjectMap</code> and <code>ObjectList</code> by default. + When the map or list type is not specified, or is the abstract <code>Map</code>, <code>Collection</code>, + or <code>List</code> types, the parser will use <code>ObjectMap</code> and <code>ObjectList</code> by + default. </p> <p> - In the following example, we parse into an <code>ObjectMap</code> and use the convenience methods for performing data conversion on values in the map. + In the following example, we parse into an <code>ObjectMap</code> and use the convenience methods for + performing data conversion on values in the map. </p> <p class='bcode'> <jc>// Parse RDF into a generic POJO model.</jc> @@ -911,25 +974,34 @@ </p> <p> - However, there are caveats when parsing into generic models due to the nature of RDF.<br> + However, there are caveats when parsing into generic models due to the nature of RDF. + <br> Watch out for the following: </p> <ul class='spaced-list'> - <li>The ordering of entries are going to be inconsistent.<br><br> - <li>Bean URIs are always going to be denoted with the key <js>"uri"</js>.<br> - Therefore, you cannot have a bean with a URI property and a separate property named <js>"uri"</js>.<br> - The latter will overwrite the former.<br> + <li>The ordering of entries are going to be inconsistent. + <br><br> + <li>Bean URIs are always going to be denoted with the key <js>"uri"</js>. + <br> + Therefore, you cannot have a bean with a URI property and a separate property named <js>"uri"</js>. + <br> + The latter will overwrite the former. + <br> This isn't a problem when parsing into beans instead of generic POJO models. - <li>All values are strings.<br> + <li>All values are strings. + <br> This normally isn't a problem when using <code>ObjectMap</code> and <code>ObjectList</code> since - various methods are provided for converting to the correct type anyway. - <li>The results may not be what is expected if there are lots of URL reference loops in the RDF model.<br> + various methods are provided for converting to the correct type anyway. + <li>The results may not be what is expected if there are lots of URL reference loops in the RDF model. + <br> As nodes are processed from the root node down through the child nodes, the parser keeps - track of previously processed parent URIs and handles them accordingly.<br> + track of previously processed parent URIs and handles them accordingly. + <br> If it finds that the URI has previously been processed, it handles it as a normal URI string and doesn't - process further.<br> + process further. + <br> However, depending on how complex the reference loops are, the parsed data may end up having the - same data in it, but structured differently from the original POJO. + same data in it, but structured differently from the original POJO. </ul> <p> We can see some of these when we render the <code>ObjectMap</code> back to JSON. @@ -963,7 +1035,8 @@ } </p> <p> - As a general rule, parsing into beans is often more efficient than parsing into generic models.<br> + As a general rule, parsing into beans is often more efficient than parsing into generic models. + <br> And working with beans is often less error prone than working with generic models. </p> </div> @@ -987,8 +1060,10 @@ <h3 class='topic' onclick='toggle(this)'>3.3 - Other notes</h3> <div class='topic'> <ul class='spaced-list'> - <li>Like all other Juneau parsers, the RDF parser is thread safe and maintains an internal cache of bean classes encountered. - For performance reasons, it's recommended that parser be reused whenever possible instead of always creating new instances. + <li>Like all other Juneau parsers, the RDF parser is thread safe and maintains an internal cache of bean + classes encountered. + For performance reasons, it's recommended that parser be reused whenever possible instead of always + creating new instances. </ul> </div> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-examples/.settings/org.eclipse.wst.html.core.prefs ---------------------------------------------------------------------- diff --git a/juneau-examples/.settings/org.eclipse.wst.html.core.prefs b/juneau-examples/.settings/org.eclipse.wst.html.core.prefs new file mode 100644 index 0000000..57fb737 --- /dev/null +++ b/juneau-examples/.settings/org.eclipse.wst.html.core.prefs @@ -0,0 +1,43 @@ +attrDuplicate=2 +attrInvalidName=2 +attrInvalidValue=2 +attrNameMismatch=2 +attrNamesToIgnore= +attrUndefName=2 +attrUndefValue=2 +attrValueEqualsMissing=2 +attrValueMismatch=1 +attrValueUnclosed=2 +cdataInvalidContent=2 +cdataUnclosed=1 +commentInvalidContent=2 +commentUnclosed=1 +docDoctypeUnclosed=1 +docDuplicateTag=1 +docInvalidChar=2 +docInvalidContent=2 +eclipse.preferences.version=1 +elemCoexistence=2 +elemDuplicate=2 +elemEndInvalidCase=1 +elemInvalidContent=2 +elemInvalidDirective=1 +elemInvalidEmptyTag=2 +elemInvalidName=1 +elemInvalidText=2 +elemMissingEnd=2 +elemMissingStart=2 +elemStartInvalidCase=2 +elemUnclosedEndTag=1 +elemUnclosedStartTag=1 +elemUnknownName=2 +elemUnnecessaryEnd=2 +elementNamesToIgnore=jc,jd,jt,jk,js,jf,jsa,jsf,jsm,jss,ja,xt,xa,xc,xs,xv,mk,mv,cc,cs,ck,ce,cv,l,properties,ua,uk,un,us +ignoreAttrNames=false +ignoreElementNames=true +piInvalidContent=2 +piUnclosed=1 +piUndefined=2 +refInvalidContent=2 +resourceNotFound=2 +use-project-settings=true http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-examples/juneau-examples-core/.settings/org.eclipse.wst.html.core.prefs ---------------------------------------------------------------------- diff --git a/juneau-examples/juneau-examples-core/.settings/org.eclipse.wst.html.core.prefs b/juneau-examples/juneau-examples-core/.settings/org.eclipse.wst.html.core.prefs new file mode 100644 index 0000000..57fb737 --- /dev/null +++ b/juneau-examples/juneau-examples-core/.settings/org.eclipse.wst.html.core.prefs @@ -0,0 +1,43 @@ +attrDuplicate=2 +attrInvalidName=2 +attrInvalidValue=2 +attrNameMismatch=2 +attrNamesToIgnore= +attrUndefName=2 +attrUndefValue=2 +attrValueEqualsMissing=2 +attrValueMismatch=1 +attrValueUnclosed=2 +cdataInvalidContent=2 +cdataUnclosed=1 +commentInvalidContent=2 +commentUnclosed=1 +docDoctypeUnclosed=1 +docDuplicateTag=1 +docInvalidChar=2 +docInvalidContent=2 +eclipse.preferences.version=1 +elemCoexistence=2 +elemDuplicate=2 +elemEndInvalidCase=1 +elemInvalidContent=2 +elemInvalidDirective=1 +elemInvalidEmptyTag=2 +elemInvalidName=1 +elemInvalidText=2 +elemMissingEnd=2 +elemMissingStart=2 +elemStartInvalidCase=2 +elemUnclosedEndTag=1 +elemUnclosedStartTag=1 +elemUnknownName=2 +elemUnnecessaryEnd=2 +elementNamesToIgnore=jc,jd,jt,jk,js,jf,jsa,jsf,jsm,jss,ja,xt,xa,xc,xs,xv,mk,mv,cc,cs,ck,ce,cv,l,properties,ua,uk,un,us +ignoreAttrNames=false +ignoreElementNames=true +piInvalidContent=2 +piUnclosed=1 +piUndefined=2 +refInvalidContent=2 +resourceNotFound=2 +use-project-settings=true http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33f89d58/juneau-releng/eclipse-preferences/user-dictionary.txt ---------------------------------------------------------------------- diff --git a/juneau-releng/eclipse-preferences/user-dictionary.txt b/juneau-releng/eclipse-preferences/user-dictionary.txt index d70844a..b24928d 100644 --- a/juneau-releng/eclipse-preferences/user-dictionary.txt +++ b/juneau-releng/eclipse-preferences/user-dictionary.txt @@ -413,3 +413,9 @@ etag throwables callable urlencoding +rdf +xmlbase +doctype +iri +api +juneaubp
