Class RdfSourceCollectionImpl

java.lang.Object
net.sansa_stack.spark.io.rdf.input.impl.RdfSourceCollectionImpl
All Implemented Interfaces:
NodeTupleSource, RdfLikeSource, RdfSource, RdfSourceCollection

public class RdfSourceCollectionImpl extends Object implements RdfSourceCollection
  • Field Details

    • MIXED_TRIPLE

      public static final org.apache.jena.riot.Lang MIXED_TRIPLE
    • MIXED_QUAD

      public static final org.apache.jena.riot.Lang MIXED_QUAD
    • sparkSession

      protected org.apache.spark.sql.SparkSession sparkSession
    • members

      protected Collection<RdfSource> members
  • Constructor Details

    • RdfSourceCollectionImpl

      public RdfSourceCollectionImpl(org.apache.spark.sql.SparkSession sparkSession)
    • RdfSourceCollectionImpl

      public RdfSourceCollectionImpl(org.apache.spark.sql.SparkSession sparkSession, Collection<RdfSource> members)
  • Method Details

    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface RdfSourceCollection
    • add

      public void add(RdfSource rdfSource)
      Specified by:
      add in interface RdfSourceCollection
    • getMembers

      public Collection<RdfSource> getMembers()
      Specified by:
      getMembers in interface RdfSourceCollection
    • getComponentCount

      public int getComponentCount()
      Specified by:
      getComponentCount in interface NodeTupleSource
    • union

      public static <I, T> org.apache.spark.rdd.RDD<T> union(org.apache.spark.sql.SparkSession sparkSession, Collection<I> members, Function<I,org.apache.spark.rdd.RDD<T>> mapper)
    • asTriples

      public org.apache.spark.rdd.RDD<org.apache.jena.graph.Triple> asTriples()
      Description copied from interface: RdfSource
      Return the backing loader; null if unknown
      Specified by:
      asTriples in interface RdfSource
    • asQuads

      public org.apache.spark.rdd.RDD<org.apache.jena.sparql.core.Quad> asQuads()
      Specified by:
      asQuads in interface RdfSource
    • asModels

      public org.apache.spark.rdd.RDD<org.apache.jena.rdf.model.Model> asModels()
      Specified by:
      asModels in interface RdfSource
    • asDatasets

      public org.apache.spark.rdd.RDD<org.aksw.jenax.arq.dataset.api.DatasetOneNg> asDatasets()
      Description copied from interface: RdfSource
      A stream of datasets having one named graph each
      Specified by:
      asDatasets in interface RdfSource
    • peekDeclaredPrefixes

      public org.apache.jena.riot.system.PrefixMap peekDeclaredPrefixes()
      Description copied from interface: RdfLikeSource
      At present this creates a model holding an RDF sample based on a file's starting bytes. May be changed to PrefixMap
      Specified by:
      peekDeclaredPrefixes in interface RdfLikeSource