KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > rdql > QueryResults


1 /*
2  * (c) Copyright 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
3  * [See end of file]
4  */

5
6
7 package com.hp.hpl.jena.rdql;
8
9 import java.util.*;
10
11 /** Results from a query in a "ResultSet"-like manner.
12  * Each row corresponds to a set of bindings which fulfil the conditions
13  * of the query. Access to the results is by variable name.
14  *
15  * @see Query
16  * @see QueryEngine
17  * @see ResultBindingImpl
18  * @see QueryResultsStream
19  *
20  * @author Andy Seaborne
21  * @version $Id: QueryResults.java,v 1.9 2005/02/21 12:15:25 andy_seaborne Exp $
22  */

23
24 public interface QueryResults extends java.util.Iterator JavaDoc
25 {
26     /**
27      * @throws UnsupportedOperationException Always thrown.
28      */

29
30     public void remove() throws java.lang.UnsupportedOperationException JavaDoc ;
31
32     /**
33      * Is there another possibility?
34      */

35     public boolean hasNext() ;
36
37     /** Moves onto the next result possibility.
38      * The returned object should be of class ResultBindingImpl
39      */

40     
41     public Object JavaDoc next() ;
42
43     /** Close the results iterator and stop query evaluation as soon as convenient.
44      * It is important to close query result iterators inorder to release
45      * resources such as working memory and to stop the query execution.
46      * Some storage subsystems require explicit ends of operations and this
47      * operation will cause those to be called where necessary.
48      */

49
50     public void close() ;
51
52     /** Return the "row" number for the current iterator item
53      */

54     public int getRowNumber() ;
55     
56     /** Get the variable names for the projection
57      */

58     public List getResultVars() ;
59
60     /** Convenience function to consume a query.
61      * Returns a list of {@link ResultBindingImpl}s.
62      *
63      * @return List
64      * @deprecated Use {@link QueryResultsMem} to get all the results of a query.
65      */

66
67     public List getAll() ;
68
69 }
70 /*
71  * (c) Copyright 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
72  * All rights reserved.
73  *
74  * Redistribution and use in source and binary forms, with or without
75  * modification, are permitted provided that the following conditions
76  * are met:
77  * 1. Redistributions of source code must retain the above copyright
78  * notice, this list of conditions and the following disclaimer.
79  * 2. Redistributions in binary form must reproduce the above copyright
80  * notice, this list of conditions and the following disclaimer in the
81  * documentation and/or other materials provided with the distribution.
82  * 3. The name of the author may not be used to endorse or promote products
83  * derived from this software without specific prior written permission.
84  *
85  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
86  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
87  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
88  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
89  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
90  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
91  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
92  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
93  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
94  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
95  */

96
97
Popular Tags