@@ -0,0 +1,1283 @@
+package eu.stratuslab.marketplace.server.resources;%0A%0Aimport java.util.logging.Level;%0A%0Aimport org.openrdf.query.QueryLanguage;%0Aimport org.restlet.data.Form;%0Aimport org.restlet.data.MediaType;%0Aimport org.restlet.representation.Representation;%0Aimport org.restlet.representation.StringRepresentation;%0Aimport org.restlet.resource.Get;%0A%0A/**%0A * This resource represents a query on the rdf data%0A */%0Apublic class QueryResource extends BaseResource %7B%0A%09%0A%09/**%0A     * Returns a listing of all endorsers.%0A     */%0A%09@Get(%22xml%22)%0A%09public Representation toXml() %7B%0A%09%09Form queryForm = getRequest().getResourceRef().getQueryAsForm();%0A%09%09String queryString = queryForm.getFirstValue(%22query%22);%0A%09%09String queryLanguage = queryForm.getFirstValue(%22language%22, %22sparql%22);%0A%09%09%0A%09%09logger.log(Level.INFO, queryString);%0A%09%09%0A%09%09// Generate the right representation according to its media type.%0A%09%09String results = %22%22;%0A%09%09if(queryLanguage.equals(%22sparql%22))%7B%0A%09%09    results = query(queryString, QueryLanguage.SPARQL);%0A%09%09%7D else if (queryLanguage.equals(%22serql%22))%7B%0A%09%09%09results = query(queryString, QueryLanguage.SERQL);%0A%09%09%7D%0A%09%09%0A%09%09StringRepresentation representation = new StringRepresentation(results, %0A%09%09%09%09MediaType.APPLICATION_XML);%0A%09%09%0A%09%09// Returns the XML representation of this document.%0A%09%09return representation;%0A     %7D%0A%09%0A%7D%0A    

Add some more html output and a Query resource