Class RdfStreamParserSession
- All Implemented Interfaces:
BeanSession,ConverterSession
RdfStreamParser.
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.parser.InputStreamParserSession
InputStreamParserSession.DefaultBuilder -
Field Summary
Fields inherited from class org.apache.juneau.marshall.parser.ParserSession
DEFAULT_MAX_PARSE_DEPTHFields inherited from class org.apache.juneau.marshall.MarshallingSession
NAME_PROPERTY_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor. -
Method Summary
Modifier and TypeMethodDescriptioncreate(RdfStreamParser ctx) Creates a new builder for this object.protected <T> TdoRead(ParserPipe pipe, ClassMeta<T> type) Workhorse method.protected final RdfCollectionFormatRDF format for representing collections and arrays.protected final NamespaceDefault XML namespace for bean properties.protected final NamespaceXML namespace for Juneau properties.protected final StringRDF language.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.booleanReturns whether this binary parser has a native byte-array wire type.protected final booleanCollections should be serialized and parsed as loose collections.protected final booleanTrim whitespace from text elements.Methods inherited from class org.apache.juneau.marshall.parser.InputStreamParserSession
create, createPipe, getBinaryFormat, isReaderParserMethods inherited from class org.apache.juneau.marshall.parser.ParserSession
allocateLocal, cast, checkRequired, convertAttrToType, create, doReadIntoCollection, doReadIntoMap, doReadToBeanConsumer, enterParseDepth, exitParseDepth, getCalendarFormat, getClassMeta, getDateFormat, getDebugOutputLines, getDurationFormat, getInputAsString, getJavaMethod, getLastLocation, getListener, getListener, getListenerClass, getLocaleFormat, getNulls, getOuter, getPeriodFormat, getPosition, getSchema, getStringBuilder, getTemporalFormat, getTimeZoneFormat, isAutoCloseStreams, isTrimStrings, isUnbuffered, mark, onBeanSetterException, onUnknownProperty, parentBean, properties, read, read, read, read, read, read, readArgs, readCalendar, readDate, readDuration, readIntoCollection, readIntoMap, readPeriod, readTemporal, readToBeanConsumer, returnStringBuilder, setCurrentClass, setCurrentProperty, setName, setParent, setPipe, swapParentBean, trim, trim, unmark, unswapMethods 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
-
RdfStreamParserSession
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.
-
hasNativeBytes
Description copied from class:InputStreamParserSessionReturns whether this binary parser has a native byte-array wire type.Mirror of
OutputStreamSerializerSession.hasNativeBytes()for the parse side. Whentrue,byte[]payloads are consumed natively from the binary stream (e.g. MsgPackbinfamily, CBOR byte-string major type 2, BSON binary subtype0x05) andBinarySwapskips so the raw bytes reach the bean property directly. Whenfalsethe parser surfacesbyte[]payloads as a string (UTF-8 column for Parquet, plain literal for binary RDF) andBinarySwapfires to apply the configuredBinaryFormatreverse decoding back tobyte[].Defaults to
true. Subclasses without a native byte-array wire type (e.g.ParquetParserSessionand the binary RDF parser sessions) override and returnfalse.- Overrides:
hasNativeBytesin classInputStreamParserSession- Returns:
trueif this parser has a native byte-array wire type.
-
doRead
protected <T> T doRead(ParserPipe pipe, ClassMeta<T> type) throws IOException, ParseException, ExecutableException Description copied from class:ParserSessionWorkhorse method.Subclasses are expected to implement this method or
Parser.doRead(ParserSession,ParserPipe,ClassMeta).The default implementation of this method simply calls
Parser.doRead(ParserSession,ParserPipe,ClassMeta).- Overrides:
doReadin classParserSession- Type Parameters:
T- The class type of the object to create.- Parameters:
pipe- Where to get the input from.type- The class type of the object to create. Ifnull orObject., object type is based on what's being parsed. For example, when parsing JSON text, it may return aclass String ,Number ,JsonMap , etc...- Returns:
- The parsed object.
- Throws:
IOException- Thrown by underlying stream.ParseException- Malformed input encountered.ExecutableException- Exception occurred on invoked constructor/method/field.
-
getCollectionFormat
RDF format for representing collections and arrays.- Returns:
- RDF format for representing collections and arrays.
- See Also:
-
getJuneauBpNs
Default XML namespace for bean properties.- Returns:
- Default XML namespace for bean properties.
- See Also:
-
getJuneauNs
XML namespace for Juneau properties.- Returns:
- XML namespace for Juneau properties.
- See Also:
-
getLanguage
RDF language.- Returns:
- The RDF language to use.
- 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.
-
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:
-
isTrimWhitespace
Trim whitespace from text elements.- Returns:
true if whitespace in text elements will be automatically trimmed.- See Also:
-