Class RDFStreamBase

  • All Implemented Interfaces:
    RDFStream, java.io.Closeable, java.lang.AutoCloseable

    public class RDFStreamBase
    extends java.lang.Object
    implements RDFStream
    Author:
    Evren Sirin
    • Constructor Summary

      Constructors 
      Constructor Description
      RDFStreamBase()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long bytesRead()  
      void close()  
      long estimatedCount()  
      Resource getContext()
      Returns the default context associated with this stream or null if there is no default context.
      java.lang.String getName()
      Returns the name of this stream.
      boolean hasContext()
      Returns true either if this stream has a non-null context or the statements generated by this stream has contexts.
      long length()  
      void parse​(RDFHandler theHandler)
      Parses the stream and passes the statements to the given handler.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RDFStreamBase

        public RDFStreamBase()
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • hasContext

        public boolean hasContext()
        Description copied from interface: RDFStream
        Returns true either if this stream has a non-null context or the statements generated by this stream has contexts.
        Specified by:
        hasContext in interface RDFStream
      • getName

        public java.lang.String getName()
        Description copied from interface: RDFStream
        Returns the name of this stream. If the stream is backed by a file this will return the file's name. Otherwise it might be an auto-generated name or some other (not necessarily unique) name.
        Specified by:
        getName in interface RDFStream
      • getContext

        public Resource getContext()
        Description copied from interface: RDFStream
        Returns the default context associated with this stream or null if there is no default context. Note that, the statements that will be sent to the handler may not be using this context and the user of this stream should make sure the context information is used correctly.
        Specified by:
        getContext in interface RDFStream
      • length

        public long length()
        Specified by:
        length in interface RDFStream