// System.out.println("quicksearch");
}
@Override
public void performingFullSearch(String searchText) {
SearchableObjectArray results = new SearchableObjectArray();
try {
String queryMovieText = "SELECT DISTINCT ?uri ?title WHERE {" +
"?uri rdf:type h2mdb:Film . " +
"?uri h2mdb:name ?title . " +
"FILTER (REGEX(STR(?title), \"" + searchText + "\", \"i\")) " +
"}";
ResultSet resultSetMovies = OntologyQueryer.resultQuery(queryMovieText);
while (resultSetMovies.hasNext()) {
QuerySolution item1 = resultSetMovies.next();
results.add(new Movie(item1.get("uri").toString(), item1.get("title").toString().replace("@en", "")));
}
String queryActorText = "SELECT DISTINCT ?uri ?title WHERE { " +
"?uri rdf:type h2mdb:Actor . " +
"?uri h2mdb:name ?title . " +
"FILTER (REGEX(STR(?title), \"" + searchText + "\", \"i\")) " +
"}";
ResultSet resultSetActors = OntologyQueryer.resultQuery(queryActorText);
while (resultSetActors.hasNext()) {
QuerySolution item2 = resultSetActors.next();
results.add(new Actor(item2.get("uri").toString(), item2.get("title").toString().replace("@en", "")));
}
Collections.sort(results, new SearchableComparator());
window.getHistory().add(new SearchResultView(window.getPanelCount(), new SearchController(), results));
} catch (NullPointerException e) {