001// ***************************************************************************************************************************
002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file *
003// * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file        *
004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance            *
005// * with the License.  You may obtain a copy of the License at                                                              *
006// *                                                                                                                         *
007// *  http://www.apache.org/licenses/LICENSE-2.0                                                                             *
008// *                                                                                                                         *
009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an  *
010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the        *
011// * specific language governing permissions and limitations under the License.                                              *
012// ***************************************************************************************************************************
013package org.apache.juneau.jena;
014
015import java.util.*;
016
017import org.apache.juneau.jena.annotation.*;
018import org.apache.juneau.utils.*;
019import org.apache.juneau.xml.*;
020import org.apache.juneau.xml.annotation.*;
021
022/**
023 * Configurable properties common to both the {@link RdfSerializer} and {@link RdfParser} classes.
024 */
025public interface RdfCommon {
026
027   /**
028    * Property prefix.
029    */
030   static final String PREFIX = "RdfCommon.";
031
032   /**
033    * Maps RDF writer names to property prefixes that apply to them.
034    */
035   static final Map<String,String> LANG_PROP_MAP = new AMap<String,String>()
036      .append("RDF/XML","rdfXml.")
037      .append("RDF/XML-ABBREV","rdfXml.")
038      .append("N3","n3.")
039      .append("N3-PP","n3.")
040      .append("N3-PLAIN","n3.")
041      .append("N3-TRIPLES","n3.")
042      .append("TURTLE","n3.")
043      .append("N-TRIPLE","ntriple.");
044
045   /**
046    * Configuration property:  RDF language.
047    *
048    * <h5 class='section'>Property:</h5>
049    * <ul>
050    *    <li><b>Name:</b>  <js>"Rdf.language.s"</js>
051    *    <li><b>Data type:</b>  <code>String</code>
052    *    <li><b>Default:</b>  <js>"RDF/XML-ABBREV"</js>
053    *    <li><b>Methods:</b>
054    *       <ul>
055    *          <li class='jm'>{@link RdfSerializerBuilder#language(String)}
056    *          <li class='jm'>{@link RdfSerializerBuilder#n3()}
057    *          <li class='jm'>{@link RdfSerializerBuilder#ntriple()}
058    *          <li class='jm'>{@link RdfSerializerBuilder#turtle()}
059    *          <li class='jm'>{@link RdfSerializerBuilder#xml()}
060    *          <li class='jm'>{@link RdfSerializerBuilder#xmlabbrev()}
061    *          <li class='jm'>{@link RdfParserBuilder#language(String)}
062    *          <li class='jm'>{@link RdfParserBuilder#n3()}
063    *          <li class='jm'>{@link RdfParserBuilder#ntriple()}
064    *          <li class='jm'>{@link RdfParserBuilder#turtle()}
065    *          <li class='jm'>{@link RdfParserBuilder#xml()}
066    *       </ul>
067    * </ul>
068    *
069    * <h5 class='section'>Description:</h5>
070    * <p>
071    *    The RDF language to use.
072    * <p>
073    * Can be any of the following:
074    * <ul class='spaced-list'>
075    *    <li>
076    *       <js>"RDF/XML"</js>
077    *    <li>
078    *       <js>"RDF/XML-ABBREV"</js> (default)
079    *    <li>
080    *       <js>"N-TRIPLE"</js>
081    *    <li>
082    *       <js>"N3"</js> - General name for the N3 writer.
083    *       Will make a decision on exactly which writer to use (pretty writer, plain writer or simple writer) when
084    *       created.
085    *       Default is the pretty writer but can be overridden with system property
086    *       <code>com.hp.hpl.jena.n3.N3JenaWriter.writer</code>.
087    *    <li>
088    *       <js>"N3-PP"</js> - Name of the N3 pretty writer.
089    *       The pretty writer uses a frame-like layout, with prefixing, clustering like properties and embedding
090    *       one-referenced bNodes.
091    *    <li>
092    *       <js>"N3-PLAIN"</js> - Name of the N3 plain writer.
093    *       The plain writer writes records by subject.
094    *    <li>
095    *       <js>"N3-TRIPLES"</js> - Name of the N3 triples writer.
096    *       This writer writes one line per statement, like N-Triples, but does N3-style prefixing.
097    *    <li>
098    *       <js>"TURTLE"</js> -  Turtle writer.
099    *       http://www.dajobe.org/2004/01/turtle/
100    * </ul>
101    */
102   public static final String RDF_language = PREFIX + "language.s";
103
104   /**
105    * Configuration property:  XML namespace for Juneau properties.
106    *
107    * <h5 class='section'>Property:</h5>
108    * <ul>
109    *    <li><b>Name:</b>  <js>"Rdf.juneauNs.s"</js>
110    *    <li><b>Data type:</b>  {@link Namespace}
111    *    <li><b>Default:</b>  <code>{j:<js>'http://www.apache.org/juneau/'</js>}</code>
112    *    <li><b>Methods:</b>
113    *       <ul>
114    *          <li class='jm'>{@link RdfSerializerBuilder#juneauNs(Namespace)}
115    *          <li class='jm'>{@link RdfParserBuilder#juneauNs(Namespace)}
116    *       </ul>
117    * </ul>
118    */
119   public static final String RDF_juneauNs = PREFIX + "juneauNs.s";
120
121   /**
122    * Configuration property:  Default XML namespace for bean properties.
123    *
124    * <h5 class='section'>Property:</h5>
125    * <ul>
126    *    <li><b>Name:</b>  <js>"Rdf.juneauBpNs.s"</js>
127    *    <li><b>Data type:</b>  {@link Namespace}
128    *    <li><b>Default:</b>  <code>{j:<js>'http://www.apache.org/juneaubp/'</js>}</code>
129    *    <li><b>Methods:</b>
130    *       <ul>
131    *          <li class='jm'>{@link RdfSerializerBuilder#juneauBpNs(Namespace)}
132    *          <li class='jm'>{@link RdfParserBuilder#juneauBpNs(Namespace)}
133    *       </ul>
134    * </ul>
135    */
136   public static final String RDF_juneauBpNs = PREFIX + "juneauBpNs.s";
137
138   /**
139    * Configuration property:  Reuse XML namespaces when RDF namespaces not specified.
140    *
141    * <h5 class='section'>Property:</h5>
142    * <ul>
143    *    <li><b>Name:</b>  <js>"Rdf.useXmlNamespaces.b"</js>
144    *    <li><b>Data type:</b>  <code>Boolean</code>
145    *    <li><b>Default:</b>  <jk>true</jk>
146    *    <li><b>Methods:</b>
147    *       <ul>
148    *          <li class='jm'>{@link RdfSerializerBuilder#useXmlNamespaces(boolean)}
149    *          <li class='jm'>{@link RdfParserBuilder#useXmlNamespaces(boolean)}
150    *       </ul>
151    * </ul>
152    *
153    * <h5 class='section'>Description:</h5>
154    * <p>
155    * When specified, namespaces defined using {@link XmlNs @XmlNs} and {@link Xml @Xml} will be inherited by the RDF serializers.
156    * <br>Otherwise, namespaces will be defined using {@link RdfNs @RdfNs} and {@link Rdf @Rdf}.
157    */
158   public static final String RDF_useXmlNamespaces = PREFIX + "useXmlNamespaces.b";
159
160   /**
161    * Configuration property:  RDF/XML property: <code>iri_rules</code>.
162    *
163    * <h5 class='section'>Property:</h5>
164    * <ul>
165    *    <li><b>Name:</b>  <js>"Rdf.jena.rdfXml.iri-rules.s"</js>
166    *    <li><b>Data type:</b>  <code>String</code>
167    *    <li><b>Default:</b>  <js>"lax"</js>
168    * </ul>
169    *
170    * <h5 class='section'>Description:</h5>
171    * <p>
172    * Set the engine for checking and resolving.
173    *
174    * <p>
175    * Possible values:
176    * <ul class='spaced-list'>
177    *    <li>
178    *       <js>"lax"</js> - The rules for RDF URI references only, which does permit spaces although the use of spaces
179    *       is not good practice.
180    *    <li>
181    *       <js>"strict"</js> - Sets the IRI engine with rules for valid IRIs, XLink and RDF; it does not permit spaces
182    *       in IRIs.
183    *    <li>
184    *       <js>"iri"</js> - Sets the IRI engine to IRI
185    *       ({@doc http://www.ietf.org/rfc/rfc3986.txt RFC 3986},
186    *       {@doc http://www.ietf.org/rfc/rfc3987.txt RFC 3987}).
187    * </ul>
188    */
189   public static final String RDF_arp_iriRules = PREFIX + "jena.rdfXml.iri-rules.s";
190
191   /**
192    * Configuration property:  RDF/XML ARP property: <code>error-mode</code>.
193    *
194    * <h5 class='section'>Property:</h5>
195    * <ul>
196    *    <li><b>Name:</b>  <js>"Rdf.jena.rdfXml.error-mode.s"</js>
197    *    <li><b>Data type:</b>  <code>String</code>
198    *    <li><b>Default:</b>  <js>"lax"</js>
199    * </ul>
200    *
201    * <h5 class='section'>Description:</h5>
202    * <p>
203    * This allows a coarse-grained approach to control of error handling.
204    *
205    * <p>
206    * Possible values:
207    * <ul>
208    *    <li><js>"default"</js>
209    *    <li><js>"lax"</js>
210    *    <li><js>"strict"</js>
211    *    <li><js>"strict-ignore"</js>
212    *    <li><js>"strict-warning"</js>
213    *    <li><js>"strict-error"</js>
214    *    <li><js>"strict-fatal"</js>
215    * </ul>
216    *
217    * <p>
218    * See also:
219    * <ul class='spaced-list'>
220    *    <li>
221    *       {@doc ARP/ARPOptions.html#setDefaultErrorMode() ARPOptions.setDefaultErrorMode()}
222    *    <li>
223    *       {@doc ARP/ARPOptions.html#setLaxErrorMode() ARPOptions.setLaxErrorMode()}
224    *    <li>
225    *       {@doc ARP/ARPOptions.html#setStrictErrorMode() ARPOptions.setStrictErrorMode()}
226    *    <li>
227    *       {@doc ARP/ARPOptions.html#setStrictErrorMode(int) ARPOptions.setStrictErrorMode(int)}
228    * </ul>
229    */
230   public static final String RDF_arp_errorMode = PREFIX + "jena.rdfXml.error-mode.s";
231
232   /**
233    * Configuration property:  RDF/XML ARP property: <code>embedding</code>.
234    *
235    * <h5 class='section'>Property:</h5>
236    * <ul>
237    *    <li><b>Name:</b>  <js>"Rdf.jena.rdfXml.embedding.b"</js>
238    *    <li><b>Data type:</b>  <code>Boolean</code>
239    *    <li><b>Default:</b>  <jk>false</jk>
240    * </ul>
241    *
242    * <h5 class='section'>Description:</h5>
243    * <p>
244    * Sets ARP to look for RDF embedded within an enclosing XML document.
245    *
246    * <p>
247    * See also:
248    * <ul class='spaced-list'>
249    *    <li>
250    *       {@doc ARP/ARPOptions.html#setEmbedding(boolean) ARPOptions.setEmbedding(boolean)}
251    * </ul>
252    */
253   public static final String RDF_arp_embedding = PREFIX + "jena.rdfXml.embedding.b";
254
255   /**
256    * Configuration property:  RDF/XML ARP property: <code>ERR_xxx</code>.
257    *
258    * <h5 class='section'>Property:</h5>
259    * <ul>
260    *    <li><b>Name:</b>  <js>"Rdf.jena.rdfXml.ERR_"</js>
261    *    <li><b>Data type:</b>  <code>String</code>
262    * </ul>
263    *
264    * <h5 class='section'>Description:</h5>
265    * <p>
266    * Provides fine-grained control over detected error conditions.
267    *
268    * <p>
269    * Possible values:
270    * <ul>
271    *    <li><js>"EM_IGNORE"</js>
272    *    <li><js>"EM_WARNING"</js>
273    *    <li><js>"EM_ERROR"</js>
274    *    <li><js>"EM_FATAL"</js>
275    * </ul>
276    *
277    * <p>
278    * See also:
279    * <ul class='spaced-list'>
280    *    <li>
281    *       {@doc ARP/ARPErrorNumbers.html ARPErrorNumbers}
282    *    <li>
283    *       {@doc ARP/ARPOptions.html#setErrorMode(int,%20int) ARPOptions.setErrorMode(int, int)}
284    * </ul>
285    */
286   public static final String RDF_arp_err_ = PREFIX + "jena.rdfXml.ERR_";
287
288   /**
289    * Configuration property:  RDF/XML ARP property: <code>WARN_xxx</code>.
290    *
291    * <h5 class='section'>Property:</h5>
292    * <ul>
293    *    <li><b>Name:</b>  <js>"Rdf.jena.rdfXml.WARN_"</js>
294    *    <li><b>Data type:</b>  <code>String</code>
295    * </ul>
296    *
297    * <h5 class='section'>Description:</h5>
298    * <p>
299    * See {@link #RDF_arp_err_} for details.
300    */
301   public static final String RDF_arp_warn_ = PREFIX + "jena.rdfXml.WARN_";
302
303   /**
304    * RDF/XML ARP property: <code>IGN_xxx</code>.
305    *
306    * <h5 class='section'>Property:</h5>
307    * <ul>
308    *    <li><b>Name:</b>  <js>"Rdf.jena.rdfXml.IGN_"</js>
309    *    <li><b>Data type:</b>  <code>String</code>
310    * </ul>
311    *
312    * <h5 class='section'>Description:</h5>
313    * <p>
314    * See {@link #RDF_arp_err_} for details.
315    */
316   public static final String RDF_arp_ign_ = PREFIX + "jena.rdfXml.IGN_";
317
318   /**
319    * Configuration property:  RDF/XML property: <code>xmlbase</code>.
320    *
321    * <h5 class='section'>Property:</h5>
322    * <ul>
323    *    <li><b>Name:</b>  <js>"Rdf.jena.rdfXml.xmlbase.s"</js>
324    *    <li><b>Data type:</b>  <code>String</code>
325    *    <li><b>Default:</b>  <jk>null</jk>
326    * </ul>
327    *
328    * <h5 class='section'>Description:</h5>
329    * <p>
330    * The value to be included for an <xa>xml:base</xa> attribute on the root element in the file.
331    */
332   public static final String RDF_rdfxml_xmlBase = PREFIX + "jena.rdfXml.xmlbase.s";
333
334   /**
335    * Configuration property:  RDF/XML property: <code>longId</code>.
336    *
337    * <h5 class='section'>Property:</h5>
338    * <ul>
339    *    <li><b>Name:</b>  <js>"Rdf.jena.rdfXml.longId.b"</js>
340    *    <li><b>Data type:</b>  <code>Boolean</code>
341    *    <li><b>Default:</b>  <jk>false</jk>
342    * </ul>
343    *
344    * <h5 class='section'>Description:</h5>
345    * <p>
346    * Whether to use long ID's for anon resources.
347    * Short ID's are easier to read, but can run out of memory on very large models.
348    */
349   public static final String RDF_rdfxml_longId = PREFIX + "jena.rdfXml.longId.b";
350
351   /**
352    * Configuration property:  RDF/XML property: <code>allowBadURIs</code>.
353    *
354    * <h5 class='section'>Property:</h5>
355    * <ul>
356    *    <li><b>Name:</b>  <js>"Rdf.jena.rdfXml.allowBadURIs.b"</js>
357    *    <li><b>Data type:</b>  <code>Boolean</code>
358    *    <li><b>Default:</b>  <jk>false</jk>
359    * </ul>
360    *
361    * <h5 class='section'>Description:</h5>
362    * <p>
363    * URIs in the graph are, by default, checked prior to serialization.
364    */
365   public static final String RDF_rdfxml_allowBadUris = PREFIX + "jena.rdfXml.allowBadURIs.b";
366
367   /**
368    * Configuration property:  RDF/XML property: <code>relativeURIs</code>.
369    *
370    * <h5 class='section'>Property:</h5>
371    * <ul>
372    *    <li><b>Name:</b>  <js>"Rdf.jena.rdfXml.relativeURIs.s"</js>
373    *    <li><b>Data type:</b>  <code>String</code>
374    *    <li><b>Default:</b>  <js>"same-document, absolute, relative, parent"</js>
375    * </ul>
376    *
377    * <h5 class='section'>Description:</h5>
378    * <p>
379    * What sort of relative URIs should be used.
380    *
381    * <p>
382    * A comma separate list of options:
383    * <ul class='spaced-list'>
384    *    <li>
385    *       <js>"same-document"</js> - Same-document references (e.g. <js>""</js> or <js>"#foo"</js>)
386    *    <li>
387    *       <js>"network"</js>  - Network paths (e.g. <js>"//example.org/foo"</js> omitting the URI scheme)
388    *    <li>
389    *       <js>"absolute"</js> - Absolute paths (e.g. <js>"/foo"</js> omitting the scheme and authority)
390    *    <li>
391    *       <js>"relative"</js> - Relative path not beginning in <js>"../"</js>
392    *    <li>
393    *       <js>"parent"</js> - Relative path beginning in <js>"../"</js>
394    *    <li>
395    *       <js>"grandparent"</js> - Relative path beginning in <js>"../../"</js>
396    * </ul>
397    *
398    * <p>
399    * The default value is <js>"same-document, absolute, relative, parent"</js>.
400    * To switch off relative URIs use the value <js>""</js>.
401    * Relative URIs of any of these types are output where possible if and only if the option has been specified.
402    */
403   public static final String RDF_rdfxml_relativeUris = PREFIX + "jena.rdfXml.relativeURIs.s";
404
405   /**
406    * Configuration property:  RDF/XML property: <code>showXmlDeclaration</code>.
407    *
408    * <h5 class='section'>Property:</h5>
409    * <ul>
410    *    <li><b>Name:</b>  <js>"Rdf.jena.rdfXml.showXmlDeclaration.s"</js>
411    *    <li><b>Data type:</b>  <code>String</code>
412    *    <li><b>Default:</b>  <js>"default"</js>
413    * </ul>
414    *
415    * <h5 class='section'>Description:</h5>
416    * <p>
417    * Possible values:
418    * <ul class='spaced-list'>
419    *    <li>
420    *       <js>"true"</js> - Add XML Declaration to the output.
421    *    <li>
422    *       <js>"false"</js> - Don't add XML Declaration to the output.
423    *    <li>
424    *       <js>"default"</js> - Only add an XML Declaration when asked to write to an <code>OutputStreamWriter</code>
425    *       that uses some encoding other than <code>UTF-8</code> or <code>UTF-16</code>.
426    *       In this case the encoding is shown in the XML declaration.
427    * </ul>
428    */
429   public static final String RDF_rdfxml_showXmlDeclaration = PREFIX + "jena.rdfXml.showXmlDeclaration.s";
430
431   /**
432    * Configuration property:  RDF/XML property: <code>showDoctypeDeclaration</code>.
433    *
434    * <h5 class='section'>Property:</h5>
435    * <ul>
436    *    <li><b>Name:</b>  <js>"Rdf.jena.rdfXml.showDoctypeDeclaration.b"</js>
437    *    <li><b>Data type:</b>  <code>Boolean</code>
438    *    <li><b>Default:</b>  <jk>true</jk>
439    * </ul>
440    *
441    * <h5 class='section'>Description:</h5>
442    * <p>
443    * If true, an XML doctype declaration is included in the output.
444    * This declaration includes a <code>!ENTITY</code> declaration for each prefix mapping in the model, and any
445    * attribute value that starts with the URI of that mapping is written as starting with the corresponding entity
446    * invocation.
447    */
448   public static final String RDF_rdfxml_showDoctypeDeclaration = PREFIX + "jena.rdfXml.showDoctypeDeclaration.b";
449
450   /**
451    * Configuration property:  RDF/XML property: <code>tab</code>.
452    *
453    * <h5 class='section'>Property:</h5>
454    * <ul>
455    *    <li><b>Name:</b>  <js>"Rdf.jena.rdfXml.tab.i"</js>
456    *    <li><b>Data type:</b>  <code>Integer</code>
457    *    <li><b>Default:</b>  <code>2</code>
458    * </ul>
459    *
460    * <h5 class='section'>Description:</h5>
461    * <p>
462    * The number of spaces with which to indent XML child elements.
463    */
464   public static final String RDF_rdfxml_tab = PREFIX + "jena.rdfXml.tab.i";
465
466   /**
467    * Configuration property:  RDF/XML property: <code>attributeQuoteChar</code>.
468    *
469    * <h5 class='section'>Property:</h5>
470    * <ul>
471    *    <li><b>Name:</b>  <js>"Rdf.jena.rdfXml.attributeQuoteChar.s"</js>
472    *    <li><b>Data type:</b>  <code>Character</code>
473    *    <li><b>Default:</b>  <js>'"'</js>
474    * </ul>
475    *
476    * <h5 class='section'>Description:</h5>
477    * <p>
478    * The XML attribute quote character.
479    */
480   public static final String RDF_rdfxml_attributeQuoteChar = PREFIX + "jena.rdfXml.attributeQuoteChar.s";
481
482   /**
483    * Configuration property:  RDF/XML property: <code>blockRules</code>.
484    *
485    * <h5 class='section'>Property:</h5>
486    * <ul>
487    *    <li><b>Name:</b>  <js>"Rdf.jena.rdfXml.blockRules.s"</js>
488    *    <li><b>Data type:</b>  <code>String</code>
489    *    <li><b>Default:</b>  <js>""</js>
490    * </ul>
491    *
492    * <h5 class='section'>Description:</h5>
493    * <p>
494    * A list of <code>Resource</code> or a <code>String</code> being a comma separated list of fragment IDs from
495    * <{@doc http://www.w3.org/TR/rdf-syntax-grammar RDF Syntax Grammar} indicating grammar
496    * rules that will not be used.
497    */
498   public static final String RDF_rdfxml_blockRules = PREFIX + "jena.rdfXml.blockRules.s";
499
500   /**
501    * Configuration property:  N3/Turtle property: <code>minGap</code>.
502    *
503    * <h5 class='section'>Property:</h5>
504    * <ul>
505    *    <li><b>Name:</b>  <js>"Rdf.jena.n3.minGap.i"</js>
506    *    <li><b>Data type:</b>  <code>Integer</code>
507    *    <li><b>Default:</b>  <code>1</code>
508    * </ul>
509    *
510    * <h5 class='section'>Description:</h5>
511    * <p>
512    * Minimum gap between items on a line.
513    */
514   public static final String RDF_n3_minGap = PREFIX + "jena.n3.minGap.i";
515
516   /**
517    * Configuration property:  N3/Turtle property: <code>objectLists</code>.
518    *
519    * <h5 class='section'>Property:</h5>
520    * <ul>
521    *    <li><b>Name:</b>  <js>"Rdf.jena.n3.objectLists.b"</js>
522    *    <li><b>Data type:</b>  <code>Boolean</code>
523    *    <li><b>Default:</b>  <jk>true</jk>
524    * </ul>
525    *
526    * <h5 class='section'>Description:</h5>
527    * <p>
528    * Print object lists as comma separated lists.
529    */
530   public static final String RDF_n3_objectLists = PREFIX + "jena.n3.objectLists.b";
531
532   /**
533    * Configuration property:  N3/Turtle property: <code>subjectColumn</code>.
534    *
535    * <h5 class='section'>Property:</h5>
536    * <ul>
537    *    <li><b>Name:</b>  <js>"Rdf.jena.n3.subjectColumn.i"</js>
538    *    <li><b>Data type:</b>  <code>Integer</code>
539    *    <li><b>Default:</b>  indentProperty
540    * </ul>
541    *
542    * <h5 class='section'>Description:</h5>
543    * <p>
544    * If the subject is shorter than this value, the first property may go on the same line.
545    */
546   public static final String RDF_n3_subjectColumn = PREFIX + "jena.n3.subjectColumn.i";
547
548   /**
549    * Configuration property:  N3/Turtle property: <code>propertyColumn</code>.
550    *
551    * <h5 class='section'>Property:</h5>
552    * <ul>
553    *    <li><b>Name:</b>  <js>"Rdf.jena.n3.propertyColumn.i"</js>
554    *    <li><b>Data type:</b>  <code>Integer</code>
555    *    <li><b>Default:</b>  <code>8</code>
556    * </ul>
557    *
558    * <h5 class='section'>Description:</h5>
559    * <p>
560    * Width of the property column.
561    */
562   public static final String RDF_n3_propertyColumn = PREFIX + "jena.n3.propertyColumn.i";
563
564   /**
565    * Configuration property:  N3/Turtle property: <code>indentProperty</code>.
566    *
567    * <h5 class='section'>Property:</h5>
568    * <ul>
569    *    <li><b>Name:</b>  <js>"Rdf.jena.n3.indentProperty.i"</js>
570    *    <li><b>Data type:</b>  <code>Integer</code>
571    *    <li><b>Default:</b>  <code>6</code>
572    * </ul>
573    *
574    * <h5 class='section'>Description:</h5>
575    * <p>
576    * Width to indent properties.
577    */
578   public static final String RDF_n3_indentProperty = PREFIX + "jena.n3.indentProperty.i";
579
580   /**
581    * Configuration property:  N3/Turtle property: <code>widePropertyLen</code>.
582    *
583    * <h5 class='section'>Property:</h5>
584    * <ul>
585    *    <li><b>Name:</b>  <js>"Rdf.jena.n3.widePropertyLen.i"</js>
586    *    <li><b>Data type:</b>  <code>Integer</code>
587    *    <li><b>Default:</b>  <code>20</code>
588    * </ul>
589    *
590    * <h5 class='section'>Description:</h5>
591    * <p>
592    * Width of the property column.
593    * Must be longer than <code>propertyColumn</code>.
594    */
595   public static final String RDF_n3_widePropertyLen = PREFIX + "jena.n3.widePropertyLen.i";
596
597   /**
598    * Configuration property:  N3/Turtle property: <code>abbrevBaseURI</code>.
599    *
600    * <h5 class='section'>Property:</h5>
601    * <ul>
602    *    <li><b>Name:</b>  <js>"Rdf.jena.n3.abbrevBaseURI.b"</js>
603    *    <li><b>Data type:</b>  <code>Boolean</code>
604    *    <li><b>Default:</b>  <jk>true</jk>
605    * </ul>
606    *
607    * <h5 class='section'>Description:</h5>
608    * <p>
609    * Control whether to use abbreviations <code>&lt;&gt;</code> or <code>&lt;#&gt;</code>.
610    */
611   public static final String RDF_n3_abbrevBaseUri = PREFIX + "jena.n3.abbrevBaseURI.b";
612
613   /**
614    * Configuration property:  N3/Turtle property: <code>usePropertySymbols</code>.
615    *
616    * <h5 class='section'>Property:</h5>
617    * <ul>
618    *    <li><b>Name:</b>  <js>"Rdf.jena.n3.usePropertySymbols.b"</js>
619    *    <li><b>Data type:</b>  <code>Boolean</code>
620    *    <li><b>Default:</b>  <jk>true</jk>
621    * </ul>
622    *
623    * <h5 class='section'>Description:</h5>
624    * <p>
625    * Control whether to use <code>a</code>, <code>=</code> and <code>=&gt;</code> in output
626    */
627   public static final String RDF_n3_usePropertySymbols = PREFIX + "jena.n3.usePropertySymbols.b";
628
629   /**
630    * Configuration property:  N3/Turtle property: <code>useTripleQuotedStrings</code>.
631    *
632    * <h5 class='section'>Property:</h5>
633    * <ul>
634    *    <li><b>Name:</b>  <js>"Rdf.jena.n3.useTripleQuotedStrings.b"</js>
635    *    <li><b>Data type:</b>  <code>Boolean</code>
636    *    <li><b>Default:</b>  <jk>true</jk>
637    * </ul>
638    *
639    * <h5 class='section'>Description:</h5>
640    * <p>
641    * Allow the use of <code>"""</code> to delimit long strings.
642    */
643   public static final String RDF_n3_useTripleQuotedStrings = PREFIX + "jena.n3.useTripleQuotedStrings.b";
644
645   /**
646    * Configuration property:  N3/Turtle property: <code>useDoubles</code>.
647    *
648    * <h5 class='section'>Property:</h5>
649    * <ul>
650    *    <li><b>Name:</b>  <js>"Rdf.jena.n3.useDoubles.b"</js>
651    *    <li><b>Data type:</b>  <code>Boolean</code>
652    *    <li><b>Default:</b>  <jk>true</jk>
653    * </ul>
654    *
655    * <h5 class='section'>Description:</h5>
656    * <p>
657    * Allow the use doubles as <code>123.456</code>.
658    */
659   public static final String RDF_n3_useDoubles = PREFIX + "jena.n3.useDoubles.b";
660
661   /**
662    * Configuration property:  RDF format for representing collections and arrays.
663    *
664    * <h5 class='section'>Property:</h5>
665    * <ul>
666    *    <li><b>Name:</b>  <js>"Rdf.collectionFormat.s"</js>
667    *    <li><b>Data type:</b>  <code>String</code>
668    *    <li><b>Default:</b>  <js>"DEFAULT"</js>
669    *    <li><b>Methods:</b>
670    *       <ul>
671    *          <li class='jm'>{@link RdfSerializerBuilder#collectionFormat(RdfCollectionFormat)}
672    *          <li class='jm'>{@link RdfParserBuilder#collectionFormat(RdfCollectionFormat)}
673    *       </ul>
674    * </ul>
675    *
676    * <h5 class='section'>Description:</h5>
677    * <p>
678    * Possible values:
679    * <ul class='spaced-list'>
680    *    <li>
681    *       <js>"DEFAULT"</js> - Default format.  The default is an RDF Sequence container.
682    *    <li>
683    *       <js>"SEQ"</js> - RDF Sequence container.
684    *    <li>
685    *       <js>"BAG"</js> - RDF Bag container.
686    *    <li>
687    *       <js>"LIST"</js> - RDF List container.
688    *    <li>
689    *       <js>"MULTI_VALUED"</js> - Multi-valued properties.
690    * </ul>
691    *
692    * <h5 class='section'>Notes:</h5>
693    * <ul class='spaced-list'>
694    *    <li>
695    *       If you use <js>"BAG"</js> or <js>"MULTI_VALUED"</js>, the order of the elements in the collection will get
696    *       lost.
697    * </ul>
698    */
699   public static final String RDF_collectionFormat = PREFIX + "collectionFormat.s";
700
701   /**
702    * Configuration property:  Collections should be serialized and parsed as loose collections.
703    *
704    * <h5 class='section'>Property:</h5>
705    * <ul>
706    *    <li><b>Name:</b>  <js>"Rdf.looseCollections.b"</js>
707    *    <li><b>Data type:</b>  <code>Boolean</code>
708    *    <li><b>Default:</b>  <jk>false</jk>
709    *    <li><b>Methods:</b>
710    *       <ul>
711    *          <li class='jm'>{@link RdfSerializerBuilder#looseCollections(boolean)}
712    *          <li class='jm'>{@link RdfSerializerBuilder#looseCollections()}
713    *          <li class='jm'>{@link RdfParserBuilder#looseCollections(boolean)}
714    *          <li class='jm'>{@link RdfParserBuilder#looseCollections()}
715    *       </ul>
716    * </ul>
717    *
718    * <h5 class='section'>Description:</h5>
719    * <p>
720    * When specified, collections of resources are handled as loose collections of resources in RDF instead of
721    * resources that are children of an RDF collection (e.g. Sequence, Bag).
722    *
723    * <p>
724    * Note that this setting is specialized for RDF syntax, and is incompatible with the concept of
725    * losslessly representing POJO models, since the tree structure of these POJO models are lost
726    * when serialized as loose collections.
727    *
728    * <p>
729    * This setting is typically only useful if the beans being parsed into do not have a bean property
730    * annotated with {@link Rdf#beanUri @Rdf(beanUri=true)}.
731    *
732    * <h5 class='section'>Example:</h5>
733    * <p class='bcode w800'>
734    *    WriterSerializer s = RdfSerializer.<jsm>create</jsm>().xmlabbrev().looseCollections(<jk>true</jk>).build();
735    *    ReaderParser p = RdfParser.<jsm>create</jsm>().xml().looseCollections(<jk>true</jk>).build();
736    *
737    *    List&lt;MyBean&gt; l = createListOfMyBeans();
738    *
739    *    <jc>// Serialize to RDF/XML as loose resources</jc>
740    *    String rdfXml = s.serialize(l);
741    *
742    *    <jc>// Parse back into a Java collection</jc>
743    *    l = p.parse(rdfXml, LinkedList.<jk>class</jk>, MyBean.<jk>class</jk>);
744    *
745    *    MyBean[] b = createArrayOfMyBeans();
746    *
747    *    <jc>// Serialize to RDF/XML as loose resources</jc>
748    *    String rdfXml = s.serialize(b);
749    *
750    *    <jc>// Parse back into a bean array</jc>
751    *    b = p.parse(rdfXml, MyBean[].<jk>class</jk>);
752    * </p>
753    */
754   public static final String RDF_looseCollections = PREFIX + "looseCollections.b";
755}