Examples of SparqlEndpoint


Examples of org.apache.marmotta.ldclient.endpoint.rdf.SPARQLEndpoint

    @Ignore
    @Test
    public void testDBPedia() throws Exception {

        ClientConfiguration config = new ClientConfiguration();
        config.addEndpoint(new SPARQLEndpoint("DBPedia (SPARQL)","http://dbpedia.org/sparql","^http://dbpedia\\.org/resource/.*"));

        LDClientService ldclient = new TestLDClient(new LDClient(config));

        String uriBerlin = "http://dbpedia.org/resource/Berlin";
        ClientResponse respBerlin = ldclient.retrieveResource(uriBerlin);
View Full Code Here

Examples of org.apache.marmotta.ldclient.endpoint.rdf.SPARQLEndpoint

    @Ignore
    @Test
    public void testDBPedia() throws Exception {

        ClientConfiguration config = new ClientConfiguration();
        config.addEndpoint(new SPARQLEndpoint("DBPedia (SPARQL)","http://dbpedia.org/sparql","^http://dbpedia\\.org/resource/.*"));

        LDClientService ldclient = new TestLDClient(new LDClient(config));

        String uriBerlin = "http://dbpedia.org/resource/Berlin";
        ClientResponse respBerlin = ldclient.retrieveResource(uriBerlin);
View Full Code Here

Examples of org.fundacionctic.su4j.endpoint.SparqlEndpoint

  private static final Logger logger = Logger.getLogger(SparqlServlet.class);
  public static final String GRAPH = "http://example.org/graph";
 
  @Override
  public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException {   
    SparqlEndpoint endpoint = EndpointFactory.createDefaultSparqlEndpoint();
    Model model = (Model)this.getServletContext().getAttribute(StartupServlet.MODEL);
    endpoint.setDefaultNamedGraph(model);
    endpoint.setRequest(req);
    endpoint.setResponse(res);
    if (endpoint.isQuery()) {
      try {
        logger.info("Executing SPARQL query...");
        endpoint.query();
      } catch (Exception e) {
        logger.error(e.getMessage());
        endpoint.renderError(e);
      }
    } else {
      logger.info("Showing SPARQL form");
      endpoint.renderForm("SU4J SPARQL end-point example", "SELECT * WHERE { ?s ?p ?o }");
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.