+ public static String getDataUrl(Node node, HttpServletRequest request)
+ throws RepositoryException {
+ return request.getRequestURL().append(getDataPath(node).substring(1))
+ .toString();
+ }
+
+ public static String getDataPath(Node node) throws RepositoryException {
+ return new StringBuilder().append(WEBDAV_PUBLIC).append('/')
+ .append(ALIAS_NODE + "/")
+ .append(node.getSession().getWorkspace().getName())
+ .append(node.getPath()).toString();
+ }
+
+ public static String getCanonicalUrl(Node node, HttpServletRequest request)
+ throws RepositoryException {
+ return request.getRequestURL().append('!').append(node.getPath())
+ .toString();
+ }
+