public class RdfParserSession extends ReaderParserSession
RdfParser
.
This class is NOT thread safe. It is typically discarded after one-time use although it can be reused against multiple inputs.
Modifier | Constructor and Description |
---|---|
protected |
RdfParserSession(RdfParser ctx,
ParserSessionArgs args)
Create a new session using properties specified in the context.
|
Modifier and Type | Method and Description |
---|---|
protected <T> T |
doParse(ParserPipe pipe,
ClassMeta<T> type)
Workhorse method.
|
protected RdfCollectionFormat |
getCollectionFormat()
Configuration property: RDF format for representing collections and arrays.
|
protected Map<String,Object> |
getJenaProperties()
Configuration property: All Jena-related configuration properties.
|
protected Namespace |
getJuneauBpNs()
Configuration property: Default XML namespace for bean properties.
|
protected Namespace |
getJuneauNs()
Configuration property: XML namespace for Juneau properties.
|
protected String |
getLanguage()
Configuration property: RDF language.
|
protected RdfBeanMeta |
getRdfBeanMeta(BeanMeta<?> bm)
Returns the language-specific metadata on the specified bean.
|
protected RdfBeanPropertyMeta |
getRdfBeanPropertyMeta(BeanPropertyMeta bpm)
Returns the language-specific metadata on the specified bean property.
|
protected RdfClassMeta |
getRdfClassMeta(ClassMeta<?> cm)
Returns the language-specific metadata on the specified class.
|
protected XmlBeanPropertyMeta |
getXmlBeanPropertyMeta(BeanPropertyMeta bpm)
Returns the language-specific metadata on the specified bean property.
|
protected boolean |
isLooseCollections()
Configuration property: Collections should be serialized and parsed as loose collections.
|
protected boolean |
isTrimWhitespace()
Configuration property: Trim whitespace from text elements.
|
ObjectMap |
toMap()
Returns the properties defined on this bean context as a simple map for debugging purposes.
|
createPipe, getFileCharset, getStreamCharset, isReaderParser
cast, convertAttrToType, doParseIntoCollection, doParseIntoMap, getClassMeta, getDebugOutputLines, getInputAsString, getJavaMethod, getLastLocation, getListener, getListener, getListenerClass, getOuter, getPosition, isAutoCloseStreams, isStrict, isTrimStrings, isUnbuffered, mark, onUnknownProperty, parse, parse, parse, parse, parse, parse, parseArgs, parseIntoCollection, parseIntoMap, setCurrentClass, setCurrentProperty, setName, setParent, setPipe, trim, trim, unmark, unswap
_class, checkForWarnings, convertToMemberType, convertToMemberType, convertToType, convertToType, convertToType, getArgsClassMeta, getBeanClassVisibility, getBeanConstructorVisibility, getBeanDictionaryClasses, getBeanFieldVisibility, getBeanFilters, getBeanMeta, getBeanMethodVisibility, getBeanRegistry, getBeanTypePropertyName, getBeanTypePropertyName, getBpi, getBpro, getBpwo, getBpx, getClassMeta, getClassMeta, getClassMetaForObject, getClassMetaForObject, getExamples, getImplClasses, getLocale, getMediaType, getNotBeanClasses, getNotBeanPackagesNames, getNotBeanPackagesPrefixes, getPojoSwaps, getPropertyNamer, getSchema, getStringBuilder, getTimeZone, getTimeZoneId, isBean, isBean, isBeanMapPutReturnsOldValue, isBeansRequireDefaultConstructor, isBeansRequireSerializable, isBeansRequireSettersForGetters, isBeansRequireSomeProperties, isDebug, isFluentSetters, isIgnoreInvocationExceptionsOnGetters, isIgnoreInvocationExceptionsOnSetters, isIgnorePropertiesWithoutSetters, isIgnoreUnknownBeanProperties, isIgnoreUnknownNullBeanProperties, isSortProperties, isUseEnumNames, isUseInterfaceProxies, isUseJavaBeanIntrospector, newBean, newBean, newBeanMap, newBeanMap, object, returnStringBuilder, string, toArray, toBeanMap, toBeanMap
addToCache, addToCache, addWarning, getClassProperty, getFromCache, getInstanceArrayProperty, getInstanceProperty, getLogger, getProperties, getProperty, getProperty, getProperty, getPropertyKeys, getWarnings, hasProperty, hasWarnings, toString
protected RdfParserSession(RdfParser ctx, ParserSessionArgs args)
ctx
- The context creating this session object.
The context contains all the configuration settings for this object.args
- Runtime session arguments.protected <T> T doParse(ParserPipe pipe, ClassMeta<T> type) throws IOException, ParseException, ExecutableException
ParserSession
Subclasses are expected to implement this method.
doParse
in class ParserSession
T
- The class type of the object to create.pipe
- Where to get the input from.type
- The class type of the object to create.
If Object.class
, object type is based on what's being parsed.
For example, when parsing JSON text, it may return a IOException
- Thrown by underlying stream.ParseException
- Malformed input encountered.ExecutableException
- Exception occurred on invoked constructor/method/field.protected final RdfCollectionFormat getCollectionFormat()
RdfCommon.RDF_collectionFormat
protected final Namespace getJuneauBpNs()
RdfCommon.RDF_juneauBpNs
protected final Namespace getJuneauNs()
RdfCommon.RDF_juneauNs
protected final String getLanguage()
RdfCommon.RDF_language
protected final boolean isLooseCollections()
RdfCommon.RDF_looseCollections
protected final Map<String,Object> getJenaProperties()
protected final boolean isTrimWhitespace()
RdfParser.RDF_trimWhitespace
protected RdfClassMeta getRdfClassMeta(ClassMeta<?> cm)
cm
- The class to return the metadata on.protected RdfBeanMeta getRdfBeanMeta(BeanMeta<?> bm)
bm
- The bean to return the metadata on.protected RdfBeanPropertyMeta getRdfBeanPropertyMeta(BeanPropertyMeta bpm)
bpm
- The bean property to return the metadata on.protected XmlBeanPropertyMeta getXmlBeanPropertyMeta(BeanPropertyMeta bpm)
bpm
- The bean property to return the metadata on.public ObjectMap toMap()
Session
toMap
in class ReaderParserSession
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.