<%@ page contentType="text/html;charset=windows-1252"%>
<%@ page import= "java.sql.*" %>
<%@ page import= "project1.*" %>
<%@ page import= "java.sql.CallableStatement" %>
<%@ page import= "oracle.jdbc.OracleTypes" %>
<%@ page import= "oracle.jdbc.driver.*" %>
try
{
String selection = "s";
String triple = "(?S ?P ?O)";
String urls = "(urlname='http://localhost/regression.rdf') OR (urlname='http://localhost/technical_girls_and_guys.rdf')";
String query_string = "plat";
int to_ = 1;
int from_ = 10;
JDBConnection jdbc = new JDBConnection();
CallableStatement cstmt = null;
ResultSet cursor = null;
cstmt = jdbc.conn.prepareCall("{call UOC_RDF_QUERY.BQUERY(?,?,?,?,?,?,?)}");
cstmt.setString(1,selection);
cstmt.setString(2,triple);
cstmt.setString(3,urls);
cstmt.setString(4,query_string);
cstmt.setInt(5,to_);
cstmt.setInt(6,from_);
cstmt.registerOutParameter(7,OracleTypes.CURSOR);
cstmt.execute();
cursor = (ResultSet) cstmt.getObject(7);
while (cursor.next())
{
System.out.println("Record: "+cursor.getString(1));
%>
<%
}
cstmt.close();
jdbc.conn.close();
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
%>