package org.schoellerfamily.gedbrowser.renderer;

/**
 * @author Dick Schoeller
 */
public class SubmissionLinkNameHtmlRenderer implements NameHtmlRenderer {
    /** */
    private final SubmissionLinkRenderer submissionLinkRenderer;
    /**
     * Constructor.
     *
     * @param submissionRender the parent renderer
     */
    public SubmissionLinkNameHtmlRenderer(final SubmissionLinkRenderer submissionLinkRender) {
        this.submissionLinkRenderer = submissionLinkRender;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getNameHtml() {
        final String name =
                submissionLinkRenderer.getGedObject().getToString();
        final String dbname =
                submissionLinkRenderer.getGedObject().getDbName();
        return "<a class=\"name\" "
        + "href=\"submission?db=" + dbname + "&amp;id=" + name + "\">"
        + name + "</a>";
    }
}

@@ -286,22 +286,28 @@
 bmission
+Link
 Render
+er
  the par
@@ -418,16 +418,18 @@
 nkRender
+er
 ) %7B%0A    
@@ -482,16 +482,18 @@
 nkRender
+er
 ;%0A    %7D%0A

fix consistency of reference to submissionLinkRenderer