/** * Construct a Document Link reference out of the passed content. * * @param content the string containing the Document link reference * @return the parsed Link Object corresponding to the Document link reference */ private ResourceReference parseDocumentLink(StringBuffer content) { String queryString = null; String text = parseElementAfterString(content, SEPARATOR_QUERYSTRING); if (text != null) { queryString = removeEscapesFromExtraParts(text); } String anchor = null; text = parseElementAfterString(content, SEPARATOR_ANCHOR); if (text != null) { anchor = removeEscapesFromExtraParts(text); } DocumentResourceReference reference = new DocumentResourceReference(removeEscapesFromReferencePart(content.toString())); reference.setTyped(false); reference.setQueryString(queryString); reference.setAnchor(anchor); return reference; }