<!--

     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.

-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%
def isVisible = { it.isPublic() || (it.isProtected() && props.protectedScope == 'true') || (!it.isProtected() && !it.isPrivate() && props.packageScope == 'true') || props.privateScope == 'true' }
def title = packageDoc.nameWithDots() + (props.windowTitle ? " ($props.windowTitle)" : "")
// TODO enable errors(), enums() etc in SimpleGroovyPackageDoc then replace closures below
def classTypes = [
    "Interface" : { it.isInterface() },
    "Trait" : { it.isTrait() },
    "Class" : { it.isClass() && !it.parentClasses*.qualifiedTypeName().contains('java.lang.Throwable') },
    "Enum" : { it.isEnum() },
    "Exception" : { it.isClass() && it.parentClasses*.qualifiedTypeName().contains('java.lang.Exception') },
    "Error" : { it.isClass() && it.parentClasses*.qualifiedTypeName().contains('java.lang.Error') },
    "Annotation Type" : { it.isAnnotationType() },
    "Script" : { it.isScript() }
]
%>
<title>${title}</title>
<meta name="keywords" content="${packageDoc.nameWithDots()} package">
<meta http-equiv="Content-Type" content="text/html; charset=${props.charset}">
<link rel ="stylesheet" TYPE="text/css" HREF="${packageDoc.relativeRootPath}stylesheet.css" title="Style">
<link href="${packageDoc.relativeRootPath}groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="${packageDoc.relativeRootPath}groovy.ico" type="image/x-icon" rel="icon">
<script type="text/javascript">
function windowTitle()
{
    parent.document.title="${title}";
}
</script>
<noscript>
</noscript>

</head>

<body class="center" onload="windowTitle();">

<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
    <!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
    <!--   -->
</a>
<a name="navbar_top_firstrow"><!-- --></a>
<ul class="navList" title="Navigation">
    <li><a href="${packageDoc.relativeRootPath}overview-summary.html">Overview</a></li>
    <li class="navBarCell1Rev">Package</li>
    <li>Class</li>
    <li><a href="${packageDoc.relativeRootPath}deprecated-list.html">Deprecated</a></li>
    <li><a href="${packageDoc.relativeRootPath}index-all.html">Index</a></li>
    <li><a href="${packageDoc.relativeRootPath}help-doc.html">Help</a></li>
</ul>
</div>

<div class="subNav">
    <ul class="navList">
        <li><a href="${packageDoc.relativeRootPath}index.html?${packageDoc.name()}/package-summary.html" target="_top">Frames</a></li>
        <li><a href="package-summary.html" target="_top">No Frames</a></li>
    </ul>
</div>

<!-- ========= END OF TOP NAVBAR ========= -->

<div class="header">
    <h1 class="title">Package ${packageDoc.nameWithDots()}</h1>
</div>

<% if (!packageDoc.description().trim().isEmpty()) { %>
<h2 title="Package ${packageDoc.nameWithDots()} Description" class="title">Package ${packageDoc.nameWithDots()} Description</h2>
<div class="header">${packageDoc.description()}</div>
<% } %>

<div class="contentContainer">
<%
classTypes.each { k, v ->
    if (packageDoc.allClasses().any{ isVisible(it) && v(it) }) {
%>

    <div class="summary">
        <ul class="blockList">
            <li class="blockList">
                <table border="0" cellpadding="3" cellspacing="0" summary="${k} Summary">
                    <caption><span>${k} Summary</span><span class="tabEnd">&nbsp;</span></caption>
                    <tbody>
                    <tr>
                        <th class="colFirst" scope="col">${k}</th>
                        <th class="colLast" scope="col">Description</th>
                    </tr>
<%
        for (classDoc in packageDoc.allClasses().findAll{ isVisible(it) && v(it) }) {
            def i = 0
                        %><tr class="${i%2==0?'altColor':'rowColor'}">
                            <td class="colOne">
                                <strong><a href="${classDoc.name()}.html" title="class in ${packageDoc.name()}">
                                    ${classDoc.name()}
                                </a></strong>
                            </td>
                            <td>${classDoc.firstSentenceCommentText()}</td>
                        </tr>
<%  } %>
                    </tbody>
                </table>
            </li>
            </ul>
        </div>
    <% } %>
<% } %>
</div>

<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
    <!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
    <!--   -->
</a>
    <ul class="navList" title="Navigation">
        <li><a href="overview-summary.html">Overview</a></li>
        <li class="navBarCell1Rev">Package</li>
        <li>Class</li>
        <li><a href="deprecated-list.html">Deprecated</a></li>
        <li><a href="index-all.html">Index</a></li>
        <li><a href="help-doc.html">Help</a></li>
    </ul>
</div>
<div class="subNav">
    <div>
        <ul class="navList">
            <li><a href="index.html?deprecated-list.html" target="_top">Frames</a></li>
            <li><a href="deprecated-list.html" target="_top">No Frames</a></li>
        </ul>
    </div>

    <div class="aboutLanguage"><em>${props['footer']?:""}</em></div>
    <a name="skip-navbar_bottom">
        <!--   -->
    </a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

</body>
</html>
