Class CollectorStreamRDF

  • All Implemented Interfaces:
    StreamRDF

    public class CollectorStreamRDF
    extends java.lang.Object
    implements StreamRDF
    StreamRDF implementations which store received triples and quads in a Collection. The resulting collection can be retrieved via the getTriples() and getQuads() methods. The implementations are suitable for single-threaded parsing, for use with small data or distributed computing frameworks (e.g. Hadoop) where the overhead of creating many threads for a push-pull parser setup is significant.
    • Constructor Detail

      • CollectorStreamRDF

        public CollectorStreamRDF()
    • Method Detail

      • start

        public void start()
        Description copied from interface: StreamRDF
        Start processing
        Specified by:
        start in interface StreamRDF
      • finish

        public void finish()
        Description copied from interface: StreamRDF
        Finish processing
        Specified by:
        finish in interface StreamRDF
      • triple

        public void triple​(Triple triple)
        Description copied from interface: StreamRDF
        Triple emitted
        Specified by:
        triple in interface StreamRDF
      • quad

        public void quad​(Quad quad)
        Description copied from interface: StreamRDF
        Quad emitted
        Specified by:
        quad in interface StreamRDF
      • base

        public void base​(java.lang.String base)
        Description copied from interface: StreamRDF
        base declaration seen
        Specified by:
        base in interface StreamRDF
      • prefix

        public void prefix​(java.lang.String prefix,
                           java.lang.String iri)
        Description copied from interface: StreamRDF
        prefix declaration seen
        Specified by:
        prefix in interface StreamRDF
      • getPrefixes

        public PrefixMap getPrefixes()
      • getBaseIri

        public java.lang.String getBaseIri()
      • getTriples

        public java.util.List<Triple> getTriples()
      • getQuads

        public java.util.List<Quad> getQuads()