Java Code Examples for org.eclipse.rdf4j.query.MalformedQueryException#getMessage()
The following examples show how to use
org.eclipse.rdf4j.query.MalformedQueryException#getMessage() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RDF4JProtocolSession.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 6 votes |
public void getRepositoryList(TupleQueryResultHandler handler) throws IOException, TupleQueryResultHandlerException, RepositoryException, UnauthorizedException, QueryInterruptedException { checkServerURL(); HttpGet method = applyAdditionalHeaders(new HttpGet(Protocol.getRepositoriesLocation(serverURL))); try { getTupleQueryResult(method, handler); } catch (MalformedQueryException e) { // This shouldn't happen as no queries are involved logger.warn("Server reported unexpected malfored query error", e); throw new RepositoryException(e.getMessage(), e); } finally { method.reset(); } }
Example 2
Source File: RDF4JProtocolSession.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 5 votes |
public void getNamespaces(TupleQueryResultHandler handler) throws IOException, TupleQueryResultHandlerException, RepositoryException, UnauthorizedException, QueryInterruptedException { checkRepositoryURL(); HttpGet method = applyAdditionalHeaders(new HttpGet(Protocol.getNamespacesLocation(getQueryURL()))); try { getTupleQueryResult(method, handler); } catch (MalformedQueryException e) { logger.warn("Server reported unexpected malfored query error", e); throw new RepositoryException(e.getMessage(), e); } finally { method.reset(); } }
Example 3
Source File: RDF4JProtocolSession.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 5 votes |
public void getContextIDs(TupleQueryResultHandler handler) throws IOException, TupleQueryResultHandlerException, RepositoryException, UnauthorizedException, QueryInterruptedException { checkRepositoryURL(); HttpGet method = applyAdditionalHeaders(new HttpGet(Protocol.getContextsLocation(getQueryURL()))); try { getTupleQueryResult(method, handler); } catch (MalformedQueryException e) { logger.warn("Server reported unexpected malfored query error", e); throw new RepositoryException(e.getMessage(), e); } finally { method.reset(); } }
Example 4
Source File: AccumuloPeriodicQueryResultStorage.java From rya with Apache License 2.0 | 5 votes |
@Override public String createPeriodicQuery(final String queryId, final String sparql) throws PeriodicQueryStorageException { Set<String> bindingNames; try { bindingNames = new AggregateVariableRemover().getNonAggregationVariables(sparql); } catch (final MalformedQueryException e) { throw new PeriodicQueryStorageException(e.getMessage()); } final List<String> varOrderList = new ArrayList<>(); varOrderList.add(PeriodicQueryResultStorage.PeriodicBinId); varOrderList.addAll(bindingNames); createPeriodicQuery(queryId, sparql, new VariableOrder(varOrderList)); return queryId; }