Get "NO FRAMES" link, to switch to the non-frame version of the output.

@param link File to be linked
@return a content tree for the link
482366
protected Content getNavHideLists(DocPath link) {
        Content noFramesContent = getHyperLink(link, contents.noFramesLabel, "", "_top");
        Content li = HtmlTree.LI(noFramesContent);
        return li;
    }
1094767
protected void generateFrameFile() throws DocFileIOException {
        Content frame = getFrameDetails();
        HtmlTree body = new HtmlTree(HtmlTag.BODY);
        body.addAttr(HtmlAttr.ONLOAD, "loadFrames()");
        String topFilePath = configuration.topFile.getPath();
        String javaScriptRefresh = "\nif (targetPage == \"\" || targetPage == \"undefined\")\n" +
                "     window.location.replace('" + topFilePath + "');\n";
        RawHtml scriptContent = new RawHtml(javaScriptRefresh.replace("\n", DocletConstants.NL));
        HtmlTree scriptTree = HtmlTree.SCRIPT();
        scriptTree.addContent(scriptContent);
        body.addContent(scriptTree);
        Content noScript = HtmlTree.NOSCRIPT(contents.noScriptMessage);
        body.addContent(noScript);
        if (configuration.allowTag(HtmlTag.MAIN)) {
            HtmlTree main = HtmlTree.MAIN(frame);
            body.addContent(main);
        } else {
            body.addContent(frame);
        }
        if (configuration.windowtitle.length() > 0) {
            printFramesDocument(configuration.windowtitle, configuration,
                    body);
        } else {
            printFramesDocument(configuration.getText("doclet.Generated_Docs_Untitled"),
                    configuration, body);
        }
    }
1074559
public static Link link(String href, String rel) {
        return link(href, rel, null, null, null);
    }
186709
public Content getNavLinkNext(DocPath next) {
        Content li;
        if (next != null) {
            li = HtmlTree.LI(getHyperLink(next, nextLabel, "", ""));
        }
        else
            li = HtmlTree.LI(nextLabel);
        return li;
    }
1011929
@SuppressWarnings("unchecked")
	public T add(Link link) {

		Assert.notNull(link, "Link must not be null!");

		this.links.add(link);

		return (T) this;
	}
1357551
def readlink(link):
	
	handle = api.CreateFile(
		link,
		0,
		0,
		None,
		api.OPEN_EXISTING,
		api.FILE_FLAG_OPEN_REPARSE_POINT | api.FILE_FLAG_BACKUP_SEMANTICS,
		None,
	)

	if handle == api.INVALID_HANDLE_VALUE:
		raise WindowsError()

	res = reparse.DeviceIoControl(
		handle, api.FSCTL_GET_REPARSE_POINT, None, 10240)

	bytes = create_string_buffer(res)
	p_rdb = cast(bytes, POINTER(api.REPARSE_DATA_BUFFER))
	rdb = p_rdb.contents
	if not rdb.tag == api.IO_REPARSE_TAG_SYMLINK:
		raise RuntimeError("Expected IO_REPARSE_TAG_SYMLINK, but got %d" % rdb.tag)

	handle_nonzero_success(api.CloseHandle(handle))
	return rdb.get_substitute_name()
1100332
protected Content getFramesJavaScript() {
        HtmlTree scriptTree = HtmlTree.SCRIPT();
        String scriptCode = "\n" +
                "    tmpTargetPage = \"\" + window.location.search;\n" +
                "    if (tmpTargetPage != \"\" && tmpTargetPage != \"undefined\")\n" +
                "        tmpTargetPage = tmpTargetPage.substring(1);\n" +
                "    if (tmpTargetPage.indexOf(\":\") != -1 || (tmpTargetPage != \"\" && !validURL(tmpTargetPage)))\n" +
                "        tmpTargetPage = \"undefined\";\n" +
                "    targetPage = tmpTargetPage;\n" +
                "    function validURL(url) {\n" +
                "        try {\n" +
                "            url = decodeURIComponent(url);\n" +
                "        }\n" +
                "        catch (error) {\n" +
                "            return false;\n" +
                "        }\n" +
                "        var pos = url.indexOf(\".html\");\n" +
                "        if (pos == -1 || pos != url.length - 5)\n" +
                "            return false;\n" +
                "        var allowNumber = false;\n" +
                "        var allowSep = false;\n" +
                "        var seenDot = false;\n" +
                "        for (var i = 0; i < url.length - 5; i++) {\n" +
                "            var ch = url.charAt(i);\n" +
                "            if ('a' <= ch && ch <= 'z' ||\n" +
                "                    'A' <= ch && ch <= 'Z' ||\n" +
                "                    ch == '$' ||\n" +
                "                    ch == '_' ||\n" +
                "                    ch.charCodeAt(0) > 127) {\n" +
                "                allowNumber = true;\n" +
                "                allowSep = true;\n" +
                "            } else if ('0' <= ch && ch <= '9'\n" +
                "                    || ch == '-') {\n" +
                "                if (!allowNumber)\n" +
                "                     return false;\n" +
                "            } else if (ch == '/' || ch == '.') {\n" +
                "                if (!allowSep)\n" +
                "                    return false;\n" +
                "                allowNumber = false;\n" +
                "                allowSep = false;\n" +
                "                if (ch == '.')\n" +
                "                     seenDot = true;\n" +
                "                if (ch == '/' && seenDot)\n" +
                "                     return false;\n" +
                "            } else {\n" +
                "                return false;\n" +
                "            }\n" +
                "        }\n" +
                "        return true;\n" +
                "    }\n" +
                "    function loadFrames() {\n" +
                "        if (targetPage != \"\" && targetPage != \"undefined\")\n" +
                "             top.classFrame.location = top.targetPage;\n" +
                "    }\n";
        RawHtml scriptContent = new RawHtml(scriptCode.replace("\n", DocletConstants.NL));
        scriptTree.addContent(scriptContent);
        return scriptTree;
    }
706387
private Link parseLinkHeader(final String link) throws ExternalMessageBodyException {
        final Link realLink = Link.valueOf(link);

        try {
            final String handling = realLink.getParams().get(HANDLING);
            if (handling == null || !handling.matches("(?i)" + PROXY + "|" + COPY + "|" + REDIRECT)) {
                // error
                throw new ExternalMessageBodyException(
                        "Link header formatted incorrectly: 'handling' parameter incorrect or missing");
            }
        } catch (final Exception e) {
            throw new ExternalMessageBodyException("External content link header url is malformed");
        }
        return realLink;
    }
108606
private static URI createBare(final URI link) {
        final URI uri;
        if (link.getRawQuery() == null && link.getRawFragment() == null) {
            uri = link;
        } else {
            final String href = link.toString();
            final int idx;
            if (link.getRawQuery() == null) {
                idx = href.indexOf('#');
            } else {
                idx = href.indexOf('?');
            }
            uri = URI.create(href.substring(0, idx));
        }
        return uri;
    }
789004
protected void getLinkForAnnotationType(Content link, LinkInfo linkInfo, Type type) {
		link.addContent(getTypeAnnotationLinks(linkInfo));
		linkInfo.type = type.asAnnotatedType().underlyingType();
		link.addContent(getLink(linkInfo));
	}
1159791
synchronized Link[] links() {
        Link[] ret = null;
        if (count != 0) {
            ret = new Link[count];
            System.arraycopy(links, 0, ret, 0, count);
        }
        return ret;
    }
727187
public Link getLink() {
        final String link = headers.getFirst(LINK);
        if (link != null) {
            return Link.valueOf(link);
        }
        return null;
    }
140728
protected void addFrameWarning(Content contentTree) {
        Content noframes = new HtmlTree(HtmlTag.NOFRAMES);
        Content noScript = HtmlTree.NOSCRIPT(
                HtmlTree.DIV(getResource("doclet.No_Script_Message")));
        noframes.addContent(noScript);
        Content noframesHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
                getResource("doclet.Frame_Alert"));
        noframes.addContent(noframesHead);
        Content p = HtmlTree.P(getResource("doclet.Frame_Warning_Message",
                getHyperLink(configuration.topFile,
                configuration.getText("doclet.Non_Frame_Version"))));
        noframes.addContent(p);
        contentTree.addContent(noframes);
    }
518237
public static HashMap<String, Object> makeEmptyFrameMeta() {
    HashMap<String,Object> hm = new LinkedHashMap<>(); // preserve insertion order
    for(String key: FrameMetadata.METAVALUES) hm.put(key,null);
    return hm;
  }
1230974
public Optional<Link> getLinkByRel(final String rel)
    {
        return Optional.ofNullable(representation.getLinkByRel(rel));
    }
1001173
private static Opt<String> readFragment(final URI link) {
        final Opt<String> fragment;
        if (link.getRawFragment() == null) {
            fragment = new Opt.Empty<>();
        } else {
            fragment = new Opt.Single<>(link.getRawFragment());
        }
        return fragment;
    }
741669
public HttpUrl resolve(String link) {
        Builder builder = newBuilder(link);
        return builder != null ? builder.build() : null;
    }