Class NTripleSerializer
- All Implemented Interfaces:
Function<Object,,String> ThrowingFunction<Object,,String> RdfMetaProvider,XmlMetaProvider
RdfSerializer for serializing POJOs to N-Triples notation.
Produces one RDF triple per line in W3C N-Triples format. Simple, line-oriented, and easy to parse.
Examples:
Example output (bean with name/age):
<...> <.../name> "Alice" . <...> <.../age> "30"^^<http://www.w3.org/2001/XMLSchema#int> .
Complex (nested address + array):
<...> <.../name> "Alice" . <...> <.../age> "30"^^... . <...> <.../address> <.../address> . <.../address> <.../street> "123 Main St" . <.../address> <.../city> "Boston" . <.../address> <.../state> "MA" .
Notes:
- This class is thread safe and reusable.
See Also:
- {doc jmr.RdfDetails}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.juneau.marshall.jena.RdfSerializer
RdfSerializer.Builder<SELF extends RdfSerializer.Builder<SELF>>, RdfSerializer.DefaultBuilderNested classes/interfaces inherited from class org.apache.juneau.marshall.serializer.Serializer
Serializer.Null -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NTripleSerializerDefault N-Triple serializer, all default settings.Fields inherited from class org.apache.juneau.marshall.jena.RdfSerializer
addBeanTypesRdf, addLiteralTypes, addRootProperty, autoDetectNamespaces, collectionFormat, juneauBpNs, juneauNs, language, looseCollections, useXmlNamespacesFields inherited from class org.apache.juneau.marshall.serializer.WriterSerializer
maxIndent, quoteChar, quoteCharOverride, useWhitespaceFields inherited from class org.apache.juneau.marshall.serializer.Serializer
accept, addBeanTypes, addRootType, keepNullProperties, listener, nonDefault, produces, sortCollections, sortMaps, trimEmptyCollections, trimEmptyMaps, trimStringsFields inherited from class org.apache.juneau.marshall.MarshallingContextable
marshallingContextFields inherited from class org.apache.juneau.marshall.Context
CONTEXT_APPLY_FILTER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RdfSerializer.Builder<?>create()Creates a new builder for this object.Methods inherited from class org.apache.juneau.marshall.jena.RdfSerializer
copy, createSession, getCollectionFormat, getJenaSettings, getJuneauBpNs, getJuneauNs, getLanguage, getNamespaces, getRdfBeanMeta, getRdfBeanPropertyMeta, getRdfClassMeta, getSession, getXmlBeanMeta, getXmlBeanPropertyMeta, getXmlClassMeta, isAddBeanTypes, isAddLiteralTypes, isAddRootProp, isAutoDetectNamespaces, isLooseCollections, isUseXmlNamespaces, propertiesMethods inherited from class org.apache.juneau.marshall.serializer.WriterSerializer
applyThrows, getMaxIndent, getQuoteChar, getStreamCharset, isUseWhitespace, isWriterSerializer, println, quoteChar, toString, writeMethods inherited from class org.apache.juneau.marshall.serializer.Serializer
createSerializerBuilder, doWrite, forEachAcceptMediaType, getListener, getMediaTypeRanges, getPrimaryMediaType, getResponseContentType, getResponseHeaders, getUriContext, getUriRelativity, getUriResolution, isAddRootType, isKeepNullProperties, isNonDefault, isSortCollections, isSortMaps, isTrimEmptyCollections, isTrimEmptyMaps, isTrimStrings, write, writeToStringMethods inherited from class org.apache.juneau.marshall.MarshallingTraverseContext
getDetectRecursions, getIgnoreRecursions, getInitialDepth, getMaxDepth, isDetectRecursions, isIgnoreRecursions, shouldDetectRecursionsMethods inherited from class org.apache.juneau.marshall.MarshallingContextable
getDurationFormat, getMarshallingContext, getPeriodFormatMethods inherited from class org.apache.juneau.marshall.Context
createBuilder, getAnnotationProvider, init, isDebug, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.juneau.commons.function.ThrowingFunction
apply
-
Field Details
-
DEFAULT
Default N-Triple serializer, all default settings.
-
-
Constructor Details
-
NTripleSerializer
Constructor.- Parameters:
builder- The builder for this object.
Cannot benull .
-
-
Method Details
-
create
Creates a new builder for this object.- Returns:
- A new builder.
-