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.annotation; 014 015import static java.lang.annotation.ElementType.*; 016import static java.lang.annotation.RetentionPolicy.*; 017 018import java.lang.annotation.*; 019 020import org.apache.juneau.annotation.*; 021import org.apache.juneau.jena.*; 022import org.apache.juneau.serializer.*; 023import org.apache.juneau.xml.*; 024import org.apache.juneau.xml.annotation.*; 025 026/** 027 * Annotation for specifying config properties defined in {@link XmlSerializer}, {@link XmlDocSerializer}, and {@link XmlParser}. 028 * 029 * <p> 030 * Used primarily for specifying bean configuration properties on REST classes and methods. 031 */ 032@Documented 033@Target({TYPE,METHOD}) 034@Retention(RUNTIME) 035@Inherited 036@PropertyStoreApply(RdfConfigApply.class) 037public @interface RdfConfig { 038 039 //------------------------------------------------------------------------------------------------------------------- 040 // RdfCommon 041 //------------------------------------------------------------------------------------------------------------------- 042 043 /** 044 * Configuration property: RDF language. 045 * 046 * <p> 047 * The RDF language to use. 048 * 049 * <ul class='notes'> 050 * <li> 051 * Possible values: 052 * <ul class='spaced-list'> 053 * <li> 054 * <js>"RDF/XML"</js> 055 * <li> 056 * <js>"RDF/XML-ABBREV"</js> (default) 057 * <li> 058 * <js>"N-TRIPLE"</js> 059 * <li> 060 * <js>"N3"</js> - General name for the N3 writer. 061 * Will make a decision on exactly which writer to use (pretty writer, plain writer or simple writer) when 062 * created. 063 * Default is the pretty writer but can be overridden with system property 064 * <c>org.apache.jena.n3.N3JenaWriter.writer</c>. 065 * <li> 066 * <js>"N3-PP"</js> - Name of the N3 pretty writer. 067 * The pretty writer uses a frame-like layout, with prefixing, clustering like properties and embedding 068 * one-referenced bNodes. 069 * <li> 070 * <js>"N3-PLAIN"</js> - Name of the N3 plain writer. 071 * The plain writer writes records by subject. 072 * <li> 073 * <js>"N3-TRIPLES"</js> - Name of the N3 triples writer. 074 * This writer writes one line per statement, like N-Triples, but does N3-style prefixing. 075 * <li> 076 * <js>"TURTLE"</js> - Turtle writer. 077 * http://www.dajobe.org/2004/01/turtle/ 078 * </ul> 079 * <li> 080 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 081 * <li> 082 * A default global value can be set via the system property <js>"Rdf.language.s"</js>. 083 * </ul> 084 * 085 * <ul class='seealso'> 086 * <li class='jf'>{@link RdfCommon#RDF_language} 087 * </ul> 088 */ 089 String language() default ""; 090 091 /** 092 * Configuration property: XML namespace for Juneau properties. 093 * 094 * <ul class='notes'> 095 * <li> 096 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 097 * <li> 098 * A default global value can be set via the system property <js>"Rdf.juneauNs.s"</js>. 099 * </ul> 100 * 101 * <ul class='seealso'> 102 * <li class='jf'>{@link RdfCommon#RDF_juneauNs} 103 * </ul> 104 */ 105 String juneauNs() default ""; 106 107 /** 108 * Configuration property: Default XML namespace for bean properties. 109 * 110 * <ul class='notes'> 111 * <li> 112 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 113 * <li> 114 * A default global value can be set via the system property <js>"Rdf.juneauBpNs.s"</js>. 115 * </ul> 116 * 117 * <ul class='seealso'> 118 * <li class='jf'>{@link RdfCommon#RDF_juneauBpNs} 119 * </ul> 120 */ 121 String juneauBpNs() default ""; 122 123 /** 124 * Configuration property: RDF/XML property: <c>iri_rules</c>. 125 * 126 * <p> 127 * Set the engine for checking and resolving. 128 * 129 * <ul class='notes'> 130 * <li> 131 * Possible values: 132 * <ul class='spaced-list'> 133 * <li> 134 * <js>"lax"</js> - The rules for RDF URI references only, which does permit spaces although the use of spaces 135 * is not good practice. 136 * <li> 137 * <js>"strict"</js> - Sets the IRI engine with rules for valid IRIs, XLink and RDF; it does not permit spaces 138 * in IRIs. 139 * <li> 140 * <js>"iri"</js> - Sets the IRI engine to IRI 141 * ({@doc http://www.ietf.org/rfc/rfc3986.txt RFC 3986}, 142 * {@doc http://www.ietf.org/rfc/rfc3987.txt RFC 3987}). 143 * </ul> 144 * <li> 145 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 146 * <li> 147 * A default global value can be set via the system property <js>"Rdf.jena.rdfXml.iri-rules.s"</js>. 148 * </ul> 149 * 150 * <ul class='seealso'> 151 * <li class='jf'>{@link RdfCommon#RDF_arp_iriRules} 152 * </ul> 153 */ 154 String arp_iriRules() default ""; 155 156 /** 157 * Configuration property: RDF/XML ARP property: <c>error-mode</c>. 158 * 159 * <p> 160 * This allows a coarse-grained approach to control of error handling. 161 * 162 * <ul class='notes'> 163 * <li> 164 * Possible values: 165 * <ul> 166 * <li><js>"default"</js> 167 * <li><js>"lax"</js> 168 * <li><js>"strict"</js> 169 * <li><js>"strict-ignore"</js> 170 * <li><js>"strict-warning"</js> 171 * <li><js>"strict-error"</js> 172 * <li><js>"strict-fatal"</js> 173 * </ul> 174 * <li> 175 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 176 * <li> 177 * A default global value can be set via the system property <js>"Rdf.jena.rdfXml.error-mode.s"</js>. 178 * </ul> 179 * 180 * <ul class='seealso'> 181 * <li class='jf'>{@link RdfCommon#RDF_arp_errorMode} 182 * <li> 183 * {@doc ARP/ARPOptions.html#setDefaultErrorMode() ARPOptions.setDefaultErrorMode()} 184 * <li> 185 * {@doc ARP/ARPOptions.html#setLaxErrorMode() ARPOptions.setLaxErrorMode()} 186 * <li> 187 * {@doc ARP/ARPOptions.html#setStrictErrorMode() ARPOptions.setStrictErrorMode()} 188 * <li> 189 * {@doc ARP/ARPOptions.html#setStrictErrorMode(int) ARPOptions.setStrictErrorMode(int)} 190 * </ul> 191 */ 192 String arp_errorMode() default ""; 193 194 /** 195 * Configuration property: RDF/XML ARP property: <c>embedding</c>. 196 * 197 * <p> 198 * Sets ARP to look for RDF embedded within an enclosing XML document. 199 * 200 * <ul class='notes'> 201 * <li> 202 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 203 * <li> 204 * A default global value can be set via the system property <js>"Rdf.jena.rdfXml.embedding.b"</js>. 205 * </ul> 206 * 207 * <ul class='seealso'> 208 * <li class='jf'>{@link RdfCommon#RDF_arp_embedding} 209 * <li> 210 * {@doc ARP/ARPOptions.html#setEmbedding(boolean) ARPOptions.setEmbedding(boolean)} 211 * </ul> 212 */ 213 String arp_embedding() default ""; 214 215 /** 216 * Configuration property: RDF/XML property: <c>xmlbase</c>. 217 * 218 * <p> 219 * The value to be included for an <xa>xml:base</xa> attribute on the root element in the file. 220 * 221 * <ul class='notes'> 222 * <li> 223 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 224 * <li> 225 * A default global value can be set via the system property <js>"Rdf.jena.rdfXml.xmlbase.s"</js>. 226 * </ul> 227 * 228 * <ul class='seealso'> 229 * <li class='jf'>{@link RdfCommon#RDF_rdfxml_xmlBase} 230 * </ul> 231 */ 232 String rdfxml_xmlBase() default ""; 233 234 /** 235 * Configuration property: RDF/XML property: <c>longId</c>. 236 * 237 * <p> 238 * Whether to use long ID's for anon resources. 239 * <br>Short ID's are easier to read, but can run out of memory on very large models. 240 * 241 * <ul class='notes'> 242 * <li> 243 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 244 * <li> 245 * A default global value can be set via the system property <js>"Rdf.jena.rdfXml.longId.b"</js>. 246 * </ul> 247 * 248 * <ul class='seealso'> 249 * <li class='jf'>{@link RdfCommon#RDF_rdfxml_longId} 250 * </ul> 251 */ 252 String rdfxml_longId() default ""; 253 254 /** 255 * Configuration property: RDF/XML property: <c>allowBadURIs</c>. 256 * 257 * <p> 258 * URIs in the graph are, by default, checked prior to serialization. 259 * 260 * <ul class='notes'> 261 * <li> 262 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 263 * <li> 264 * A default global value can be set via the system property <js>"Rdf.jena.rdfXml.allowBadURIs.b"</js>. 265 * </ul> 266 * 267 * <ul class='seealso'> 268 * <li class='jf'>{@link RdfCommon#RDF_rdfxml_allowBadUris} 269 * </ul> 270 */ 271 String rdfxml_allowBadUris() default ""; 272 273 /** 274 * Configuration property: RDF/XML property: <c>relativeURIs</c>. 275 * 276 * <p> 277 * What sort of relative URIs should be used. 278 * 279 * <p> 280 * A comma separate list of options: 281 * <ul class='spaced-list'> 282 * <li> 283 * <js>"same-document"</js> - Same-document references (e.g. <js>""</js> or <js>"#foo"</js>) 284 * <li> 285 * <js>"network"</js> - Network paths (e.g. <js>"//example.org/foo"</js> omitting the URI scheme) 286 * <li> 287 * <js>"absolute"</js> - Absolute paths (e.g. <js>"/foo"</js> omitting the scheme and authority) 288 * <li> 289 * <js>"relative"</js> - Relative path not beginning in <js>"../"</js> 290 * <li> 291 * <js>"parent"</js> - Relative path beginning in <js>"../"</js> 292 * <li> 293 * <js>"grandparent"</js> - Relative path beginning in <js>"../../"</js> 294 * </ul> 295 * 296 * <p> 297 * The default value is <js>"same-document, absolute, relative, parent"</js>. 298 * To switch off relative URIs use the value <js>""</js>. 299 * Relative URIs of any of these types are output where possible if and only if the option has been specified. 300 * 301 * <ul class='notes'> 302 * <li> 303 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 304 * <li> 305 * A default global value can be set via the system property <js>"Rdf.jena.rdfXml.relativeURIs.s"</js>. 306 * </ul> 307 * 308 * <ul class='seealso'> 309 * <li class='jf'>{@link RdfCommon#RDF_rdfxml_relativeUris} 310 * </ul> 311 */ 312 String rdfxml_relativeUris() default ""; 313 314 /** 315 * Configuration property: RDF/XML property: <c>showXmlDeclaration</c>. 316 * 317 * <ul class='notes'> 318 * <li> 319 * Possible values: 320 * <ul class='spaced-list'> 321 * <li> 322 * <js>"true"</js> - Add XML Declaration to the output. 323 * <li> 324 * <js>"false"</js> - Don't add XML Declaration to the output. 325 * <li> 326 * <js>"default"</js> - Only add an XML Declaration when asked to write to an <c>OutputStreamWriter</c> 327 * that uses some encoding other than <c>UTF-8</c> or <c>UTF-16</c>. 328 * In this case the encoding is shown in the XML declaration. 329 * </ul> 330 * <li> 331 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 332 * <li> 333 * A default global value can be set via the system property <js>"Rdf.jena.rdfXml.showXmlDeclaration.s"</js>. 334 * </ul> 335 * 336 * <ul class='seealso'> 337 * <li class='jf'>{@link RdfCommon#RDF_rdfxml_showXmlDeclaration} 338 * </ul> 339 */ 340 String rdfxml_showXmlDeclaration() default ""; 341 342 /** 343 * Configuration property: RDF/XML property: <c>showDoctypeDeclaration</c>. 344 * 345 * <p> 346 * If true, an XML doctype declaration is included in the output. 347 * <br>This declaration includes a <c>!ENTITY</c> declaration for each prefix mapping in the model, and any 348 * attribute value that starts with the URI of that mapping is written as starting with the corresponding entity 349 * invocation. 350 * 351 * <ul class='notes'> 352 * <li> 353 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 354 * <li> 355 * A default global value can be set via the system property <js>"Rdf.jena.rdfXml.showDoctypeDeclaration"</js>. 356 * </ul> 357 * 358 * <ul class='seealso'> 359 * <li class='jf'>{@link RdfCommon#RDF_rdfxml_showDoctypeDeclaration} 360 * </ul> 361 */ 362 String rdfxml_showDoctypeDeclaration() default ""; 363 364 /** 365 * Configuration property: RDF/XML property: <c>tab</c>. 366 * 367 * <p> 368 * The number of spaces with which to indent XML child elements. 369 * 370 * <ul class='notes'> 371 * <li> 372 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 373 * <li> 374 * A default global value can be set via the system property <js>"Rdf.jena.rdfXml.tab.i"</js>. 375 * </ul> 376 * 377 * <ul class='seealso'> 378 * <li class='jf'>{@link RdfCommon#RDF_rdfxml_tab} 379 * </ul> 380 */ 381 String rdfxml_tab() default ""; 382 383 /** 384 * Configuration property: RDF/XML property: <c>attributeQuoteChar</c>. 385 * 386 * <p> 387 * The XML attribute quote character. 388 * 389 * <ul class='notes'> 390 * <li> 391 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 392 * <li> 393 * A default global value can be set via the system property <js>"Rdf.jena.rdfXml.attributeQuoteChar.s"</js>. 394 * </ul> 395 * 396 * <ul class='seealso'> 397 * <li class='jf'>{@link RdfCommon#RDF_rdfxml_attributeQuoteChar} 398 * </ul> 399 */ 400 String rdfxml_attributeQuoteChar() default ""; 401 402 /** 403 * Configuration property: RDF/XML property: <c>blockRules</c>. 404 * 405 * <p> 406 * A list of <c>Resource</c> or a <c>String</c> being a comma separated list of fragment IDs from 407 * {@doc http://www.w3.org/TR/rdf-syntax-grammar RDF Syntax Grammar} indicating grammar 408 * rules that will not be used. 409 * 410 * <ul class='notes'> 411 * <li> 412 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 413 * <li> 414 * A default global value can be set via the system property <js>"Rdf.jena.rdfXml.blockRules.s"</js>. 415 * </ul> 416 * 417 * <ul class='seealso'> 418 * <li class='jf'>{@link RdfCommon#RDF_rdfxml_blockRules} 419 * </ul> 420 */ 421 String rdfxml_blockRules() default ""; 422 423 /** 424 * Configuration property: N3/Turtle property: <c>minGap</c>. 425 * 426 * <p> 427 * Minimum gap between items on a line. 428 * 429 * <ul class='notes'> 430 * <li> 431 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 432 * <li> 433 * A default global value can be set via the system property <js>"Rdf.jena.n3.minGap.i"</js>. 434 * </ul> 435 * 436 * <ul class='seealso'> 437 * <li class='jf'>{@link RdfCommon#RDF_n3_minGap} 438 * </ul> 439 */ 440 String n3_minGap() default ""; 441 442 /** 443 * Configuration property: N3/Turtle property: <c>objectLists</c>. 444 * 445 * <p> 446 * Print object lists as comma separated lists. 447 * 448 * <ul class='notes'> 449 * <li> 450 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 451 * <li> 452 * A default global value can be set via the system property <js>"Rdf.jena.n3.objectLists.b"</js>. 453 * </ul> 454 * 455 * <ul class='seealso'> 456 * <li class='jf'>{@link RdfCommon#RDF_n3_objectLists} 457 * </ul> 458 */ 459 String n3_objectLists() default ""; 460 461 /** 462 * Configuration property: N3/Turtle property: <c>subjectColumn</c>. 463 * 464 * <p> 465 * If the subject is shorter than this value, the first property may go on the same line. 466 * 467 * <ul class='notes'> 468 * <li> 469 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 470 * <li> 471 * A default global value can be set via the system property <js>"Rdf.jena.n3.subjectColumn.i"</js>. 472 * </ul> 473 * 474 * <ul class='seealso'> 475 * <li class='jf'>{@link RdfCommon#RDF_n3_subjectColumn} 476 * </ul> 477 */ 478 String n3_subjectColumn() default ""; 479 480 /** 481 * Configuration property: N3/Turtle property: <c>propertyColumn</c>. 482 * 483 * <p> 484 * Width of the property column. 485 * 486 * <ul class='notes'> 487 * <li> 488 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 489 * <li> 490 * A default global value can be set via the system property <js>"Rdf.jena.n3.propertyColumn.i"</js>. 491 * </ul> 492 * 493 * <ul class='seealso'> 494 * <li class='jf'>{@link RdfCommon#RDF_n3_propertyColumn} 495 * </ul> 496 */ 497 String n3_propertyColumn() default ""; 498 499 /** 500 * Configuration property: N3/Turtle property: <c>indentProperty</c>. 501 * 502 * <p> 503 * Width to indent properties. 504 * 505 * <ul class='notes'> 506 * <li> 507 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 508 * <li> 509 * A default global value can be set via the system property <js>"Rdf.jena.n3.indentProperty.i"</js>. 510 * </ul> 511 * 512 * <ul class='seealso'> 513 * <li class='jf'>{@link RdfCommon#RDF_n3_indentProperty} 514 * </ul> 515 */ 516 String n3_indentProperty() default ""; 517 518 /** 519 * Configuration property: N3/Turtle property: <c>widePropertyLen</c>. 520 * 521 * <p> 522 * Width of the property column. 523 * <br>Must be longer than <c>propertyColumn</c>. 524 * 525 * <ul class='notes'> 526 * <li> 527 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 528 * <li> 529 * A default global value can be set via the system property <js>"Rdf.jena.n3.widePropertyLen.i"</js>. 530 * </ul> 531 * 532 * <ul class='seealso'> 533 * <li class='jf'>{@link RdfCommon#RDF_n3_widePropertyLen} 534 * </ul> 535 */ 536 String n3_widePropertyLen() default ""; 537 538 /** 539 * Configuration property: N3/Turtle property: <c>abbrevBaseURI</c>. 540 * 541 * <p> 542 * Control whether to use abbreviations <c><></c> or <c><#></c>. 543 * 544 * <ul class='notes'> 545 * <li> 546 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 547 * <li> 548 * A default global value can be set via the system property <js>"Rdf.jena.n3.abbrevBaseURI.b"</js>. 549 * </ul> 550 * 551 * <ul class='seealso'> 552 * <li class='jf'>{@link RdfCommon#RDF_n3_abbrevBaseUri} 553 * </ul> 554 */ 555 String n3_abbrevBaseUri() default ""; 556 557 /** 558 * Configuration property: N3/Turtle property: <c>usePropertySymbols</c>. 559 * 560 * <p> 561 * Control whether to use <c>a</c>, <c>=</c> and <c>=></c> in output 562 * 563 * <ul class='notes'> 564 * <li> 565 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 566 * <li> 567 * A default global value can be set via the system property <js>"Rdf.jena.n3.usePropertySymbols.b"</js>. 568 * </ul> 569 * 570 * <ul class='seealso'> 571 * <li class='jf'>{@link RdfCommon#RDF_n3_usePropertySymbols} 572 * </ul> 573 */ 574 String n3_usePropertySymbols() default ""; 575 576 /** 577 * Configuration property: N3/Turtle property: <c>useTripleQuotedStrings</c>. 578 * 579 * <p> 580 * Allow the use of <c>"""</c> to delimit long strings. 581 * 582 * <ul class='notes'> 583 * <li> 584 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 585 * <li> 586 * A default global value can be set via the system property <js>"Rdf.jena.n3.useTripleQuotedStrings.b"</js>. 587 * </ul> 588 * 589 * <ul class='seealso'> 590 * <li class='jf'>{@link RdfCommon#RDF_n3_useTripleQuotedStrings} 591 * </ul> 592 */ 593 String n3_useTripleQuotedStrings() default ""; 594 595 /** 596 * Configuration property: N3/Turtle property: <c>useDoubles</c>. 597 * 598 * <p> 599 * Allow the use doubles as <c>123.456</c>. 600 * 601 * <ul class='notes'> 602 * <li> 603 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 604 * <li> 605 * A default global value can be set via the system property <js>"Rdf.jena.n3.useDoubles.b"</js>. 606 * </ul> 607 * 608 * <ul class='seealso'> 609 * <li class='jf'>{@link RdfCommon#RDF_n3_useDoubles} 610 * </ul> 611 */ 612 String n3_useDoubles() default ""; 613 614 /** 615 * Configuration property: RDF format for representing collections and arrays. 616 * 617 * <ul class='notes'> 618 * <li> 619 * Possible values: 620 * <ul class='spaced-list'> 621 * <li> 622 * <js>"DEFAULT"</js> - Default format. The default is an RDF Sequence container. 623 * <li> 624 * <js>"SEQ"</js> - RDF Sequence container. 625 * <li> 626 * <js>"BAG"</js> - RDF Bag container. 627 * <li> 628 * <js>"LIST"</js> - RDF List container. 629 * <li> 630 * <js>"MULTI_VALUED"</js> - Multi-valued properties. 631 * </ul> 632 * <li> 633 * If you use <js>"BAG"</js> or <js>"MULTI_VALUED"</js>, the order of the elements in the collection will get 634 * lost. 635 * <li> 636 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 637 * <li> 638 * A default global value can be set via the system property <js>"Rdf.collectionFormat.s"</js>. 639 * </ul> 640 * 641 * <ul class='seealso'> 642 * <li class='jf'>{@link RdfCommon#RDF_collectionFormat} 643 * </ul> 644 */ 645 String collectionFormat() default ""; 646 647 /** 648 * Configuration property: Collections should be serialized and parsed as loose collections. 649 * 650 * <p> 651 * When specified, collections of resources are handled as loose collections of resources in RDF instead of 652 * resources that are children of an RDF collection (e.g. Sequence, Bag). 653 * 654 * <p> 655 * Note that this setting is specialized for RDF syntax, and is incompatible with the concept of 656 * losslessly representing POJO models, since the tree structure of these POJO models are lost 657 * when serialized as loose collections. 658 * 659 * <p> 660 * This setting is typically only useful if the beans being parsed into do not have a bean property 661 * annotated with {@link Rdf#beanUri @Rdf(beanUri=true)}. 662 * 663 * <ul class='notes'> 664 * <li> 665 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 666 * <li> 667 * A default global value can be set via the system property <js>"Rdf.looseCollections.b"</js>. 668 * </ul> 669 * 670 * <ul class='seealso'> 671 * <li class='jf'>{@link RdfCommon#RDF_looseCollections} 672 * </ul> 673 */ 674 String looseCollections() default ""; 675 676 //------------------------------------------------------------------------------------------------------------------- 677 // RdfParser 678 //------------------------------------------------------------------------------------------------------------------- 679 680 /** 681 * Configuration property: Trim whitespace from text elements. 682 * 683 * <p> 684 * If <js>"true"</js>, whitespace in text elements will be automatically trimmed. 685 * 686 * <ul class='notes'> 687 * <li> 688 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 689 * <li> 690 * A default global value can be set via the system property <js>"RdfParser.trimWhitespace.b"</js>. 691 * </ul> 692 * 693 * <ul class='seealso'> 694 * <li class='jf'>{@link RdfParser#RDF_trimWhitespace} 695 * </ul> 696 */ 697 String trimWhitespace() default ""; 698 699 //------------------------------------------------------------------------------------------------------------------- 700 // RdfSerializer 701 //------------------------------------------------------------------------------------------------------------------- 702 703 /** 704 * Configuration property: Add <js>"_type"</js> properties when needed. 705 * 706 * If <js>"true"</js>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred 707 * through reflection. 708 * 709 * <p> 710 * When present, this value overrides the {@link Serializer#SERIALIZER_addBeanTypes} setting and is 711 * provided to customize the behavior of specific serializers in a {@link SerializerGroup}. 712 * 713 * <ul class='notes'> 714 * <li> 715 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 716 * <li> 717 * A default global value can be set via the system property <js>"RdfSerializer.addBeanTypes.b"</js>. 718 * </ul> 719 * 720 * <ul class='seealso'> 721 * <li class='jf'>{@link RdfSerializer#RDF_addBeanTypes} 722 * </ul> 723 */ 724 String addBeanTypes() default ""; 725 726 /** 727 * Configuration property: Add XSI data types to non-<c>String</c> literals. 728 * 729 * <ul class='notes'> 730 * <li> 731 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 732 * <li> 733 * A default global value can be set via the system property <js>"RdfSerializer.addLiteralTypes.b"</js>. 734 * </ul> 735 * 736 * <ul class='seealso'> 737 * <li class='jf'>{@link RdfSerializer#RDF_addLiteralTypes} 738 * </ul> 739 */ 740 String addLiteralTypes() default ""; 741 742 /** 743 * Configuration property: Add RDF root identifier property to root node. 744 * 745 * <p> 746 * When enabled an RDF property <c>http://www.apache.org/juneau/root</c> is added with a value of <js>"true"</js> 747 * to identify the root node in the graph. 748 * <br>This helps locate the root node during parsing. 749 * 750 * <p> 751 * If disabled, the parser has to search through the model to find any resources without incoming predicates to 752 * identify root notes, which can introduce a considerable performance degradation. 753 * 754 * <ul class='notes'> 755 * <li> 756 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 757 * <li> 758 * A default global value can be set via the system property <js>"RdfSerializer.addRootProperty.b"</js>. 759 * </ul> 760 * 761 * <ul class='seealso'> 762 * <li class='jf'>{@link RdfSerializer#RDF_addRootProperty} 763 * </ul> 764 */ 765 String addRootProperty() default ""; 766 767 /** 768 * Configuration property: Auto-detect namespace usage. 769 * 770 * <p> 771 * Detect namespace usage before serialization. 772 * 773 * <p> 774 * If enabled, then the data structure will first be crawled looking for namespaces that will be encountered before 775 * the root element is serialized. 776 * 777 * <ul class='notes'> 778 * <li> 779 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 780 * <li> 781 * A default global value can be set via the system property <js>"RdfSerializer.autoDetectNamespaces.b"</js>. 782 * </ul> 783 * 784 * <ul class='seealso'> 785 * <li class='jf'>{@link RdfSerializer#RDF_autoDetectNamespaces} 786 * </ul> 787 */ 788 String autoDetectNamespaces() default ""; 789 790 /** 791 * Configuration property: Default namespaces. 792 * 793 * <p> 794 * The default list of namespaces associated with this serializer. 795 * 796 * <ul class='notes'> 797 * <li> 798 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 799 * <li> 800 * A default global value can be set via the system property <js>"RdfSerializer.namespaces.ls"</js>. 801 * </ul> 802 * 803 * <ul class='seealso'> 804 * <li class='jf'>{@link RdfSerializer#RDF_namespaces} 805 * </ul> 806 */ 807 String[] namespaces() default {}; 808 809 /** 810 * Configuration property: Reuse XML namespaces when RDF namespaces not specified. 811 * 812 * <p> 813 * When specified, namespaces defined using {@link XmlNs @XmlNs} and {@link Xml @Xml} will be inherited by the RDF serializers. 814 * <br>Otherwise, namespaces will be defined using {@link RdfNs @RdfNs} and {@link Rdf @Rdf}. 815 * 816 * <ul class='notes'> 817 * <li> 818 * Possible values: 819 * <ul> 820 * <li><js>"true"</js> (default) 821 * <li><js>"false"</js> 822 * </ul> 823 * <li> 824 * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>). 825 * <li> 826 * A default global value can be set via the system property <js>"Rdf.useXmlNamespaces.b"</js>. 827 * </ul> 828 * 829 * <ul class='seealso'> 830 * <li class='jf'>{@link RdfSerializer#RDF_useXmlNamespaces} 831 * </ul> 832 */ 833 String useXmlNamespaces() default ""; 834}