Package org.apache.juneau.marshall.jena
Class RdfSerializerSession
java.lang.Object
org.apache.juneau.marshall.ContextSession
org.apache.juneau.marshall.MarshallingSession
org.apache.juneau.marshall.MarshallingTraverseSession
org.apache.juneau.marshall.serializer.SerializerSession
org.apache.juneau.marshall.serializer.WriterSerializerSession
org.apache.juneau.marshall.jena.RdfSerializerSession
- All Implemented Interfaces:
BeanSession,ConverterSession
Session object that lives for the duration of a single use of
RdfSerializer.
Notes:
- This class is not thread safe and is typically discarded after one use.
See Also:
- {doc jmr.RdfDetails}
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.juneau.marshall.serializer.WriterSerializerSession
WriterSerializerSession.DefaultBuilder -
Field Summary
Fields inherited from class org.apache.juneau.marshall.MarshallingTraverseSession
indentFields inherited from class org.apache.juneau.marshall.MarshallingSession
NAME_PROPERTY_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic RdfSerializerSession.Buildercreate(RdfSerializer ctx) Creates a new builder for this object.protected voiddoWrite(SerializerPipe out, Object o) Serializes a POJO to the specified pipe.protected final RdfCollectionFormatRDF format for representing collections and arrays.All Jena-related configuration properties.protected final NamespaceDefault XML namespace for bean properties.protected final NamespaceXML namespace for Juneau properties.protected final StringRDF language.protected final Namespace[]Default namespaces.protected RdfBeanMetagetRdfBeanMeta(BeanMeta<?> bm) Returns the language-specific metadata on the specified bean.protected RdfBeanPropertyMetaReturns the language-specific metadata on the specified bean property.protected RdfClassMetagetRdfClassMeta(ClassMeta<?> cm) Returns the language-specific metadata on the specified class.protected XmlBeanPropertyMetaReturns the language-specific metadata on the specified bean property.protected final booleanAdd XSI data types to non-String literals.protected final booleanAdd RDF root identifier property to root node.protected final booleanAuto-detect namespace usage.protected final booleanCollections should be serialized and parsed as loose collections.protected final booleanReuse XML namespaces when RDF namespaces not specified.Methods inherited from class org.apache.juneau.marshall.serializer.WriterSerializerSession
create, createPipe, getMaxIndent, getQuoteChar, getStreamCharset, isUseWhitespace, isWriterSerializer, properties, write, writeToStringMethods inherited from class org.apache.juneau.marshall.serializer.SerializerSession
addVarBean, canIgnoreValue, canIgnoreValue, create, createBeanTypeNameProperty, createDefaultVarResolverSession, forEachEntry, forEachEntry, forEachStreamableEntry, generalize, getBeanTypeName, getCalendarFormat, getDateFormat, getDurationFormat, getExpectedRootType, getJavaMethod, getListener, getListener, getLocaleFormat, getPeriodFormat, getResponseHeaders, getSchema, getTemporalFormat, getTimeZoneFormat, getUriContext, getUriRelativity, getUriResolution, getUriResolver, getVarResolver, handleThrown, isAddBeanTypes, isAddRootType, isKeepNullProperties, isNonDefault, isSortCollections, isSortMaps, isTrimEmptyCollections, isTrimEmptyMaps, isTrimStrings, onBeanGetterException, onError, push2, relativizeUri, resolve, resolveUri, sort, sort, sort, swap, toList, toListFromStreamable, toString, trim, unwrapSupplier, write, writeCalendar, writeDate, writeDuration, writePeriod, writeTemporalMethods inherited from class org.apache.juneau.marshall.MarshallingTraverseSession
getInitialDepth, getLastLocation, getMaxDepth, getOptionalType, getOptionalValue, getStack, isDetectRecursions, isIgnoreRecursions, isOptional, isRoot, pop, push, setCurrentClass, setCurrentProperty, willExceedDepth, willRecurseMethods inherited from class org.apache.juneau.marshall.MarshallingSession
addWarning, convertToMemberType, convertToMemberType, convertToMemberType, convertToType, convertToType, convertToType, convertToType, create, get, getActiveView, getAnnotationProvider, getArgsClassMeta, getBeanClassVisibility, getBeanConstructorVisibility, getBeanDictionary, getBeanFieldVisibility, getBeanMeta, getBeanMethodVisibility, getBeanRegistry, getBeanTypePropertyName, getBeanTypePropertyName, getClassLoader, getClassMeta, getClassMeta, getClassMetaForObject, getClassMetaForObject, getLocale, getMarshallingContext, getMediaType, getNotBeanClasses, getNotBeanPackagesNames, getPropertyNamer, getSwaps, getTimeZone, getTimeZoneId, isBean, isBean, isBeanMapPutReturnsOldValue, isBeansRequireDefaultConstructor, isBeansRequireSerializable, isBeansRequireSettersForGetters, isBeansRequireSomeProperties, isFindFluentSetters, isIgnoreInvocationExceptionsOnGetters, isIgnoreInvocationExceptionsOnSetters, isIgnoreMissingSetters, isIgnoreUnknownBeanProperties, isIgnoreUnknownNullBeanProperties, isPropertyInActiveView, isRecordComponentOrder, isUnsortedProperties, isUseInterfaceProxies, isUseJavaBeanIntrospector, isValidateSchema, newBean, newBean, newBeanMap, newBeanMap, newGenericList, newGenericMap, newGenericMap, object, parseToList, parseToMap, string, toArray, toBeanMap, toBeanMap, toBeanMapMethods inherited from class org.apache.juneau.marshall.ContextSession
checkForWarnings, getContext, getSessionProperties, getWarnings, 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.conversion.ConverterSession
get
-
Constructor Details
-
RdfSerializerSession
Constructor.- Parameters:
builder- The builder for this object.
Cannot benull .
-
-
Method Details
-
create
Creates a new builder for this object.- Parameters:
ctx- The context creating this session.
Cannot benull .- Returns:
- A new builder.
-
doWrite
Description copied from class:SerializerSessionSerializes a POJO to the specified pipe.This method should NOT close the context object.
The default implementation of this method simply calls
Serializer.doWrite(SerializerSession,SerializerPipe,Object).- Overrides:
doWritein classSerializerSession- Parameters:
out- Where to send the output from the serializer.o- The object to serialize.- Throws:
SerializeException- Problem occurred trying to serialize object.
-
getCollectionFormat
RDF format for representing collections and arrays.- Returns:
- RDF format for representing collections and arrays.
- See Also:
-
getJenaSettings
All Jena-related configuration properties.- Returns:
- A map of all Jena-related configuration properties.
-
getJuneauBpNs
Default XML namespace for bean properties.- Returns:
- The XML namespace to use for bean properties.
- See Also:
-
getJuneauNs
XML namespace for Juneau properties.- Returns:
- The XML namespace to use for Juneau properties.
- See Also:
-
getLanguage
RDF language.- Returns:
- The RDF language to use.
- See Also:
-
getNamespaces
Default namespaces.- Returns:
- The default list of namespaces associated with this serializer.
- See Also:
-
getRdfBeanMeta
Returns the language-specific metadata on the specified bean.- Parameters:
bm- The bean to return the metadata on.- Returns:
- The metadata.
-
getRdfBeanPropertyMeta
Returns the language-specific metadata on the specified bean property.- Parameters:
bpm- The bean property to return the metadata on.- Returns:
- The metadata.
-
getRdfClassMeta
Returns the language-specific metadata on the specified class.- Parameters:
cm- The class to return the metadata on.- Returns:
- The metadata.
-
getXmlBeanPropertyMeta
Returns the language-specific metadata on the specified bean property.- Parameters:
bpm- The bean property to return the metadata on.- Returns:
- The metadata.
-
isAddLiteralTypes
Add XSI data types to non-String literals.- Returns:
true if XSI data types should be added to string literals.- See Also:
-
isAddRootProp
Add RDF root identifier property to root node.- Returns:
true if RDF propertyhttp://www.apache.org/juneau/root is added with a value of"true" to identify the root node in the graph.- See Also:
-
isAutoDetectNamespaces
Auto-detect namespace usage.- Returns:
true if namespaces usage should be detected before serialization.- See Also:
-
isLooseCollections
Collections should be serialized and parsed as loose collections.- Returns:
true if 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).- See Also:
-
isUseXmlNamespaces
Reuse XML namespaces when RDF namespaces not specified.
-