我正在使用猫头鹰文件作为输入,并在servlet页面中执行SPARQL查询。
Model modelFile = FileManager.get().loadModel
("C:\\Users\\admin\\IdeaProjects\\SampleWebProject\\src\\main\\java
\\OWLComparison\\CVDetails.rdf");
String query =
"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>" +
"PREFIX owl: <http://www.w3.org/2002/07/owl#> " +
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> " +
"PREFIX ns0: <http://www.Jobsurveillance.com/CV#> " +
"SELECT (str(?object) as ?label) " +
"(str(?object2) as ?label2) " +
"(str (?phoneNumobj) as ?label3) " +
"(str (?degreeobj) as ?label4) " +
"(str (?jobcatObj) as ?label5) WHERE { " +
" ?person ns0:Full_Name ?object ." +
" ?person ns0:Email_Id ?object2 ." +
" ?person ns0:Phone_Number ?phoneNumobj ." +
" ?person ns0:Degree ?degreeobj ." +
" ?person ns0:Job_Category ?jobcatObj ." +
" filter(regex(?jobcatObj, \"" + jobCatname + "\"))" +
"}";
在上面的代码中,我使用单个输入文件进行查询操作。现在,我想输入另一个猫头鹰文件,并使用这两个文件进行查询。有人可以帮我解决这个问题吗?预先感谢!