Interface RdfSourceFromResource
- All Superinterfaces:
NodeTupleSource
,RdfLikeSource
,RdfSource
- All Known Implementing Classes:
RdfSourceFromResourceImpl
Abstraction of a source of RDF. Provides methods to access the data
as plain triples / quads or aggregates of subject-/graph-grouped models and datasets.
Graph and DatasetGraph are not part of the interface because those
would require additional kryo registrations which does not seem worth it.
Note: Ideally the methods
RdfSource.asModels()
and RdfSource.asDatasets()
should only aggregate consecutive triples / quads
into such objects. This is the case with InputFormat
s based on
RecordReaderGenericBase
.
However, several fallback implementations aggregate across
the whole RDD which leads to somewhat inconsistent behavior.
For this reason, the RdfSourceFactory
should be extended with
methods that provide more control over the semantics of implementations of
this interface.- Author:
- Claus Stadler
-
Method Summary
Modifier and TypeMethodDescriptiondefault int
org.apache.jena.riot.Lang
getLang()
Get the language of the source; may have been probed for by an RdfSourceFactoryMethods inherited from interface net.sansa_stack.spark.io.rdf.input.api.RdfLikeSource
peekDeclaredPrefixes
-
Method Details
-
getLang
org.apache.jena.riot.Lang getLang()Get the language of the source; may have been probed for by an RdfSourceFactory -
getComponentCount
default int getComponentCount()- Specified by:
getComponentCount
in interfaceNodeTupleSource
-