/** * Return the base URL for a remote repository (less the /sparql path * component). * * @param namespace * The namespace. * * @return The base URL. * * @see <a href="https://sourceforge.net/apps/trac/bigdata/ticket/689" > * Missing URL encoding in RemoteRepositoryManager </a> */ protected String getRepositoryBaseURLForNamespace(final String namespace) { return baseServiceURL + "/namespace/" + ConnectOptions.urlEncode(namespace); }
if (req.getRequestURI().endsWith(ConnectOptions.urlEncode(namespace) + "/textIndex")) {
if (req.getRequestURI().endsWith(ConnectOptions.urlEncode(namespace) + "/textIndex")) {
/** * Delete the KB associated with the effective namespace. * * @see <a href="https://sourceforge.net/apps/trac/bigdata/ticket/689" > * Missing URL encoding in RemoteRepositoryManager </a> */ @Override protected void doDelete(final HttpServletRequest req, final HttpServletResponse resp) throws IOException { if (!isWritable(getServletContext(), req, resp)) { // Service must be writable. return; } final String namespace = getNamespace(req); if (req.getRequestURI().endsWith( "/namespace/" + ConnectOptions.urlEncode(namespace))) { // Delete that namespace. doDeleteNamespace(req, resp); return; } // Pass through to the SPARQL end point REST API. m_restServlet.doDelete(req, resp); }
/** * Delete the KB associated with the effective namespace. * * @see <a href="https://sourceforge.net/apps/trac/bigdata/ticket/689" > * Missing URL encoding in RemoteRepositoryManager </a> */ @Override protected void doDelete(final HttpServletRequest req, final HttpServletResponse resp) throws IOException { if (!isWritable(getServletContext(), req, resp)) { // Service must be writable. return; } final String namespace = getNamespace(req); if (req.getRequestURI().endsWith( "/namespace/" + ConnectOptions.urlEncode(namespace))) { // Delete that namespace. doDeleteNamespace(req, resp); return; } // Pass through to the SPARQL end point REST API. m_restServlet.doDelete(req, resp); }
g.add(aDataset, VoidVocabularyDecl.sparqlEndpoint, f.createURI(uri + "/" + ConnectOptions.urlEncode(namespace) + "/sparql"));
g.add(aDataset, VoidVocabularyDecl.sparqlEndpoint, f.createURI(uri + "/" + ConnectOptions.urlEncode(namespace) + "/sparql"));