public String getBasePath() { return getRoot(); }
public String getBasePath() { return getRoot(); }
/** * Converts from a resource path back to a document path. * * @param resourcePath String * @return String */ protected String toDocumentPath(String resourcePath) { String documentPath = null; if (resourcePath.startsWith(getRoot())) { documentPath = resourcePath.substring(getRoot().length()); if (documentPath.startsWith("/")) { documentPath = documentPath.substring(1); } } return documentPath; }
/** * Converts from a resource path back to a document path. * * @param resourcePath String * @return String */ protected String toDocumentPath(String resourcePath) { String documentPath = null; if (resourcePath.startsWith(getRoot())) { documentPath = resourcePath.substring(getRoot().length()); if (documentPath.startsWith("/")) { documentPath = documentPath.substring(1); } } return documentPath; }
/** * Converts from a document path to a full resource path that incorporates * the root of the store. * * @param documentPath String * @return String */ protected String toResourcePath(String documentPath) { if (documentPath.startsWith("/")) { documentPath = documentPath.substring(1); } String resourcePath = null; if ("/".equals(getRoot())) { resourcePath = "/" + documentPath; } else { resourcePath = getRoot() + "/" + documentPath; } return resourcePath; }
/** * Converts from a document path to a full resource path that incorporates * the root of the store. * * @param documentPath String * @return String */ protected String toResourcePath(String documentPath) { if (documentPath.startsWith("/")) { documentPath = documentPath.substring(1); } String resourcePath = null; if ("/".equals(getRoot())) { resourcePath = "/" + documentPath; } else { resourcePath = getRoot() + "/" + documentPath; } return resourcePath; }