public ParsedPageLink(Link link) { if (link.getTarget() != null) { page = normalizePageName(link.getTarget().trim()); } else { page = StringTable.EMPTY_STRING; } if (link.getText() != null) { form = removeSuffix(removeQuotes(link.getText().trim())); } String context = link.getHomeElement().getText(); if (context != null) { Span span = link.getPos(); leftContext = context.substring(0, span.getStart()); rightContext = context.substring(span.getEnd(), context.length()); } }