Class ResultSetPeeking

  • All Implemented Interfaces:
    java.util.Iterator<QuerySolution>, org.apache.jena.atlas.lib.Closeable, ResultSet, ResultSetPeekable

    public class ResultSetPeeking
    extends java.lang.Object
    implements ResultSetPeekable, org.apache.jena.atlas.lib.Closeable
    A wrapper around another result set that provides peek capabilities
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static boolean warnOnSyncErrors
      Controls whether a log warning is printed if someone modifies the underlying result set externally to us
    • Constructor Summary

      Constructors 
      Constructor Description
      ResultSetPeeking​(ResultSet results)
      Creates a peeking wrapper around another result set
    • Field Detail

      • warnOnSyncErrors

        public static boolean warnOnSyncErrors
        Controls whether a log warning is printed if someone modifies the underlying result set externally to us
    • Constructor Detail

      • ResultSetPeeking

        public ResultSetPeeking​(ResultSet results)
        Creates a peeking wrapper around another result set
        Parameters:
        results - Inner results
    • Method Detail

      • hasNext

        public boolean hasNext()
        Description copied from interface: ResultSet
        Is there another result?
        Specified by:
        hasNext in interface java.util.Iterator<QuerySolution>
        Specified by:
        hasNext in interface ResultSet
      • getRowNumber

        public int getRowNumber()
        Description copied from interface: ResultSet
        Return the "row" number for the current iterator item
        Specified by:
        getRowNumber in interface ResultSet
      • getResultVars

        public java.util.List<java.lang.String> getResultVars()
        Description copied from interface: ResultSet
        Get the variable names for the projection. Not all query solutions from a result have every variable defined.
        Specified by:
        getResultVars in interface ResultSet
      • getResourceModel

        public Model getResourceModel()
        Description copied from interface: ResultSet
        Get the model that resources are created against - may be null
        Specified by:
        getResourceModel in interface ResultSet
      • close

        public void close()
        Specified by:
        close in interface org.apache.jena.atlas.lib.Closeable