Home
Categories
Dictionary
Download
Project Details
Changes Log
FAQ
License

Empty query


The EmptySparqlRequest specifies an empty request, which is guaranteed to return non result regardless of the Ontology.

The request has the following content:
   SELECT *
   WHERE {
      ?o rdf:type owl:Thing .
   }
   LIMIT 0
To create an empty request, you can use one of the following constructors: For example suppose the following code:
   EmptyRequest request = new EmptyRequest();
   String sparql = request.getSPARQL();
The result will be:
   SELECT *
   WHERE {
      ?o rdf:type owl:Thing .
   }
   LIMIT 0

Invalid request

The InvalidSparqlRequest specifies an invalid request, which is also guaranteed to return non result regardless of the Ontology. The only difference with an empty request is that the InvalidSparqlRequest.isWellFormed() returns false.

For example suppose the following code:
   InvalidSparqlRequest request = new InvalidSparqlRequest();
   String sparql = request.getSPARQL();
The result will be:
   SELECT *
   WHERE {
      ?o rdf:type owl:Thing .
   }
   LIMIT 0

Notes

  1. ^ See

Categories: General

Copyright 2025 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence

Project Web Hosted by SourceForge.net Copyright 1999-2010 - Geeknet, Inc., All Rights Reserved About - Legal - Help