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