1 22 23 28 29 package org.xquark.mapper.storage; 30 31 import java.sql.SQLException ; 32 33 import org.xquark.mapper.RepositoryException; 34 import org.xquark.xml.xdbc.XMLDBCException; 35 36 43 public class InteractiveQueryBuilder extends QueryBuilder 44 { 45 private static final String RCSRevision = "$Revision: 1.1 $"; 46 private static final String RCSName = "$Name: $"; 47 48 49 public InteractiveQueryBuilder(_RepositoryCollection collection, VarInfoSet varInfo) throws XMLDBCException 50 { 51 super(collection, varInfo); 52 try 53 { 54 55 tuplePool = qTuplePool = new InteractiveQueryExplorer(collection); 56 qTuplePool.initExploration(varInfo, collection.getRepositoryConnection().getConnection()); 58 } 59 catch (SQLException e) 60 { 61 throw new RepositoryException(RepositoryException.DB_ERROR, "JDBC error while initializing tuple explorer."); 62 } 63 } 64 65 protected void initNewResult(int rank) throws XMLDBCException 66 { 67 try 68 { 69 qTuplePool.reset(); 70 71 ((InteractiveQueryExplorer)qTuplePool).execQuery(varFirst, varLast, currentPath); 73 74 qTuplePool.lookup(); 76 } 77 catch (SQLException e) 78 { 79 throw new RepositoryException(RepositoryException.DB_ERROR, 80 "Database error while performing reconstruction query", e); 81 } 82 } 83 } 84
| Popular Tags
|