@@ -101,10 +101,10 @@ public static void setServerBaseUrl(String serverBaseUrl) {
101101 /**
102102 * Set the path to append to the serverBaseUrl (settable in {@link #setServerBaseUrl(String)}).
103103 * The string can contain placeholders that will be expanded at runtime:
104- * <li>{ccd_id} to be replaced by the chemical component identifier, in capitals</li>
105- * <li>{ccd_id:beginIndex-endIndex} to be replaced by a substring of the chemical component identifier in capitals,
104+ * <li>" {ccd_id}" to be replaced by the chemical component identifier, in capitals</li>
105+ * <li>" {ccd_id:beginIndex-endIndex}" to be replaced by a substring of the chemical component identifier in capitals,
106106 * with indices following the same convention as {@link String#substring(int, int)} </li>
107- * <li>{ccd_id:index} to be replaced by a substring of the chemical component identifier in capitals,
107+ * <li>" {ccd_id:index}" to be replaced by a substring of the chemical component identifier in capitals,
108108 * with index either a positive or negative integer to substring from left or right of the string respectively.</li>
109109 * If any of the indices are off-bounds, then the full chemical component identifier is replaced
110110 */
@@ -314,6 +314,13 @@ private static boolean fileIsAbsent(String recordName) {
314314 return !f .exists ();
315315 }
316316
317+ /**
318+ * Expands the given path URL template, replacing the placeholders as specified in {@link #setChemCompPathUrlTemplate(String)}
319+ * by the ccdId given (or its substrings, if indices are present in the template)
320+ * @param templateStr the template string with placeholders for ccd ids
321+ * @param ccdId the ccd id to replace (in full or a substring)
322+ * @return the input templateStr with placeholders replaced
323+ */
317324 static String expandPathUrlTemplate (String templateStr , String ccdId ) {
318325 Matcher m = CCD_ID_TEMPLATE_REGEX .matcher (templateStr );
319326 StringBuilder output = new StringBuilder ();
0 commit comments