Package org.openrdf.model

Examples of org.openrdf.model.URI.stringValue()


                } else {
                  URI context = getTargetContext(file);
                  log.debug("Importing '{}'...", file.getAbsolutePath());
                  task.updateMessage("importing...");
                  task.updateDetailMessage(TASK_DETAIL_PATH, file.getAbsolutePath());
                  task.updateDetailMessage(TASK_DETAIL_CONTEXT, context.stringValue());
                  if (execImport(file, context)) {
                    log.info("Sucessfully imported file '{}' into {}", file.getAbsolutePath(), context.stringValue());
                    try {
                      //delete the imported file
                      log.debug("Deleting {}...", file.getAbsolutePath());
View Full Code Here


                  log.debug("Importing '{}'...", file.getAbsolutePath());
                  task.updateMessage("importing...");
                  task.updateDetailMessage(TASK_DETAIL_PATH, file.getAbsolutePath());
                  task.updateDetailMessage(TASK_DETAIL_CONTEXT, context.stringValue());
                  if (execImport(file, context)) {
                    log.info("Sucessfully imported file '{}' into {}", file.getAbsolutePath(), context.stringValue());
                    try {
                      //delete the imported file
                      log.debug("Deleting {}...", file.getAbsolutePath());
                      file.delete();
                    } catch (Exception ex) {
View Full Code Here

                                                    "content", mimeType,
                                                    configurationService)))
                            .build();

                } else {
                    return Response.status(Status.NOT_FOUND).entity("No content for <"+resource.stringValue()+">").build();
                }
            } finally {
                conn.close();
            }
        } catch (RepositoryException ex) {
View Full Code Here

        }

        URI uri = (URI)resource;

        try {
            return !cacheSailProvider.getLDCache().isCached(uri.stringValue());
        } catch (RepositoryException e) {
            return false;
        }

    }
View Full Code Here

                RepositoryConnection conn = sesameService.getConnection();
                try {
                    final URI user = userService.getUser(login);
                    if (user == null) return Response.status(Status.NOT_FOUND).entity(String.format("User %s not found", login)).build();

                    java.net.URI u = new java.net.URI(configurationService.getServerUri() + "resource?uri=" + URLEncoder.encode(user.stringValue(), "utf-8"));

                    return Response.seeOther(u).header("Accept", types).build();
                } finally {
                    conn.commit();
                    conn.commit();
View Full Code Here

                webid = userService.getUser(login);
            }
        }

        if(webid instanceof KiWiUriResource) {
            UserAccount account = new UserAccount(login, webid.stringValue());

            save(account);

            return account;
        } else {
View Full Code Here

            connection1.close();
        }

        RepositoryConnection connection2 = repository.getConnection();
        try {
            String query = String.format("DELETE { <%s> <%s> ?v } INSERT { <%s> <%s> ?v . } WHERE { <%s> <%s> ?v }", subject.stringValue(), predicate.stringValue(), subject.stringValue(), predicate.stringValue(), subject.stringValue(), predicate.stringValue());

            Update u = connection2.prepareUpdate(QueryLanguage.SPARQL, query);
            u.execute();

            connection2.commit();
View Full Code Here

            connection1.close();
        }

        RepositoryConnection connection2 = repository.getConnection();
        try {
            String query = String.format("DELETE { <%s> <%s> ?v } INSERT { <%s> <%s> ?v . } WHERE { <%s> <%s> ?v }", subject.stringValue(), predicate.stringValue(), subject.stringValue(), predicate.stringValue(), subject.stringValue(), predicate.stringValue());

            Update u = connection2.prepareUpdate(QueryLanguage.SPARQL, query);
            u.execute();

            connection2.commit();
View Full Code Here

            connection1.close();
        }

        RepositoryConnection connection2 = repository.getConnection();
        try {
            String query = String.format("DELETE { <%s> <%s> ?v } INSERT { <%s> <%s> ?v . } WHERE { <%s> <%s> ?v }", subject.stringValue(), predicate.stringValue(), subject.stringValue(), predicate.stringValue(), subject.stringValue(), predicate.stringValue());

            Update u = connection2.prepareUpdate(QueryLanguage.SPARQL, query);
            u.execute();

            connection2.commit();
View Full Code Here

        }

        URI uri = (URI) resource;

        for(Pattern p : patterns) {
            if(p.matcher(uri.stringValue()).matches()) {
                return true;
            }
        }

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.