/** * Return the label of this resource in the language provided as parameter * <p/> * If no label is available for the given language, returns the identifier. * * @param context the space of the label * @return */ public static String getLabel(RepositoryConnection con, Resource r, URI context) throws RepositoryException { return getLabel(con, r, null,context); }
/** * Return the label of this resource in the language provided as parameter * <p/> * If no label is available for the given language, returns the identifier. * * @return */ public static String getLabel(RepositoryConnection con, Resource r) throws RepositoryException { return getLabel(con, r,(Locale)null); }
/** * Return the label of this resource in the language provided as parameter * <p/> * If no label is available for the given language, returns the identifier. * * @return */ public static String getLabel(RepositoryConnection con, Resource r) throws RepositoryException { return getLabel(con, r,(Locale)null); }
/** * Return the label of this resource in the language provided as parameter * <p/> * If no label is available for the given language, returns the identifier. * * @param context the space of the label * @return */ public static String getLabel(RepositoryConnection con, Resource r, URI context) throws RepositoryException { return getLabel(con, r, null,context); }
/** * Return the label of this resource in the language provided as parameter * within the getTripleStore().knowledge space of this Resource. * <p/> * If no label is available for the given language, returns the identifier. * Looking in all spaces!!! * * @param loc * @return */ public static String getLabel(RepositoryConnection con, Resource r, Locale loc) throws RepositoryException { return getLabel(con, r,loc,null); }
/** * Return the label of this resource in the language provided as parameter * within the getTripleStore().knowledge space of this Resource. * <p/> * If no label is available for the given language, returns the identifier. * Looking in all spaces!!! * * @param loc * @return */ public static String getLabel(RepositoryConnection con, Resource r, Locale loc) throws RepositoryException { return getLabel(con, r,loc,null); }
ps.println("</head><body>"); ps.printf("<h1>Inspect %s</h1>%n<div>ShortName: %s<span class='%s'>%<s</span></div>%n", rsc.stringValue(), getLabel(conn,rsc), ""); Date created = ResourceUtils.getCreated(conn, rsc); if(created != null) {
ps.println("</head><body>"); ps.printf("<h1>Inspect %s</h1>%n<div>ShortName: %s<span class='%s'>%<s</span></div>%n", rsc.stringValue(), getLabel(conn,rsc), ""); Date created = ResourceUtils.getCreated(conn, rsc); if(created != null) {
/** * Return a human-readable label for the context, either the rdfs:label or the last part of the URI. * * * @param context * @return */ @Override public String getContextLabel(URI context) { try { RepositoryConnection conn = sesameService.getConnection(); try { conn.begin(); return ResourceUtils.getLabel(conn, context); } finally { conn.commit(); conn.close(); } } catch(RepositoryException ex) { handleRepositoryException(ex, ContextServiceImpl.class); } return null; }
/** * Return a human-readable label for the context, either the rdfs:label or the last part of the URI. * * * @param context * @return */ @Override public String getContextLabel(URI context) { try { RepositoryConnection conn = sesameService.getConnection(); try { conn.begin(); return ResourceUtils.getLabel(conn, context); } finally { conn.commit(); conn.close(); } } catch(RepositoryException ex) { handleRepositoryException(ex, ContextServiceImpl.class); } return null; }