Package org.apache.juneau.marshall.jena
Class RdfParser
java.lang.Object
org.apache.juneau.marshall.Context
org.apache.juneau.marshall.MarshallingContextable
org.apache.juneau.marshall.parser.Parser
org.apache.juneau.marshall.parser.ReaderParser
org.apache.juneau.marshall.jena.RdfParser
- All Implemented Interfaces:
RdfMetaProvider,XmlMetaProvider
- Direct Known Subclasses:
JsonLdParser,N3Parser,NQuadsParser,NTripleParser,RdfJsonParser,RdfXmlParser,TriGParser,TriXParser,TurtleParser
Parses RDF into POJOs.
Behavior-specific subclasses
The following direct subclasses are provided for language-specific parsers:
-
RdfXmlParser- RDF/XML and RDF/XML-ABBREV. -
NTripleParser- N-TRIPLE. -
TurtleParser- TURTLE. -
N3Parser- N3.
Notes:
- This class is thread safe and reusable.
See Also:
- {doc jmr.RdfDetails}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRdfParser.Builder<SELF extends RdfParser.Builder<SELF>>Builder class.static final classNested classes/interfaces inherited from class org.apache.juneau.marshall.parser.Parser
Parser.Null -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final RdfCollectionFormatprotected final Namespaceprotected final Namespaceprotected final Stringprotected final booleanprotected final booleanFields inherited from class org.apache.juneau.marshall.parser.Parser
autoCloseStreams, consumes, debugOutputLines, listener, nulls, trimStrings, unbufferedFields 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 TypeMethodDescriptioncopy()Creates a builder from this context object.static RdfParser.Builder<?>create()Creates a new builder for this object.Create a session builder based on the properties defined on this context.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.getRdfBeanMeta(BeanMeta<?> bm) Returns the language-specific metadata on the specified bean.Returns the language-specific metadata on the specified bean property.getRdfClassMeta(ClassMeta<?> cm) Returns the language-specific metadata on the specified class.Returns a session to use for this context.getXmlBeanMeta(BeanMeta<?> bm) Returns the language-specific metadata on the specified bean.Returns the language-specific metadata on the specified bean property.getXmlClassMeta(ClassMeta<?> cm) Returns the language-specific metadata on the specified class.protected final booleanCollections should be serialized and parsed as loose collections.protected final booleanTrim whitespace from text elements.Returns the properties on this bean as a map for debugging.Methods inherited from class org.apache.juneau.marshall.parser.ReaderParser
getStreamCharset, isReaderParserMethods inherited from class org.apache.juneau.marshall.parser.Parser
canHandle, createParserBuilder, doRead, getDebugOutputLines, getListener, getMediaTypes, getNulls, getPrimaryMediaType, isAutoCloseStreams, isTrimStrings, isUnbuffered, read, read, read, read, read, read, readArgs, readIntoCollection, readIntoMap, readWithOuterMethods inherited from class org.apache.juneau.marshall.MarshallingContextable
getDurationFormat, getMarshallingContext, getPeriodFormatMethods inherited from class org.apache.juneau.marshall.Context
createBuilder, getAnnotationProvider, init, isDebug, toString
-
Field Details
-
looseCollections
-
trimWhitespace
-
juneauBpNs
-
juneauNs
-
collectionFormat
-
language
-
-
Constructor Details
-
RdfParser
Constructor.- Parameters:
builder- The builder for this object.
Cannot benull .
-
-
Method Details
-
create
Creates a new builder for this object.- Returns:
- A new builder.
-
copy
Description copied from class:ContextCreates a builder from this context object.Builders are used to define new contexts (e.g. serializers, parsers) based on existing configurations.
-
createSession
Description copied from class:ContextCreate a session builder based on the properties defined on this context.Use this method for creating sessions where you want to override basic settings. Otherwise, use
Context.getSession()directly.- Overrides:
createSessionin classReaderParser- Returns:
- A new session builder.
-
getRdfBeanMeta
Description copied from interface:RdfMetaProviderReturns the language-specific metadata on the specified bean.- Specified by:
getRdfBeanMetain interfaceRdfMetaProvider- Parameters:
bm- The bean to return the metadata on.- Returns:
- The metadata.
-
getRdfBeanPropertyMeta
Description copied from interface:RdfMetaProviderReturns the language-specific metadata on the specified bean property.- Specified by:
getRdfBeanPropertyMetain interfaceRdfMetaProvider- Parameters:
bpm- The bean property to return the metadata on.- Returns:
- The metadata.
-
getRdfClassMeta
Description copied from interface:RdfMetaProviderReturns the language-specific metadata on the specified class.- Specified by:
getRdfClassMetain interfaceRdfMetaProvider- Parameters:
cm- The class to return the metadata on.- Returns:
- The metadata.
-
getSession
Description copied from class:ContextReturns a session to use for this context.Note that subclasses may opt to return a reusable non-modifiable session.
- Overrides:
getSessionin classReaderParser- Returns:
- A new session object.
-
getXmlBeanMeta
Description copied from interface:XmlMetaProviderReturns the language-specific metadata on the specified bean.- Specified by:
getXmlBeanMetain interfaceXmlMetaProvider- Parameters:
bm- The bean to return the metadata on.- Returns:
- The metadata.
-
getXmlBeanPropertyMeta
Description copied from interface:XmlMetaProviderReturns the language-specific metadata on the specified bean property.- Specified by:
getXmlBeanPropertyMetain interfaceXmlMetaProvider- Parameters:
bpm- The bean property to return the metadata on.- Returns:
- The metadata.
-
getXmlClassMeta
Description copied from interface:XmlMetaProviderReturns the language-specific metadata on the specified class.- Specified by:
getXmlClassMetain interfaceXmlMetaProvider- Parameters:
cm- The class to return the metadata on.- Returns:
- The metadata.
-
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:
- 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:
-
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:
-
properties
Description copied from class:ContextReturns the properties on this bean as a map for debugging.- Overrides:
propertiesin classReaderParser- Returns:
- The properties on this bean as a map for debugging.
-