Package org.openrdf.model

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


        }

        URI uri = (URI) resource;

        for(String prefix : prefixes) {
            if(uri.stringValue().startsWith(prefix)) {
                return true;
            }
        }

View Full Code Here


            final URI rdfSource = ldpService.getRdfSourceForNonRdfSource(connection, resource);
            if (rdfSource != null) {
                // Sec. 5.2.8.1 and 5.2.3.12
                // FIXME: Sec. 5.2.3.12, see also http://www.w3.org/2012/ldp/track/issues/15
                rb.link(rdfSource.stringValue(), "meta");
                rb.link(rdfSource.stringValue(), "describedby");
            }
            final URI nonRdfSource = ldpService.getNonRdfSourceForRdfSource(connection, resource);
            if (nonRdfSource != null) {
                // TODO: Propose to LDP-WG?
View Full Code Here

            final URI rdfSource = ldpService.getRdfSourceForNonRdfSource(connection, resource);
            if (rdfSource != null) {
                // Sec. 5.2.8.1 and 5.2.3.12
                // FIXME: Sec. 5.2.3.12, see also http://www.w3.org/2012/ldp/track/issues/15
                rb.link(rdfSource.stringValue(), "meta");
                rb.link(rdfSource.stringValue(), "describedby");
            }
            final URI nonRdfSource = ldpService.getNonRdfSourceForRdfSource(connection, resource);
            if (nonRdfSource != null) {
                // TODO: Propose to LDP-WG?
                rb.link(nonRdfSource.stringValue(), "content");
View Full Code Here

                rb.link(rdfSource.stringValue(), "describedby");
            }
            final URI nonRdfSource = ldpService.getNonRdfSourceForRdfSource(connection, resource);
            if (nonRdfSource != null) {
                // TODO: Propose to LDP-WG?
                rb.link(nonRdfSource.stringValue(), "content");
            }

            // ETag (Sec. 4.2.1.3)
            rb.tag(ldpService.generateETag(connection, resource));
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.close();
View Full Code Here

            return true;
        }

        URI uri = (URI)resource;

        if(uri.stringValue().startsWith("file:") || uri.stringValue().startsWith("urn:")) {
            return true;
        }

        return uri.stringValue().startsWith(configurationService.getBaseUri());
View Full Code Here

            return true;
        }

        URI uri = (URI)resource;

        if(uri.stringValue().startsWith("file:") || uri.stringValue().startsWith("urn:")) {
            return true;
        }

        return uri.stringValue().startsWith(configurationService.getBaseUri());
View Full Code Here

        if(uri.stringValue().startsWith("file:") || uri.stringValue().startsWith("urn:")) {
            return true;
        }

        return uri.stringValue().startsWith(configurationService.getBaseUri());


    }

}
View Full Code Here

                while(result.hasNext()) {
                    Resource next = result.next();
                    if(next instanceof URI) {
                        URI uri = (URI)next;
                        if (filter) {
                            if (uri.stringValue().startsWith(configurationService.getBaseContext())) {
                                contexts.add(uri);
                            }
                        } else {
                            contexts.add(uri);
                        }
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

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.