package org.fiteagle.core.repo;

import java.util.logging.Logger;

import com.hp.hpl.jena.query.QueryExecution;
import com.hp.hpl.jena.query.QueryExecutionFactory;
import com.hp.hpl.jena.query.QueryParseException;
import com.hp.hpl.jena.query.ResultSet;
import com.hp.hpl.jena.rdf.model.Model;

public class QueryExecuter {
  
  private static final String FUSEKI_SERVICE = "http://localhost:3030/ds/query";
  
  @SuppressWarnings("unused")
  private static Logger LOGGER = Logger.getLogger(QueryExecuter.class.toString());
  
  public static ResultSet executeSparqlSelectQuery(String queryString) throws QueryParseException{
    ResultSet rs = null;
    QueryExecution qe = QueryExecutionFactory.sparqlService(FUSEKI_SERVICE, queryString);
    rs = qe.execSelect();
    return rs;
  }
  
  public static Model executeSparqlDescribeQuery(String queryString) throws QueryParseException{
    Model rs = null;
    QueryExecution qe = QueryExecutionFactory.sparqlService(FUSEKI_SERVICE, queryString);
    rs = qe.execDescribe();
    return rs;
  }
  
}

@@ -60,16 +60,68 @@
 ogger;%0A%0A
+import org.fiteagle.api.core.MessageBusMsgFactory;%0A%0A
 import c
@@ -1066,24 +1066,447 @@
 Describe();%0A
+    %0A    //todo: find a better way to set our own common known prefixes (e.g. omn, wgs, ...)%0A    rs.removeNsPrefix(%22j.0%22);%0A    rs.removeNsPrefix(%22j.1%22);%0A    rs.removeNsPrefix(%22j.2%22);%0A    rs.setNsPrefix(%22omn%22, %22http://fiteagle.org/ontology#%22);%0A    rs.setNsPrefix(%22wgs%22, %22http://www.w3.org/2003/01/geo/wgs84_pos#%22);%0A    rs.setNsPrefix(%22foaf%22, %22http://xmlns.com/foaf/0.1/%22);%0A%0A    //MessageBusMsgFactory.setCommonPrefixes(rs);%0A
     return r

deleted j. in prefixes