Package org.apache.marmotta.platform.core.api.prefix

Examples of org.apache.marmotta.platform.core.api.prefix.PrefixService.containsPrefix()


    @GET
    @Path("/prefix")
    @Produces(Namespaces.MIME_TYPE_JSON)
    public Map<String, String> resolvePrefix(@QueryParam("prefix") String prefix, @Context UriInfo info) {
        final PrefixService prefixService = createLocalPrefixService(info);
        if (prefixService.containsPrefix(prefix))
            return Collections.singletonMap(prefix, prefixService.getNamespace(prefix));

        // As a fallback, try prefix.cc
        if (prefix != null) {
            final String namespace = prefixCC.getNamespace(prefix);
View Full Code Here


                            conn.close();
                        }
                    } catch (RepositoryException e) {
                        return Collections.emptyList();
                    }
                } else if (prefixService.containsPrefix(px)) {
                    String resolved = prefixService.getNamespace(px) + (local != null ? local : "");
                    List<String> suggestions = new ArrayList<String>();
                    for (String c : getCompletions(resolved, limit, mode)) {
                        // CURIE urs MUST have a local part
                        if (c.length() <= resolved.length()) {
View Full Code Here

    @GET
    @Path("/prefix")
    @Produces(Namespaces.MIME_TYPE_JSON)
    public Map<String, String> resolvePrefix(@QueryParam("prefix") String prefix, @Context UriInfo info) {
        final PrefixService prefixService = createLocalPrefixService(info);
        if (prefixService.containsPrefix(prefix))
            return Collections.singletonMap(prefix, prefixService.getNamespace(prefix));

        // As a fallback, try prefix.cc
        if (prefix != null) {
            final String namespace = prefixCC.getNamespace(prefix);
View Full Code Here

                            conn.close();
                        }
                    } catch (RepositoryException e) {
                        return Collections.emptyList();
                    }
                } else if (prefixService.containsPrefix(px)) {
                    String resolved = prefixService.getNamespace(px) + (local != null ? local : "");
                    List<String> suggestions = new ArrayList<String>();
                    for (String c : getCompletions(resolved, limit, mode)) {
                        // CURIE urs MUST have a local part
                        if (c.length() <= resolved.length()) {
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.