-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ issue #34 ] SPARQL results pagination
- Loading branch information
agazzarini
committed
Mar 16, 2015
1 parent
cb05291
commit b6e21bf
Showing
15 changed files
with
5,604 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
solrdf/src/main/java/org/gazzax/labs/solrdf/graph/GraphEventConsumer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package org.gazzax.labs.solrdf.graph; | ||
|
||
import org.apache.solr.search.DocSet; | ||
|
||
import com.hp.hpl.jena.graph.Triple; | ||
|
||
/** | ||
* An optional consumer that drives and listens the graph parsing consumption. | ||
* | ||
* @author Andrea Gazzarini | ||
* @since 1.0 | ||
*/ | ||
public interface GraphEventConsumer { | ||
/** | ||
* A new triples has been built. | ||
* Note that if a preceding call to {@link #requireTripleBuild()} returned false, then | ||
* the given Triple can be just a placeholder ({@link DeepPagingIterator#DUMMY_TRIPLE}). | ||
* | ||
* @param triple the triple. | ||
* @param docId the (internal Lucene) document identifier. | ||
* @see DeepPagingIterator#DUMMY_TRIPLE | ||
*/ | ||
void afterTripleHasBeenBuilt(Triple triple, int docId); | ||
|
||
/** | ||
* While parsing the graph the consumer can or cannot be interested in effectively building a triple. | ||
* This method will be called each time a graph needs to create a new Triple representation. | ||
* | ||
* For example, if we are just collecting the docIds, the consumer can control the effective triple creation | ||
* therefore avoiding a lot of temporary (and unuseful) objects. | ||
* | ||
* @return if the current triple match must be represented by a new {@link Triple} instance. | ||
*/ | ||
boolean requireTripleBuild(); | ||
|
||
/** | ||
* The consumer is informed about the {@link DocSet} associated with the current search. | ||
* This callbacks happens once per query. | ||
* | ||
* @param docSet the {@link DocSet} associated with the current search. | ||
*/ | ||
void onDocSet(DocSet docSet); | ||
} |
7 changes: 0 additions & 7 deletions
7
solrdf/src/main/java/org/gazzax/labs/solrdf/graph/GraphEventListener.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.