Annotation Interface RdfConfig
XmlSerializer, XmlDocSerializer, and XmlParser.
Used primarily for specifying bean configuration properties on REST classes and methods.
See Also:
- {doc jmr.RdfDetails}
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionAdd"_type" properties when needed.Add XSI data types to non-String literals.Add RDF root identifier property to root node.RDF format for representing collections and arrays.Disable auto-detect namespace usage.Disable reuse of XML namespaces when RDF namespaces not specified.Default XML namespace for bean properties.XML namespace for Juneau properties.RDF language.Collections should be serialized and parsed as loose collections.N3/Turtle property:disableAbbrevBaseURI .N3/Turtle property:disableObjectLists .N3/Turtle property:disableUseDoubles .N3/Turtle property:disableUsePropertySymbols .N3/Turtle property:disableUseTripleQuotedStrings .N3/Turtle property:indentProperty .N3/Turtle property:minGap .N3/Turtle property:propertyColumn .N3/Turtle property:subjectColumn .N3/Turtle property:widePropertyLen .String[]Default namespaces.intOptional rank for this config.RDF/XML property:allowBadURIs .RDF/XML property:attributeQuoteChar .RDF/XML property:blockRules .RDF/XML property:disableShowDoctypeDeclaration .RDF/XML ARP property:embedding .RDF/XML ARP property:error-mode .RDF/XML property:iri_rules .RDF/XML property:longId .RDF/XML property:relativeURIs .RDF/XML property:showXmlDeclaration .RDF/XML property:tab .RDF/XML property:xmlbase .Trim whitespace from text elements.
-
Element Details
-
addBeanTypes
Add"_type" properties when needed. If"true" , then"_type" properties will be added to beans if their type cannot be inferred through reflection.When present, this value overrides the
Serializer.Builder#addBeanTypes()setting and is provided to customize the behavior of specific serializers in aSerializerSet.Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
addLiteralTypes
Add XSI data types to non-String literals.Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
addRootProperty
Add RDF root identifier property to root node.When enabled an RDF property
http://www.apache.org/juneau/root is added with a value of"true" to identify the root node in the graph.
This helps locate the root node during parsing.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.
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
collectionFormat
RDF format for representing collections and arrays.-
"DEFAULT" - Default format. The default is an RDF Sequence container. -
"SEQ" - RDF Sequence container. -
"BAG" - RDF Bag container. -
"LIST" - RDF List container. -
"MULTI_VALUED" - Multi-valued properties.
Notes:
-
If you use
"BAG" or"MULTI_VALUED" , the order of the elements in the collection will get lost. -
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
-
disableAutoDetectNamespaces
Disable auto-detect namespace usage.Don't detect namespace usage before serialization.
If disabled, then the data structure will first be crawled looking for namespaces that will be encountered before the root element is serialized.
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
disableUseXmlNamespaces
Disable reuse of XML namespaces when RDF namespaces not specified.When specified, namespaces defined using
@XmlNsand@Xmlwill be inherited by the RDF serializers.
Otherwise, namespaces will be defined using@RdfNsand@Rdf."true" "false" (default)
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
juneauBpNs
Default XML namespace for bean properties.Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
juneauNs
XML namespace for Juneau properties.Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
language
RDF language.The RDF language to use.
-
"RDF/XML" -
"RDF/XML-ABBREV" (default) -
"N-TRIPLE" -
"N3" - 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 propertyorg.apache.jena.n3.N3JenaWriter.writer . -
"N3-PP" - Name of the N3 pretty writer. The pretty writer uses a frame-like layout, with prefixing, clustering like properties and embedding one-referenced bNodes. -
"N3-PLAIN" - Name of the N3 plain writer. The plain writer writes records by subject. -
"N3-TRIPLES" - Name of the N3 triples writer. This writer writes one line per statement, like N-Triples, but does N3-style prefixing. -
"TURTLE" - Turtle writer. http://www.dajobe.org/2004/01/turtle/
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
-
looseCollections
Collections should be serialized and parsed as loose collections.When specified, collections of resources are handled as loose collections of resources in RDF instead of resources that are children of an RDF collection (e.g. Sequence, Bag).
Note that this setting is specialized for RDF syntax, and is incompatible with the concept of losslessly representing POJO models, since the tree structure of these POJO models are lost when serialized as loose collections.
This setting is typically only useful if the beans being parsed into do not have a bean property annotated with
@Rdf(beanUri=true).Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
n3_disableAbbrevBaseUri
N3/Turtle property:disableAbbrevBaseURI .Controls whether to use abbreviations
<> or<#> .Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
n3_disableObjectLists
N3/Turtle property:disableObjectLists .Don't print object lists as comma separated lists.
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
n3_disableUseDoubles
N3/Turtle property:disableUseDoubles .Disallow the use doubles as
123.456 .Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
n3_disableUsePropertySymbols
N3/Turtle property:disableUsePropertySymbols .Controls whether to use
a ,= and=> in outputNotes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
n3_disableUseTripleQuotedStrings
N3/Turtle property:disableUseTripleQuotedStrings .Disallow the use of
""" to delimit long strings.Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
n3_indentProperty
N3/Turtle property:indentProperty .Width to indent properties.
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
n3_minGap
N3/Turtle property:minGap .Minimum gap between items on a line.
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
n3_propertyColumn
N3/Turtle property:propertyColumn .Width of the property column.
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
n3_subjectColumn
N3/Turtle property:subjectColumn .If the subject is shorter than this value, the first property may go on the same line.
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
n3_widePropertyLen
N3/Turtle property:widePropertyLen .Width of the property column.
Must be longer thanpropertyColumn .Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
namespaces
Default namespaces.The default list of namespaces associated with this serializer.
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- {}
-
Supports VarResolver.DEFAULT (e.g.
-
rank
int rankOptional rank for this config.Can be used to override default ordering and application of config annotations.
- Returns:
- The annotation value.
- Default:
- 0
-
rdfxml_allowBadUris
RDF/XML property:allowBadURIs .URIs in the graph are, by default, checked prior to serialization.
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
rdfxml_attributeQuoteChar
RDF/XML property:attributeQuoteChar .The XML attribute quote character.
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
rdfxml_blockRules
RDF/XML property:blockRules .A list of
Resource or aString being a comma separated list of fragment IDs from {doc http://www.w3.org/TR/rdf-syntax-grammar RDF Syntax Grammar} indicating grammar rules that will not be used.Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
rdfxml_disableShowDoctypeDeclaration
RDF/XML property:disableShowDoctypeDeclaration .If true, an XML doctype declaration isn't included in the output.
This declaration includes a!ENTITY 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.Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
rdfxml_embedding
RDF/XML ARP property:embedding .Sets ARP to look for RDF embedded within an enclosing XML document.
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- {doc ext.ARP/ARPOptions.html#setEmbedding(boolean) ARPOptions.setEmbedding(boolean)}
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
rdfxml_errorMode
RDF/XML ARP property:error-mode .This allows a coarse-grained approach to control of error handling.
"default" "lax" "strict" "strict-ignore" "strict-warning" "strict-error" "strict-fatal"
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- {doc ext.ARP/ARPOptions.html#setDefaultErrorMode() ARPOptions.setDefaultErrorMode()}
- {doc ext.ARP/ARPOptions.html#setLaxErrorMode() ARPOptions.setLaxErrorMode()}
- {doc ext.ARP/ARPOptions.html#setStrictErrorMode() ARPOptions.setStrictErrorMode()}
- {doc ext.ARP/ARPOptions.html#setStrictErrorMode(int) ARPOptions.setStrictErrorMode(int)}
- Returns:
- The annotation value.
- Default:
- ""
-
rdfxml_iriRules
RDF/XML property:iri_rules .Set the engine for checking and resolving.
-
"lax" - The rules for RDF URI references only, which does permit spaces although the use of spaces is not good practice. -
"strict" - Sets the IRI engine with rules for valid IRIs, XLink and RDF; it does not permit spaces in IRIs. -
"iri" - Sets the IRI engine to IRI ({doc http://www.ietf.org/rfc/rfc3986.txt RFC 3986}, {doc http://www.ietf.org/rfc/rfc3987.txt RFC 3987}).
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
- Returns:
- The annotation value.
- Default:
- ""
-
-
rdfxml_longId
RDF/XML property:longId .Whether to use long ID's for anon resources.
Short ID's are easier to read, but can run out of memory on very large models.Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
rdfxml_relativeUris
RDF/XML property:relativeURIs .What sort of relative URIs should be used.
A comma separate list of options:
-
"same-document" - Same-document references (e.g."" or"#foo" ) -
"network" - Network paths (e.g."//example.org/foo" omitting the URI scheme) -
"absolute" - Absolute paths (e.g."/foo" omitting the scheme and authority) -
"relative" - Relative path not beginning in"../" -
"parent" - Relative path beginning in"../" -
"grandparent" - Relative path beginning in"../../"
The default value is
"same-document, absolute, relative, parent" . To switch off relative URIs use the value"" . Relative URIs of any of these types are output where possible if and only if the option has been specified.Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
-
rdfxml_showXmlDeclaration
RDF/XML property:showXmlDeclaration .-
"true" - Add XML Declaration to the output. -
"false" - Don't add XML Declaration to the output. -
"default" - Only add an XML Declaration when asked to write to anOutputStreamWriter that uses some encoding other thanUTF-8 orUTF-16 . In this case the encoding is shown in the XML declaration.
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
-
rdfxml_tab
RDF/XML property:tab .The number of spaces with which to indent XML child elements.
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
rdfxml_xmlBase
RDF/XML property:xmlbase .The value to be included for an
xml:base attribute on the root element in the file.Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
trimWhitespace
Trim whitespace from text elements.If
"true" , whitespace in text elements will be automatically trimmed.Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-