public Repository getDataRepository(){
return dataRepository;
}
public Map<Value, ComplexProvenance> metaEvaluateQuery(String queryString) throws RepositoryException{
SesameSparqlEvaluator eval = new SesameSparqlEvaluator(dataRepository);
if (this.nsr == null) {
RepositoryResult<Namespace> nsi = dataRepository.getConnection().getNamespaces();
Namespace ns;
this.nsr = new SPARQLNSResolver();
while (nsi.hasNext()){
ns = nsi.next();
this.nsr.addPrefixBinding(ns.getPrefix(), ns.getName());
}
}
Hashtable prologPrefixTable = new Hashtable();
if (queryString.contains(_PREFIX)){
int i = queryString.indexOf(_SELECT);
if (i != -1){
parsePrologPrefixDeclarations(queryString.substring(0, i), prologPrefixTable);
}
}
Hashtable defaultPrefixTable = nsr.getPrefixTable();
Iterator iter = defaultPrefixTable.keySet().iterator();
while (iter.hasNext()) {
String prefix = (String)iter.next();
if (!prologPrefixTable.containsKey(prefix)){
queryString = "PREFIX " + prefix + ": <" + (String)defaultPrefixTable.get(prefix) + ">" + NL + queryString;
}
}
Map<Set<Value>, ComplexProvenance> metadata = eval.evaluate(queryString);
Map<Value, ComplexProvenance> provenance = new HashMap<Value, ComplexProvenance>();
java.util.Iterator<Value> it;
for (Set<Value> values: metadata.keySet()){
it = values.iterator();