You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ma...@apache.org on 2016/11/11 00:17:41 UTC
svn commit: r1769236 [4/14] - in /tika/site/publish/1.14/miredot: ./ css/
font/ font/Droid_Sans/ font/Droid_Sans_Mono/ font/Open_Sans/ img/ input/
js/ lib/ lib/angular-ui/ lib/angular-ui/bootstrap/ lib/angular/
lib/font-awesome/ lib/font-awesome/css/ l...
Added: tika/site/publish/1.14/miredot/index.html
URL: http://svn.apache.org/viewvc/tika/site/publish/1.14/miredot/index.html?rev=1769236&view=auto
==============================================================================
--- tika/site/publish/1.14/miredot/index.html (added)
+++ tika/site/publish/1.14/miredot/index.html Fri Nov 11 00:17:41 2016
@@ -0,0 +1,512 @@
+<!DOCTYPE html>
+<html ng-controller="DocRoot" lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="description" content="">
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+
+ <link rel="stylesheet" href="css/normalize.css">
+ <link rel="stylesheet" href="css/bootstrap-combined.min.css">
+ <link rel="stylesheet" href="css/fonts.css">
+ <link rel="stylesheet" href="css/style.css">
+ <link rel="stylesheet" href="css/introstyle.css">
+ <link rel="stylesheet" href="lib/font-awesome/css/font-awesome.css">
+ <!--[if IE 7]>
+ <link rel="stylesheet" href="lib/font-awesome/css/font-awesome-ie7.min.css">
+ <![endif]-->
+
+ <title ng-bind-template="{{projectTitle}}"></title>
+
+ <script src="lib/jquery/jquery-1.9.1.min.js"></script>
+ <script src="lib/angular/angular.js"></script>
+ <script src="lib/angular/angular-sanitize.js"></script>
+ <script src="lib/angular-ui/angular-ui.js"></script>
+ <script src="lib/angular-ui/bootstrap/buttons.js"></script>
+ <script src="lib/underscore.v1.4.4/underscore-min.js"></script>
+ <script src="js/controllers.js"></script>
+ <script src="js/filters.js"></script>
+ <script src="js/directives.js"></script>
+ <script src="js/watch-fighters.js"></script>
+ <script src="js/ngStorage.js"></script>
+ <script src="js/app.js"></script>
+
+ <style>
+ [ng-cloak] {
+ display: none;
+ }
+ </style>
+ <script>
+ // include angular loader, which allows the files to load in any order
+ /*
+ AngularJS v1.2.6
+ (c) 2010-2014 Google, Inc. http://angularjs.org
+ License: MIT
+ */
+ (function(){'use strict';function d(a){return function(){var c=arguments[0],b,c="["+(a?a+":":"")+c+"] http://errors.angularjs.org/1.2.6/"+(a?a+"/":"")+c;for(b=1;b<arguments.length;b++)c=c+(1==b?"?":"&")+"p"+(b-1)+"="+encodeURIComponent("function"==typeof arguments[b]?arguments[b].toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof arguments[b]?"undefined":"string"!=typeof arguments[b]?JSON.stringify(arguments[b]):arguments[b]);return Error(c)}}(function(a){var c=d("$injector"),b=d("ng");a=a.angular||
+ (a.angular={});a.$$minErr=a.$$minErr||d;return a.module||(a.module=function(){var a={};return function(e,d,f){if("hasOwnProperty"===e)throw b("badname","module");d&&a.hasOwnProperty(e)&&(a[e]=null);return a[e]||(a[e]=function(){function a(c,d,e){return function(){b[e||"push"]([c,d,arguments]);return g}}if(!d)throw c("nomod",e);var b=[],h=[],k=a("$injector","invoke"),g={_invokeQueue:b,_runBlocks:h,requires:d,name:e,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide",
+ "service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),animation:a("$animateProvider","register"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:k,run:function(a){h.push(a);return this}};f&&k(f);return g}())}}())})(window)})(window);
+
+ // include a third-party async loader library
+ /*!
+ * $script.js Async loader & dependency manager
+ * https://github.com/ded/script.js/blob/c29530159a/dist/script.min.js
+ * (c) Dustin Diaz 2013
+ * License: MIT
+ */
+ (function(e,t,n){typeof module!="undefined"&&module.exports?module.exports=n():typeof define=="function"&&define.amd?define(n):t[e]=n()})("$script",this,function(){function v(e,t){for(var n=0,r=e.length;n<r;++n)if(!t(e[n]))return f;return 1}function m(e,t){v(e,function(e){return!t(e)})}function g(e,t,a){function d(e){return e.call?e():r[e]}function b(){if(!--p){r[h]=1,c&&c();for(var e in s)v(e.split("|"),d)&&!m(s[e],d)&&(s[e]=[])}}e=e[l]?e:[e];var f=t&&t.call,c=f?t:a,h=f?e.join(""):t,p=e.length;return setTimeout(function(){m(e,function(e){if(e===null)return b();if(u[e])return h&&(i[h]=1),u[e]==2&&b();u[e]=1,h&&(i[h]=1),y(!n.test(e)&&o?o+e+".js":e,b)})},0),g}function y(n,r){var i=e.createElement("script"),s=f;i.onload=i.onerror=i[d]=function(){if(i[h]&&!/^c|loade/.test(i[h])||s)return;i.onload=i[d]=null,s=1,u[n]=2,r()},i.async=1,i.src=n,t.insertBefore(i,t.firstChild)}var e=document,t=e.getElementsByTagName("head")[0],n=/^https?:\/\//,r={},i={},s={},o,u={},a="string",f=!1,l="push"
,c="DOMContentLoaded",h="readyState",p="addEventListener",d="onreadystatechange";return!e[h]&&e[p]&&(e[p](c,function b(){e.removeEventListener(c,b,f),e[h]="complete"},f),e[h]="loading"),g.get=y,g.order=function(e,t,n){(function r(i){i=e.shift(),e.length?g(i,r):g(i,t,n)})()},g.path=function(e){o=e},g.ready=function(e,t,n){e=e[l]?e:[e];var i=[];return!m(e,function(e){r[e]||i[l](e)})&&v(e,function(e){return r[e]})?t():!function(e){s[e]=s[e]||[],s[e][l](t),n&&n(i)}(e.join("|")),g},g.done=function(e){g([null],e)},g})
+ // wait until input script is loaded
+ $script([
+ 'input/input.js'
+ ], function() {
+ // when all is done, execute bootstrap angular application
+ angular.element(document).ready(function() {
+ //give browser a chance to render the loading message
+ setTimeout(function() {
+ angular.bootstrap(document, ['miredot']);
+ }, 250);
+ });
+ });
+ </script>
+</head>
+<body>
+
+<!-- Renderer for a resource url in a tree structure in the navbar.
+ Context: 'resource' -->
+<script type="text/ng-template" id="resource_nav_item_renderer.html">
+ <div class="summaryBaseResource">
+ <span ng-click="hierarchyOpen = !hierarchyOpen" class="hierarchy-toggle">
+ <i ng-class="{'icon-caret-down': hierarchyOpen, 'icon-caret-right': !hierarchyOpen}"></i></span>
+ <a set-href="'#' + getFirstLeaf(resource).hash"
+ set-text="resource.name"
+ target="_self"></a>
+ </div>
+
+ <ul ng-show="hierarchyOpen" class="searchList hierarchical">
+ <li ng-repeat="leaf in resource.leafResources | orderBy:'url'">
+ <div class="summaryMethodUrl">
+ <a set-href="'#' + (leaf.methods | orderBy:methodHttpOrderFunction)[0].hash"
+ set-text="leaf.name || ' /'"
+ target="_self"></a>
+ <span ng-repeat="method in leaf.methods | orderBy:methodHttpOrderFunction">
+ <a set-href="'#' + method.hash" class="httpMethod small" set-class="method.method"
+ set-text="method.method"
+ target="_self"></a>
+ </span>
+ </div>
+ </li>
+ </ul>
+
+ <ul ng-show="hierarchyOpen" class="searchList hierarchical">
+ <li ng-repeat="resource in resource.resources | orderBy:'name'"
+ ng-include="'resource_nav_item_renderer.html'"></li>
+ </ul>
+</script>
+<div ng-hide="true">
+ <img alt="Loading..." src="img/ajax-loader-mini.gif"/> Loading ...
+</div>
+<div id="content" ng-cloak class="ng-cloak">
+
+<div id="rightwithnav">
+ <div id="navigation">
+ <ul class="nav nav-pills" style="margin-left: -10px; padding-bottom: 14px; padding-left: 10px; padding-top: 4px;">
+ <li ng-class="{active: navigationView == 'hierarchical'}">
+ <a ng-click="navigationView = 'hierarchical'" style="cursor: pointer">Tree</a>
+ </li>
+ <li ng-class="{active: navigationView == 'search'}">
+ <a ng-click="navigationView = 'search'" style="cursor: pointer">Search</a>
+ </li>
+ </ul>
+ </div>
+
+ <div id="right">
+ <!--
+ <div id="expandCollapseTree" class="treeCollapse">
+ <span ng-click="collapseTree()" ng-show="hierarchyOpen == true">
+ collapse all
+ </span>
+ <span ng-click="expandTree()" ng-show="hierarchyOpen == false">
+ expand all
+ </span>
+ </div>
+ -->
+ <div id="rightContent">
+ <div ng-show="navigationView == 'hierarchical'" id="searchResultContainer">
+ <ul class="searchList hierarchical">
+ <li ng-repeat="resource in resourceTree"
+ ng-include="'resource_nav_item_renderer.html'"></li>
+ </ul>
+ </div>
+
+ <div ng-show="navigationView == 'search'">
+ <div id="searchform">
+ <form>
+ <label for="keywordInput" class="searchLabel">
+ URL contains...
+ </label>
+ <input id="keywordInput" type="text" class="input-medium search-query searchInput" style="margin-bottom: 15px"
+ ng-model="searchQuery.url">
+
+ <label for="urlInput" class="searchLabel">
+ URL matches...
+ </label>
+ <input id="urlInput" type="text" class="input-medium search-query searchInput" style="display: block; margin-bottom: 15px"
+ placeholder="{{$storage.baseUrl + '...' }}"
+ ng-model="searchByExample">
+
+ <label class="searchLabel">
+ Http method
+ </label>
+ <div class="tagInput">
+ <span ng-repeat="method in httpMethods" set-text="method"
+ class="httpMethod httpMethodSelection" set-class="method" ng-class="{disabled: method != searchQuery.http}"
+ ng-click="toggleSearchQueryHttp(method)"></span>
+ </div>
+
+ <label class="searchLabel" set-if="serviceTags.length > 0">
+ Tags
+ </label>
+ <div class="tagInput">
+ <div class="tag"
+ ng-repeat="tag in serviceTags | orderBy:'name'"
+ ng-click="tag.selected = ! tag.selected"
+ ng-class="{tagSelected: tag.selected}">
+ <i class="icon-circle" style="color: #eee; text-shadow: 0 0 -1px rgba(0,0,0,0.3);"></i>
+ <span set-text="' ' + tag.name"></span>
+ </div>
+ </div>
+ </form>
+ </div>
+ <div id="results">
+ <ul id="resultList">
+ <li ng-repeat="interface in interfaces | orderBy:['url', interfaceHttpOrderFunction]"
+ ng-show="((interface | searchByExampleFilter:searchByExample:$storage.baseUrl)
+ && (interface | serviceTagFilter:serviceTags)
+ && (interface | searchQueryFilter:searchQuery))">
+ <div class="summaryMethodUrl">
+ <a set-href="'#' + interface.hash" target="_self">
+ <div class="httpMethodSearchResult">
+ <span class="httpMethod small" set-class="interface.http" set-text="interface.http"></span>
+ </div><span set-text="interface.url" class="result"></span>
+ </a>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
+<div id="leftwithnavbar">
+ <div class="navbar navbartop">
+ <div class="navbar-inner">
+ <div class="container">
+
+ <a class="brand" href="#home" target="_self" set-text="projectTitle"></a>
+
+ <ul class="nav">
+ <li>
+ <a href="#interfaces" target="_self" ng-class="{activeView: view=='interfaces'}">Interfaces</a>
+ </li>
+ <li set-if="processErrors.length > 0 || projectWarnings.length > 0">
+ <a href="#warnings" target="_self" ng-class="{activeView: view=='warnings'}"
+ set-text="'Warnings (' + projectWarnings.length + ')'"></a>
+ </li>
+ </ul>
+
+ <div class="pull-right" style="margin-right: 20px;">
+ <a href="http://www.miredot.com" target="_blank"><img src="img/miredot_mini_title.png"></a>
+ <i class="icon-exclamation-sign failedIcon" set-if="!validLicence && !!licenceErrorMessage" set-title="licenceErrorMessage"></i>
+ </div>
+
+ <!-- Everything you want hidden at 940px or less, place within here -->
+ <div class="nav-collapse collapse">
+ <!-- .nav, .navbar-search, .navbar-form, etc -->
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div id="left">
+ <div id="main">
+
+ <a id="home"></a><a id="interfaces"></a><a id="warnings"></a>
+
+ <div class="notice freeversion" set-if="validLicence && licenceType == 'FREE'">
+ <i class="icon-info-sign" title="Free version"></i>
+ Notice: This documentation was generated by the free version of MireDot.
+ As such, not all features are supported.
+ <span set-html="visitWebsiteForProVersion"></span>
+ </div>
+ <div class="notice invalidlicence" set-if="!validLicence">
+ <i class="icon-exclamation-sign" title="Invalid key"></i>
+ <span set-html="licenceErrorMessage"></span>
+ </div>
+
+ <div id="expandCollapse" ng-show="view=='interfaces'">
+ <span ng-click="setGlobalCollapsedState(true)" class="collapse icon-stack">
+ <i class="icon-sign-blank text-gray" title="collapse all"></i>
+ <i class="icon-collapse-top" title="collapse all"></i>
+ </span>
+ <span ng-click="setGlobalCollapsedState(false)" class="expand icon-stack">
+ <i class="icon-sign-blank text-gray" title="expand all"></i>
+ <i class="icon-collapse" title="expand all"></i>
+ </span>
+ </div>
+
+ <div id="intro" ng-show="view=='interfaces'"></div>
+
+ <div ng-view></div>
+
+ <div id="contentContent">
+
+ <div ng-show="view=='interfaces'">
+
+ <ul id="mainList">
+ <li ng-repeat="interface in interfaces | orderBy:['url', interfaceHttpOrderFunction]">
+
+ <div ng-click="interface.collapsed = !interface.collapsed" style="cursor: pointer;" set-id="interface.hash">
+ <i class="icon-bookmark methodIcon"></i>
+ <h3 class="methodTitle"
+ set-class="deprecated : interface.deprecated, valueMissing : ! interface.title"
+ set-html="interface.title || 'title missing'">
+ </h3>
+ </div>
+
+ <div ng-show="!interface.collapsed">
+ <div>
+ <div class="tag" ng-repeat="tag in interface.tags | arraySort" ng-class="{tagSelected: isServiceTagSelected(tag)}">
+ <i class="icon-circle" style="color: #eee; text-shadow: 0 0 -1px rgba(0,0,0,0.3);"></i>
+ <span set-text="' ' + tag"></span>
+ </div>
+ </div>
+
+ <p class="methodDescription" set-if="interface.deprecated"><b>Deprecated.</b></p>
+ <p class="methodDescription" set-html="interface.beschrijving"></p>
+ </div>
+
+ <div class="methodCall" set-class='interface.http'>
+ <span class="httpMethod" set-class='interface.http' set-text="interface.http"></span><!-- (no whitespace)
+ --><span class="methodBaseUrl"
+ ng-show="editingBaseUrl == false"
+ ng-click="editingBaseUrl = true; baseUrl = $storage.baseUrl">{{$storage.baseUrl || ' '}}</span><!--
+ --><input
+ ng-model="baseUrl"
+ ng-show="editingBaseUrl == true"
+ focus-when="editingBaseUrl == true"
+ on-blur="editingBaseUrl = false; $storage.baseUrl = baseUrl"
+ on-enter="editingBaseUrl = false; $storage.baseUrl = baseUrl"
+ /><!--
+ --><span class="methodUrl" set-html="interface.url | formatUrlParams"></span>
+ </div>
+
+ <div ng-show="!interface.collapsed">
+ <div ng-repeat="inputType in ['PATH', 'QUERY', 'MATRIX', 'FORM', 'COOKIE', 'HEADER']">
+ <div set-if="interface.inputs[inputType].length > 0">
+ <h4 set-text="(inputType | capitaliseFirstLetter) + ' Parameters'"></h4>
+
+ <table class="methodParams">
+ <tr ng-repeat="input in interface.inputs[inputType]">
+ <td>
+ <span class="parameterContainer">
+ <span class="parameterName" set-text="input.name"></span>
+ <span class="parameterTypeAndValue">
+ <span class="parameterType" set-text="formatTypeValue(input.typeValue)"></span>
+ <span class="parameterDefaultValue" set-html="formatDefaultValue(input.typeValue, input.defaultValue)"></span>
+ </span>
+ </span>
+
+ </td>
+ <td>
+ <div set-class="valueMissing : !input.comment"
+ set-html="input.comment || 'comment missing'"></div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+ <div set-if="interface.inputs.BODY.length > 0">
+
+ <h4>Body</h4>
+
+ <div class="returnsBodyContainer">
+ <p class="methodDescription"
+ set-class="valueMissing : !interface.inputs.BODY[0].comment"
+ set-html="interface.inputs.BODY[0].comment || 'comment missing'">
+ </p>
+
+ <div class="mediaTypeContainer">
+ <div class="mediaType">
+ <span set-if="interface.consumes.length > 0" set-text="interface.consumes"></span>
+ <span set-if="interface.consumes.length == 0">no type</span>
+ </div>
+ </div>
+ <div set-if="interface.compressed" class="gzip"></div>
+
+ <div class="typeValueContainer">
+ <div set-if="interface.inputs.BODY[0].typeValue.type == 'simple'
+ || interface.inputs.BODY[0].typeValue.type == 'enum'">
+ <span class="parameterType"
+ set-text="formatTypeValue(interface.inputs.BODY[0].typeValue)">
+ </span>
+ <span class="parameterDefaultValue"
+ set-html="formatDefaultValue(interface.inputs.BODY[0].typeValue)"></span>
+ </div>
+ <div set-if="!(interface.inputs.BODY[0].typeValue.type == 'simple'
+ || interface.inputs.BODY[0].typeValue.type == 'enum')">
+ <json-to to="interface.inputs.BODY[0].typeValue" json-doc-config="jsonDocConfig"></json-to>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div set-if="interface.output.typeValue != undefined" class="returnsContainer">
+ <h4>Returns</h4>
+
+ <div class="returnsBodyContainer">
+
+ <p class="methodDescription"
+ set-class="valueMissing : !interface.output.comment"
+ set-html="interface.output.comment || 'comment missing'">
+ </p>
+
+ <div class="mediaTypeContainer">
+ <div class="mediaType">
+ <span set-if="interface.produces.length > 0" set-text="interface.produces"></span>
+ <span set-if="interface.produces.length == 0">no type</span>
+ </div>
+ </div>
+ <div set-if="interface.compressed" class="gzip"></div>
+
+ <div class="typeValueContainer">
+ <div set-if="interface.output.typeValue.type == 'simple'
+ || interface.output.typeValue.type == 'enum'">
+ <span class="parameterType"
+ set-text="formatTypeValue(interface.output.typeValue)">
+ </span>
+ <span class="parameterDefaultValue"
+ set-html="formatDefaultValue(interface.output.typeValue)"></span>
+ </div>
+ <div set-if="!(interface.output.typeValue.type == 'simple'
+ || interface.output.typeValue.type == 'enum')">
+ <json-to to="interface.output.typeValue" json-doc-config="jsonDocConfig"></json-to>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div set-if="interface.statusCodes.length > 0" class="statusCodeContainer">
+ <h4>Status codes</h4>
+
+ <table class="statusCodes">
+ <tr ng-repeat="statusCode in interface.statusCodes">
+ <td>
+ <span class="parameterContainer" set-if="statusCode.httpCode">
+ <span class="parameterName" set-text="statusCode.httpCode"></span>
+ </span>
+ </td>
+ <td>
+ <span class="statusCodeComment"
+ set-class="valueMissing : !statusCode.comment"
+ set-html="statusCode.comment || 'comment missing'"></span>
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <hr class="interfaceSeparator"/>
+ </div>
+ </li>
+ </ul>
+
+ </div>
+
+ <div ng-show="view=='warnings'">
+ <div set-if="processErrors.length > 0">
+ <ul class="warningsList">
+ <li>
+ <h3>
+ Interfaces not documented
+ </h3>
+ <p>
+ MireDot believes that the Java methods below correspond to REST interfaces, but somehow had problems
+ parsing/processing these interfaces and therefore excluded them from the generated documentation. We
+ would very much appreciate it if you would
+ <a href="mailto:miredot@qmino.com">send us</a>
+ the interfaces (not the implementations) and the
+ types used (returntype, parameters). This will allow us to further improve MireDot and better document
+ your interfaces in the future.
+ </p>
+ <ul class="warningsListContent">
+ <li ng-repeat="processError in processErrors">
+ <i class="icon-question-sign" title="Not Documented"></i>
+ <span set-text="processError.class + '.' + processError.method"></span>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+
+ <p>
+ Below is a list of potential problems detected by MireDot. They can be severe or not. Some of them wil result
+ in low quality documentation, some are real implementation issues. With each warning, the Java method
+ causing the problem is documented.
+ </p>
+
+ <ul class="warningsList">
+ <li ng-repeat="(projectWarningType, projectWarningsOfType) in projectWarningsByType">
+
+ <h3 set-title="projectWarningType"
+ set-text="projectWarningsOfType[0].description">
+ </h3>
+
+ <ul class="warningsListContent" set-if="validLicence && licenceType == 'PRO'">
+ <li ng-repeat="projectWarning in projectWarningsOfType">
+ <i set-if="projectWarning.failedBuild" class="icon-exclamation-sign failedIcon" title="Failed Build"></i>
+ <i set-if="!projectWarning.failedBuild" class="icon-warning-sign warningIcon" title="Warning"></i>
+ <a set-href="'#' + projectWarning.interface"
+ set-text="getInterfaceByHash(projectWarning.interface).url"
+ target="_self"></a>
+ <p>
+ <b>method</b>: <span set-text="projectWarning.implementationClass + '.' + projectWarning.implementationMethod"></span><br>
+ <i set-text="projectWarning.entity"></i>
+ </p>
+ </li>
+ </ul>
+
+ <div set-if="validLicence && licenceType == 'FREE'">
+ <i class="icon-exclamation-sign licenceIcon" title="Free version"></i>
+ <strong>
+ <ng-pluralize count="projectWarningsOfType.length"
+ when="{'one': 'One issue', 'other': '{} issues'}">
+ </ng-pluralize>
+ </strong>
+ <ng-pluralize count="projectWarningsOfType.length"
+ when="{'one': 'is', 'other': 'are'}">
+ </ng-pluralize> not shown here because this documentation was generated by the free version of MireDot.
+ As such, not all features are supported.
+ <span set-html="visitWebsiteForProVersion"></span>
+ </div>
+ </li>
+ </ul>
+
+ </div>
+
+ </div>
+ </div>
+ <div id="footer">
+ <div style="padding-top: 10px; padding-bottom: 10px; text-align: center;">
+ <p class="muted" style="font-size: 12px; margin: 0;">
+ <span set-text="dateOfGeneration"></span> - REST documentation generated by
+ <a href="http://www.miredot.com" target="_blank"><img src="img/miredot_mini.png"></a> version {{miredotVersion}}{{versionCheckResult}}
+ </p>
+ </div>
+ </div>
+ </div>
+</div>
+
+</div>
+</body>
+</html>
Added: tika/site/publish/1.14/miredot/input/input.js
URL: http://svn.apache.org/viewvc/tika/site/publish/1.14/miredot/input/input.js?rev=1769236&view=auto
==============================================================================
--- tika/site/publish/1.14/miredot/input/input.js (added)
+++ tika/site/publish/1.14/miredot/input/input.js Fri Nov 11 00:17:41 2016
@@ -0,0 +1,2 @@
+var com = { qmino : { miredot : {}}};
+com.qmino.miredot.restApiSource = {"projectVersion":"1.14","jsonDocHidden":true,"licenceErrorMessage":"Licence key expired on 01 Aug 2016","miredotVersion":"1.4","validLicence":false,"projectTitle":"Apache Tika server-1.14","projectName":"Apache Tika server","dateOfGeneration":"2016-11-10 16:16:28","jsonDocEnabled":false};
Added: tika/site/publish/1.14/miredot/js/app.js
URL: http://svn.apache.org/viewvc/tika/site/publish/1.14/miredot/js/app.js?rev=1769236&view=auto
==============================================================================
--- tika/site/publish/1.14/miredot/js/app.js (added)
+++ tika/site/publish/1.14/miredot/js/app.js Fri Nov 11 00:17:41 2016
@@ -0,0 +1,10 @@
+'use strict';
+
+
+// Declare app level module which depends on filters, and services
+angular.module('miredot', ['miredot.filters', 'miredot.directives', 'ui.bootstrap.buttons', 'watchFighers', 'ngStorage']).
+ // Make sure our local href="#hash" link bindings work
+ config(['$compileProvider', '$locationProvider', function ($compileProvider, $locationProvider) {
+ $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|tel):/);
+ $locationProvider.html5Mode(true);
+ }]);
Added: tika/site/publish/1.14/miredot/js/controllers.js
URL: http://svn.apache.org/viewvc/tika/site/publish/1.14/miredot/js/controllers.js?rev=1769236&view=auto
==============================================================================
--- tika/site/publish/1.14/miredot/js/controllers.js (added)
+++ tika/site/publish/1.14/miredot/js/controllers.js Fri Nov 11 00:17:41 2016
@@ -0,0 +1,386 @@
+'use strict';
+
+/* Controllers */
+
+
+/**
+ * The main viewmodel for the doc. Loads a variable named restApiSource.
+ * @param $scope
+ * @constructor
+ */
+function DocRoot($scope, $location, $localStorage, $filter, $http) {
+
+ $scope.restBase = 'http://www.miredot.com/miredot/rest/';
+ $scope.visitWebsiteForProVersion = 'Visit our <a href="http://www.miredot.com/price/?licencerequest=pro" target="_blank">website</a> to get the full version (free for open source).';
+
+ $scope.$storage = $localStorage.$default({
+ //baseUrl: com.qmino.miredot.restApiSource.baseUrl || "http://example.com",
+ globalCollapsedState: false
+ });
+ $scope.$storage.baseUrl = com.qmino.miredot.restApiSource.baseUrl || "http://example.com";
+ $scope.editingBaseUrl = false;
+ $scope.projectTitle = com.qmino.miredot.restApiSource.projectTitle;
+ $scope.miredotVersion = com.qmino.miredot.restApiSource.miredotVersion;
+ $scope.validLicence = com.qmino.miredot.restApiSource.validLicence;
+ $scope.licenceType = com.qmino.miredot.restApiSource.licenceType;
+ $scope.licenceErrorMessage = com.qmino.miredot.restApiSource.licenceErrorMessage;
+ $scope.licenceHash = com.qmino.miredot.restApiSource.licenceHash;
+ $scope.allowUsageTracking = com.qmino.miredot.restApiSource.allowUsageTracking;
+ $scope.dateOfGeneration = com.qmino.miredot.restApiSource.dateOfGeneration;
+ $scope.projectWarnings = com.qmino.miredot.projectWarnings;
+ $scope.interfaces = com.qmino.miredot.restApiSource.interfaces;
+ $scope.tos = com.qmino.miredot.restApiSource.tos;
+ $scope.processErrors = com.qmino.miredot.processErrors;
+ $scope.jsonDocConfig = {
+ enabled: com.qmino.miredot.restApiSource.jsonDocEnabled,
+ hidden: com.qmino.miredot.restApiSource.jsonDocHidden
+ };
+
+ $scope.searchByExample = "";
+ $scope.searchQuery = {url : "", http: ""};
+ $scope.location = $location;
+ $scope.navigationView = 'hierarchical';
+
+ ensureLinksHaveTargetInApiIntro();
+
+ setGlobalCollapsedState($localStorage.globalCollapsedState);
+ $scope.hierarchyOpen = true;
+
+ // Set the view, based on the current location hash.
+ setView($location.hash());
+ // Watch the location hash and update the view when it changes.
+ $scope.$watch('location.hash()', function(newValue, oldValue) {
+ if (oldValue != newValue) {
+ setView(newValue);
+ }
+ });
+
+ $http.jsonp(
+ $scope.restBase +
+ 'version' +
+ '?hash=' + $scope.licenceHash + '&version=' + $scope.miredotVersion + '&licencetype=' + ($scope.licenceType || 'FREE') +
+ '&callback=JSON_CALLBACK')
+ .success(function(data) {
+ if (data.upToDate) {
+ $scope.versionCheckResult = "";
+ } else {
+ $scope.versionCheckResult = " | New version available: " + data.version;
+ }
+ });
+
+ $scope.formatTypeValue = function(typeValue) {
+ switch(typeValue.type) {
+ case 'collection':
+ return '[ ' + $scope.formatTypeValue(typeValue.typeValue) + ' ]';
+
+ case 'enum':
+ return 'enum';
+
+ default:
+ return typeValue.typeValue;
+ }
+ };
+
+ $scope.formatDefaultValue = function(typeValue, defaultValue) {
+ switch(typeValue.type) {
+ case 'enum':
+ var enumValues = enumArrayToString(typeValue.values);
+ enumValues = enumValues.replace(defaultValue, '<span class="default" title="Default value">' + defaultValue + '</span>');
+ return enumValues;
+ default:
+ if (defaultValue != undefined) {
+ return '<span class="default" title="Default value">' + defaultValue + '</span>'
+ }
+ return "";
+ }
+ };
+
+ /**
+ * Sets $scope.view, based on the given hash.
+ * Currently sets the view to 'interfaces' when it's not 'warnings'.
+ * eg. #1465486435 (interface hash) will cause the view to be 'interfaces'
+ *
+ * @param hash A string from which the current view will be determined
+ */
+ function setView(hash) {
+ if (hash === 'warnings') {
+ $scope.view = 'warnings';
+ } else {
+ $scope.view = 'interfaces';
+ }
+ }
+
+ /**
+ * Ensures that all links in the API intro have a target.
+ */
+ function ensureLinksHaveTargetInApiIntro() {
+ $("#intro a").attr('target', function(i, current) {
+ return current || '_self';
+ });
+ }
+
+ /**
+ * Function to clear the selection of service tags
+ */
+ function clearServiceTagSelection() {
+ _.each($scope.serviceTags, function(serviceTag) { serviceTag.selected = false; } );
+ }
+
+ // Build a map interfaceHash->interfaceObject
+ var interfacesByHash = {};
+ _.each($scope.interfaces, function(iface) {
+ interfacesByHash[iface.hash] = iface;
+ });
+
+ /**
+ * Build a list of tag objects
+ * {
+ * name: string, tag name
+ * selected: boolean, selected for filtering?
+ * }
+ */
+ $scope.serviceTags = (function() {
+ var tagNames = [];
+ _.each($scope.interfaces, function(currentInterface) {
+ _.each(currentInterface.tags, function(tagName) {
+ tagNames.push(tagName);
+ });
+ });
+ tagNames = _.uniq(tagNames);
+ return _.map(tagNames, function(tagName) { return {name : tagName, selected: false }; } );
+ }());
+
+ /**
+ * Function to look up the state of a service tag by name
+ * @param tagName The name of the service tag
+ */
+ $scope.isServiceTagSelected = function(tagName) {
+ var tag = _.find($scope.serviceTags, function(serviceTag) { return serviceTag.name === tagName; } );
+ return tag.selected;
+ };
+
+ // Build a map warningCategory->[warning]
+ $scope.projectWarningsByType = (function() {
+ var result = {};
+ _.each($scope.projectWarnings, function(projectWarning) {
+ result[projectWarning.category] = result[projectWarning.category] || [];
+ result[projectWarning.category].push(projectWarning);
+ });
+ return result;
+ }());
+
+ function appendUrl(rootParts, leafPart, url, method, hash, rootResource) {
+
+ var currentResource = null;
+ var parentResource = rootResource;
+ _.each(rootParts, function(rootPart) {
+
+ if (rootPart != "") {
+ currentResource = _.find(parentResource.resources, function(resource) {return resource.name === rootPart});
+
+ if (!currentResource) {
+ currentResource = {
+ name: rootPart,
+ resources: [],
+ leafResources: []
+ };
+ parentResource.resources.push(currentResource);
+ }
+ parentResource = currentResource;
+ } else {
+ currentResource = parentResource;
+ }
+ });
+
+ var existingLeaf = _.find(currentResource.leafResources, function(leaf) {
+ return leaf.url === url;
+ });
+
+ if (existingLeaf) {
+ existingLeaf.methods.push({method: method, hash: hash});
+ } else {
+ currentResource.leafResources.push({
+ name: leafPart,
+ url: url,
+ methods: [{method: method, hash: hash}]
+ });
+ }
+ }
+
+ /**
+ * Constructs a tree structure of the available resources. Stops on the first path parameter (starts with '{')
+ * {
+ * '/rest' :{
+ * resource: '/rest',
+ * subresources: {
+ * '/myresource': {
+ * resource: '/myresource',
+ * subresources: [ .. ]
+ * },
+ * {
+ * ..
+ * }
+ * }
+ * }
+ * }
+ */
+ function splitPaths(interfaces) {
+ //add the root resource
+ var resources = [
+ {
+ name: "",
+ resources: [],
+ leafResources: []
+ }
+ ];
+
+ _.each(interfaces, function(element, index, list) {
+ if (element.url.indexOf('/') !== 0) {
+ element.url = '/' + element.url;
+ }
+
+ var baseUrl, varUrl;
+ var varSplitIndex = element.url.indexOf('{');
+ if (varSplitIndex > -1) {
+ baseUrl = element.url.substring(0, varSplitIndex);
+ varUrl = element.url.substring(varSplitIndex, element.url.length);
+ } else {
+ baseUrl = element.url;
+ varUrl = undefined;
+ }
+
+ if (baseUrl === '/') {
+ baseUrl = '';
+ }
+
+ appendUrl(baseUrl.split('/'), varUrl, element.url, element.http, element.hash, resources[0]);
+ });
+
+ //remove the root resource if not used
+ if (resources[0].leafResources.length === 0) {
+ resources = resources[0].resources;
+ }
+
+ //sort resources on highest level
+ resources.sort(function(r1, r2) { return r1.name.localeCompare(r2.name) } );
+
+ return resources;
+ }
+
+ $scope.resourceTree = splitPaths(com.qmino.miredot.restApiSource.interfaces);
+
+ $scope.isComplexObject = function(type) {
+ return angular.isObject(type);
+ };
+
+ /**
+ * Gives the interface (from $scope.interfaces) given the interface's hash ($scope.interfaces[x].hash).
+ *
+ * @param {string} interfaceHash The hash value of the interface
+ * @return {object} An object contained in $scope.interfaces or undefined if not found.
+ */
+ $scope.getInterfaceByHash = function(interfaceHash) {
+ return interfacesByHash[interfaceHash];
+ };
+
+ $scope.interfaceHttpOrderFunction = function(iface) {
+ return _.indexOf($scope.httpMethods, iface.http);
+ };
+
+ $scope.methodHttpOrderFunction = function(method) {
+ return _.indexOf($scope.httpMethods, method.method);
+ };
+
+ $scope.httpMethods = ['GET','HEAD','PUT','POST','DELETE'];
+
+ $scope.toggleSearchQueryHttp = function(http) {
+ if ($scope.searchQuery.http === http) {
+ $scope.searchQuery.http = "";
+ } else {
+ $scope.searchQuery.http = http;
+ }
+ };
+
+ $scope.setGlobalCollapsedState = setGlobalCollapsedState;
+
+ function setGlobalCollapsedState(collapsed) {
+ $localStorage.globalCollapsedState = collapsed;
+ _.each($scope.interfaces, function(currentInterface) {
+ currentInterface.collapsed = collapsed;
+ })
+ }
+
+ $scope.getFirstLeaf = function(resource) {
+ var orderBy = $filter('orderBy');
+ if (resource.leafResources.length > 0) {
+ var orderedLeafResources = orderBy(resource.leafResources, 'url');
+ var firstLeafResource = orderedLeafResources[0];
+ var orderedMethods = orderBy(firstLeafResource.methods, $scope.methodHttpOrderFunction);
+ return orderedMethods[0];
+ } else {
+ return $scope.getFirstLeaf(orderBy(resource.resources, 'name')[0]);
+ }
+ };
+
+ /*
+ $scope.collapseTree = function() {
+
+ collapseResources($scope.resourceTree);
+ };
+
+ function collapseResources(resources) {
+ _.each(resources, function(resource) {
+ resource.hierarchyOpen = false;
+ collapseResources(resource.resources);
+ })
+ }
+
+ $scope.collapseTree();
+ */
+}
+
+/**
+ * Parses an escaped url query string into key-value pairs.
+ * @source AngularJS
+ * @returns Object.<(string|boolean)>
+ */
+function parseKeyValue(/**string*/keyValue) {
+ var obj = {}, key_value, key;
+ angular.forEach((keyValue || "").split('&'), function(keyValue) {
+ if (keyValue) {
+ key_value = keyValue.split('=');
+ key = decodeURIComponent(key_value[0]);
+ obj[key] = angular.isDefined(key_value[1]) ? decodeURIComponent(key_value[1]) : true;
+ }
+ });
+ return obj;
+}
+
+/**
+ * Assumes as input an array of strings (eg ['a', 'b']) and generates a string representation '"a" | "b"'
+ * @param enumArray the array of strings
+ * @returns {string} the stringrepresentation of the given array
+ */
+function enumArrayToString(enumArray) {
+ var output = '';
+ for (var i=0;i<enumArray.length; i++) {
+ if (i != 0) {
+ output += ' | ';
+ }
+ output += enumArray[i];
+ }
+ return output;
+}
+
+String.prototype.stripTrailingSlash = function() {
+ if (this.substr(-1) === '/') {
+ return this.substr(0, this.length - 1);
+ }
+ return this;
+};
+String.prototype.ensureStartsWithSlash = function() {
+ if (this.substr(0, 1) !== '/') {
+ return '/' + this;
+ }
+ return this;
+};
\ No newline at end of file
Added: tika/site/publish/1.14/miredot/js/directives.js
URL: http://svn.apache.org/viewvc/tika/site/publish/1.14/miredot/js/directives.js?rev=1769236&view=auto
==============================================================================
--- tika/site/publish/1.14/miredot/js/directives.js (added)
+++ tika/site/publish/1.14/miredot/js/directives.js Fri Nov 11 00:17:41 2016
@@ -0,0 +1,320 @@
+'use strict';
+
+/* Directives */
+
+angular.module('miredot.directives', []);
+
+angular.module('miredot.directives')
+ /**
+ * Renders a json-to
+ */
+ .directive('jsonTo', function ($compile) {
+
+ var _idCount = 0;
+ function getNewId() {
+ return _idCount++;
+ }
+
+ function getHighlightHtml(to) {
+ var html = '';
+ var id = to.__md_id || to.__sub_id;
+ var addHoverClass = 'onmouseover="$(\'#' + id + '\').addClass(\'highlightJsonRecursive\');"';
+ var removeHoverClass = 'onmouseout="$(\'#' + id + '\').removeClass(\'highlightJsonRecursive\');"';
+ html += '<a href="#' + id + '_a" ' + addHoverClass + ' ' + removeHoverClass + ' class="recursionLink" target="_self">';
+ html += '<i class="icon-retweet"></i>';
+ html += '</a>';
+ return html;
+ }
+
+ return {
+ restrict: 'E',
+ transclude: false,
+ scope: {
+ to:'=',
+ jsonDocConfig:'='
+ },
+ link: function (scope, element, attrs) {
+
+ /**
+ * Recursively renders the given TO as json.
+ * @param {Object | string} to The current object to render.
+ * @param {string} comment The comment of this field.
+ * @param {Array} history All TOs that have already been rendered in the path leading here.
+ * @return {String}
+ */
+ var build = function(to, comment, history) {
+ history = history || [];
+ var newHistory;
+
+ var html = '';
+
+ switch (to.type) {
+ case 'simple':
+ html += '<span class="parameterType">';
+ html += to.typeValue;
+ html += '</span>';
+ html += buildComment(comment);
+ break;
+
+ case 'enum':
+ html += '<span class="parameterType">';
+ html += enumArrayToString(to.values);
+ html += '</span>';
+ html += buildComment(comment);
+ break;
+
+ case 'collection':
+ html += '<span>[</span>';
+ html += buildComment(comment);
+ html += '<ul class="toContainer"><li class="parameterItem">';
+ html += build(to.typeValue, to.comment, history);
+ html += '</li></ul>';
+ html += '<span>]</span>';
+ break;
+
+ case 'map':
+ html += '<span>{</span>';
+ html += buildComment(comment);
+ html += '<ul class="toContainer"><li class="parameterItem">';
+ html += '<span class="parameterType">string</span> =>';
+ html += build(to.typeValue, to.comment, history);
+ html += '</li></ul>';
+ html += '<span>}</span>';
+ break;
+
+ default: //(abstract or complex)
+ //did wee see this type before?
+ if (_.indexOf(history, to.name) >= 0) {
+ //use it's id to highlight it
+ html += getHighlightHtml(to);
+ html += buildComment(comment);
+ } else {
+ newHistory = history.slice(0); // clone the history
+ newHistory.push(to.name);
+
+ //set a unique id for this type
+ to.__md_id = 'md_to_' + getNewId();
+
+ html += buildComment(comment);
+
+ //start TO div (with id to be able to highlight)
+ html += '<a id="' + to.__md_id + '_a" class="anchor"></a>';
+ html += '<div id="' + to.__md_id + '">';
+ html += '<span>{</span>';
+ html += '<ul class="toContainer">';
+
+ switch(to.type) {
+ case 'abstract':
+ html += buildAbstractToProperties(to, newHistory);
+ break;
+
+ case 'complex':
+ html += buildComplexToProperties(to, newHistory);
+ break;
+ }
+
+ //end TO div
+ html += '</ul>';
+ html += '<span>}</span>';
+ html += '</div>';
+ }
+ break;
+ }
+ return html;
+ };
+
+ function buildComment(comment) {
+ var result = '';
+ if (scope.jsonDocConfig.enabled && comment) {
+ result += '<span class="propertyComment" ng-show="!jsonDocConfig.hidden">';
+ result += comment;
+ result += '</span>';
+ }
+ return result;
+ }
+
+ /**
+ * Lists properties of complex to.
+ * @param {Object | string} to The current object to render.
+ * @param {Array} history All TOs that have already been rendered in the path leading here.
+ * @param {Array} listedProperties All properties that have been shown and should not be shown again
+ */
+ function buildComplexToProperties(to, history, listedProperties) {
+ listedProperties = listedProperties || [];
+
+ var html = '';
+
+ _.each(to.content, function(field) {
+ if (_.indexOf(listedProperties, field.name) < 0) {
+ html += '<li class="parameterItem"><span class="parameterName">' + field.name + ':</span>';
+ html += build(field.typeValue, field.comment, history);
+ html += "</li>";
+
+ listedProperties.push(field.name);
+ }
+ });
+ return html;
+ }
+
+ /**
+ * Lists properties of abstract to.
+ * @param {Object | string} to The current object to render.
+ * @param {Array} history All TOs that have already been rendered in the path leading here.
+ * @param {Array} listedProperties All properties that have been shown and should not be shown again
+ */
+ function buildAbstractToProperties(to, history, listedProperties) {
+ listedProperties = listedProperties || [];
+ if (to.property) { //property name used in JsonTypeInfo should not be repeated in the list of properties
+ listedProperties.push(to.property);
+ }
+
+ var html = '';
+
+ //get a unique name for the angular model for the subType switcher
+ var subTypeModel = 'subTypeModel' + getNewId();
+
+ //list properties of this class
+ html += buildComplexToProperties(to, history, listedProperties);
+
+ //show subType switcher
+ html += '<li class="parameterItem">';
+ if (to.property) { //property name used in JsonTypeInfo
+ html += '<span class="parameterName">' + to.property + ':</span>';
+ }
+ html += '<span class="parameterType"><div class="btn-group">';
+
+ var first = true;
+ _.each(to.subTypes, function(subType) {
+ //set a unique id for this subType
+ subType.to.__sub_id = 'md_to_' + getNewId();
+ if (first) {
+ scope[subTypeModel] = subType.to.__sub_id; //set the default model value to the first subType id
+ first = false;
+ }
+ //show the button with the name of the subType (based on JsonTypeInfo)
+ //clicking this button changes the value of the current subTypeModel property to the id of the subType
+ html += '<button type="button" class="btn" ng-model="' + subTypeModel + '" ' +
+ 'btn-radio="\'' + subType.to.__sub_id + '\'">' + subType.name + '</button>';
+ });
+
+ html += '</div></span>';
+ html += buildComment(to.comment);
+ html += '</li>';
+
+
+ //show subTypes, like complex type, but inline fields & only shown when subTypeModel is set to it's id
+ _.each(to.subTypes, function(subType) {
+ var newHistory = history.slice(0); // clone the history
+ var newListedProperties = listedProperties.slice(0); // clone the already listed properties
+
+ html += '<a id="' + subType.to.__sub_id + '_a" class="anchor"></a>';
+ //only show this subType's fields when subTypeModel is set to it's id
+ html += '<div ng-show="' + subTypeModel + ' == \'' + subType.to.__sub_id + '\'" id="' + subType.to.__sub_id + '">';
+
+ switch (subType.to.type) {
+ case 'complex':
+ newHistory.push(subType.to.name);
+ html += buildComplexToProperties(subType.to, newHistory, newListedProperties);
+ break;
+ case 'abstract':
+ html += buildAbstractToProperties(subType.to, newHistory, newListedProperties);
+ break;
+ }
+ html += '</div>';
+ });
+ return html;
+ }
+
+
+ var togglePropertyCommentsHtml = '';
+
+ if (scope.jsonDocConfig.enabled) {
+ togglePropertyCommentsHtml += '<span class="togglePropertyComments" ' +
+ 'ng-click="jsonDocConfig.hidden = !jsonDocConfig.hidden">' +
+ '<span ng-show="jsonDocConfig.hidden">Show</span>' +
+ '<span ng-show="!jsonDocConfig.hidden">Hide</span>' +
+ ' descriptions</span>';
+ }
+
+ var newElement = angular.element(togglePropertyCommentsHtml + build(scope.to));
+ $compile(newElement)(scope);
+ element.replaceWith(newElement);
+ }
+ };
+ })
+
+ .directive('widthonblur', function () {
+ return function(scope, element, attrs) {
+ element.css("width", attrs.widthonblur);
+
+ element.bind("blur", function() {
+ element.css("width", attrs.widthonblur);
+ });
+ }
+ })
+ .directive('widthonfocus', function () {
+ return function(scope, element, attrs) {
+ element.bind("focus", function() {
+ element.css("width", attrs.widthonfocus);
+ })
+ }
+ })
+ //ngFocus will be included in later angular versions
+ .directive('onFocus', ['$parse', function($parse) {
+ return function(scope, element, attr) {
+ var fn = $parse(attr['onFocus']);
+ element.bind('focus', function(event) {
+ scope.$apply(function() {
+ fn(scope, {$event:event});
+ });
+ });
+ }
+} ])
+ //ngBlur will be included in later angular versions
+ .directive('onBlur', ['$parse', function($parse) {
+ return function(scope, element, attr) {
+ var fn = $parse(attr['onBlur']);
+ element.bind('blur', function(event) {
+ scope.$apply(function() {
+ fn(scope, {$event:event});
+ });
+ });
+ }
+ }])
+ //focus when some condition becomes true
+ .directive('focusWhen', function($parse, $timeout) {
+ return function(scope, element, attr) {
+ scope.$watch(attr['focusWhen'],
+ function(newValue, oldValue) {
+ if (!oldValue && !!newValue) {
+ $timeout(function() {
+ element.focus();
+
+ //move cursor te end if input field (not required in chrome)
+ if (element.val()) {
+ var tmpStr = element.val();
+ element.val('');
+ element.val(tmpStr);
+ }
+ });
+ }
+ }, true);
+ };
+ })
+ //evaluate expression when user presses enter
+ .directive('onEnter', function() {
+ return function(scope, element, attrs) {
+ element.bind("keydown keypress", function(event) {
+ if(event.which === 13) {
+ scope.$apply(function(){
+ scope.$eval(attrs.onEnter);
+ });
+
+ event.preventDefault();
+ }
+ });
+ };
+ });
+
+
+
Added: tika/site/publish/1.14/miredot/js/filters.js
URL: http://svn.apache.org/viewvc/tika/site/publish/1.14/miredot/js/filters.js?rev=1769236&view=auto
==============================================================================
--- tika/site/publish/1.14/miredot/js/filters.js (added)
+++ tika/site/publish/1.14/miredot/js/filters.js Fri Nov 11 00:17:41 2016
@@ -0,0 +1,218 @@
+'use strict';
+
+/* Filters */
+
+angular.module('miredot.filters', ['ngSanitize', 'ui.filters']).
+ filter('formatUrlParams', function(){
+ return function(value) {
+ if (!value) {
+ return value;
+ }
+ return value.toString().replace(new RegExp("{(.*?)}", 'gi'), '<span class="paramName">$1</span>');
+ };
+ }).
+ filter('capitaliseFirstLetter', function(){
+ return function (string) {
+ return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();
+ };
+ }).
+ filter('arraySort', function() {
+ return function(input) {
+ return input.sort();
+ }
+ }).
+ filter('searchByExampleFilter', function() {
+ /**
+ * Removes the domain (and protocol) from an uri. Requires / after domain part.
+ * @param uri
+ */
+ function removeDomain(uri) {
+ return uri.replace(/^.*\/\/[^\/]+/, '');
+ }
+
+ /**
+ * Builds a regexp for the given interface
+ * @param iface the interface to get the regex for
+ * @return a case insensitive regex for the current interface
+ */
+ function getRegExp(iface) {
+ var url = iface.url.stripTrailingSlash();
+
+ // Escape regexp special characters.
+ // url = url.replace(/[-\/\\^$*+?.()|[\]]/g, "\\$&");
+ url = '^' + url + '$';
+ var regex = '';
+
+ //matches everything within {} (start with '{', than anything but '}', end with '}')
+ var re = /{([^\}]+)}/g, paramMatch, lastMatchedIndex = 0;
+
+ while ((paramMatch = re.exec(url)) !== null) {
+ // Find each {param} in `url` and replace it with a capturing group.
+ // Append all other sections of url unchanged.
+
+ regex += url.slice(lastMatchedIndex, paramMatch.index);
+
+ // The path param is the part between "{}" (the first parenthesized substring match)
+ var pathParam = paramMatch[1];
+
+ // Special case if path contains params with regex, e.g. {id : \d+}
+ if (pathParam.indexOf(":") > 0) {
+ //the regex is the part after the ":"
+ var paramRegex = jQuery.trim(pathParam.split(":")[1]);
+ //just use this as regex
+ regex += '(' + paramRegex + ')';
+ } else {
+ regex += '([^\\/]*)'; //anything except "/"
+ }
+ lastMatchedIndex = re.lastIndex;
+ }
+ // Append trailing path part.
+ regex += url.substr(lastMatchedIndex);
+
+ // Case insensitive regex
+ return new RegExp(regex, "i");
+ }
+
+ /**
+ * Filters out all interfaces that don't match the given search string.
+ *
+ * The baseUrl is dropped from the search string in searchString
+ * If the search string contains a query param, all query params need to be filled in to match.
+ *
+ * e.g. search string: http://www.example.com/feature/5?limit=10
+ * will match interface: /feature/{id} with query params limit
+ * will not match interface: /feature/{id} with no query params
+ * will not match interface: /feature/{id} with query params limit, start
+ * will not match interface: /feature/ with query params limit
+ *
+ * @param searchString The search string
+ * @return function that returns true if the given interface matches the search string, false otherwise
+ */
+ function searchByExampleFilter(searchString) {
+ return function(currentInterface, baseUrl) {
+ if (searchString.length === 0) {
+ return true;
+ }
+
+ var split = searchString.split("?");
+ var locationPart = split[0];
+ var queryPart = split[1];
+
+ if (angular.isDefined(queryPart)) {
+ var queryParams = parseKeyValue(queryPart);
+ var valid = true;
+ angular.forEach(currentInterface.inputs.QUERY, function(queryParam) {
+ valid = valid && (valid = angular.isDefined(queryParams[queryParam.name.toLowerCase()]));
+ });
+ if (!valid) return false;
+ }
+
+ var search = locationPart.replace(baseUrl, "").stripTrailingSlash().ensureStartsWithSlash();
+
+ //interface will not change, so create the regex only once
+ currentInterface.regexp = currentInterface.regexp || getRegExp(currentInterface);
+
+ return currentInterface.regexp.test(search);
+ }
+ }
+
+ //expects a list of interfaces, returns a list of interfaces (default for filter)
+// return function(interfaces, searchString) {
+// return _.filter(interfaces, searchByExampleFilter(searchString));
+// }
+
+ //expects one interface, returns true or false
+ return function(iface, searchString, baseUrl) {
+ return searchByExampleFilter(searchString)(iface, baseUrl);
+ }
+ }).
+ filter('filterBySearchQuery', function() {
+ function recursiveMatch(searchQuery) {
+ return function(resource) {
+ if (searchQuery.url.length === 0) {
+ return true;
+ }
+ if (resource.name.toLowerCase().indexOf(searchQuery.url.toLowerCase()) > -1) {
+ return true;
+ }
+ for (var i = 0; i<resource.leafResources.length; i++) {
+ if (resource.leafResources[i].url.toLowerCase().indexOf(searchQuery.url.toLowerCase()) > -1) {
+ return true;
+ }
+ }
+ for (var j = 0; j<resource.resources.length; j++) {
+ if (recursiveMatch(searchQuery)(resource.resources[j])) {
+ return true;
+ }
+ }
+ return false;
+ }
+ }
+
+ //expects a list of resources, returns a list of resources (default for filter)
+// return function(resources, searchQuery) {
+// return _.filter(resources, recursiveMatch(searchQuery));
+// }
+
+ //expects one resource, returns true or false
+ return function(resource, searchQuery) {
+ return recursiveMatch(searchQuery)(resource);
+ }
+
+ }).
+ filter('serviceTagFilter', function() {
+ /**
+ * Filters out all interfaces that don't have all the currently selected service tags
+ *
+ * @param currentInterface The interface to check the service tags for
+ */
+ function matchesServiceTags(serviceTags) {
+ return function(currentInterface) {
+ return _.every(serviceTags, function(serviceTag) {
+ if (serviceTag.selected) {
+ return _.contains(currentInterface.tags, serviceTag.name);
+ }
+ return true;
+ });
+ }
+ }
+
+ //expects a list of interfaces, returns a list of interfaces (default for filter)
+// return function(interfaces, serviceTags) {
+// return _.filter(interfaces, matchesServiceTags(serviceTags));
+// };
+
+ //expects one interface, returns true or false
+ return function(currentInterface, serviceTags) {
+ return matchesServiceTags(serviceTags)(currentInterface);
+ }
+ }).
+ filter('searchQueryFilter', function() {
+ /**
+ * Filters out all interfaces that don't match the current search query
+ *
+ * @param currentInterface The interface to check the search query for
+ */
+ function matchesSearchQuery(searchQuery) {
+ return function(currentInterface) {
+ if(searchQuery.http && currentInterface.http.indexOf(searchQuery.http) < 0) {
+ return false;
+ }
+ if(searchQuery.url && currentInterface.url.toLowerCase().indexOf(searchQuery.url.toLowerCase()) < 0) {
+ return false;
+ }
+
+ return true;
+ }
+ }
+
+ //expects a list of interfaces, returns a list of interfaces (default for filter)
+// return function(interfaces, serviceTags) {
+// return _.filter(interfaces, matchesServiceTags(serviceTags));
+// };
+
+ //expects one interface, returns true or false
+ return function(currentInterface, searchQuery) {
+ return matchesSearchQuery(searchQuery)(currentInterface);
+ }
+ });
\ No newline at end of file
Added: tika/site/publish/1.14/miredot/js/ngStorage.js
URL: http://svn.apache.org/viewvc/tika/site/publish/1.14/miredot/js/ngStorage.js?rev=1769236&view=auto
==============================================================================
--- tika/site/publish/1.14/miredot/js/ngStorage.js (added)
+++ tika/site/publish/1.14/miredot/js/ngStorage.js Fri Nov 11 00:17:41 2016
@@ -0,0 +1,113 @@
+'use strict';
+
+(function() {
+
+ /**
+ * From: https://github.com/gsklee/ngStorage
+ * @ngdoc overview
+ * @name ngStorage
+ */
+
+ angular.module('ngStorage', []).
+
+ /**
+ * @ngdoc object
+ * @name ngStorage.$localStorage
+ * @requires $rootScope
+ * @requires $browser
+ * @requires $window
+ */
+
+ factory('$localStorage', _storageFactory('localStorage')).
+
+ /**
+ * @ngdoc object
+ * @name ngStorage.$sessionStorage
+ * @requires $rootScope
+ * @requires $browser
+ * @requires $window
+ */
+
+ factory('$sessionStorage', _storageFactory('sessionStorage'));
+
+ function _storageFactory(storageType) {
+ return [
+ '$rootScope',
+ '$browser',
+ '$window',
+
+ function(
+ $rootScope,
+ $browser,
+ $window
+ ){
+ var webStorage = $window[storageType],
+ $storage = {
+ $default: function(items) {
+ for (var k in items) {
+ angular.isDefined($storage[k]) || ($storage[k] = items[k]);
+ }
+
+ return $storage;
+ },
+ $reset: function(items) {
+ for (var k in $storage) {
+ '$' === k[0] || delete $storage[k];
+ }
+
+ return $storage.$default(items);
+ }
+ },
+ _last$storage;
+
+ //degrade gracefully in Internet Explorer when loading page from filesystem
+ webStorage = webStorage || { setItem: function() {}, getItem: function() {}, removeItem:function() {} };
+
+ // (#8) `i < webStorage.length` is needed for IE9
+ for (var i = 0, k; i < webStorage.length && (k = webStorage.key(i)); i++) {
+ 'ngStorage-' === k.slice(0, 10) && ($storage[k.slice(10)] = angular.fromJson(webStorage.getItem(k)));
+ }
+
+ _last$storage = angular.copy($storage);
+
+ $browser.addPollFn(function() {
+ if (!angular.equals($storage, _last$storage)) {
+ angular.forEach($storage, function(v, k) {
+ if (angular.isDefined(v) && '$' !== k[0]) {
+
+ // Remove $$hashKey and other things that cannot be stringified
+ $storage[k] = angular.fromJson(angular.toJson(v));
+
+ webStorage.setItem('ngStorage-' + k, angular.toJson(v));
+ }
+
+ delete _last$storage[k];
+ });
+
+ for (var k in _last$storage) {
+ webStorage.removeItem('ngStorage-' + k);
+ }
+
+ _last$storage = angular.copy($storage);
+
+ $rootScope.$apply();
+ }
+ });
+
+ // (#6) Use `$window.addEventListener` instead of `angular.element` to avoid the jQuery-specific `event.originalEvent`
+ 'localStorage' === storageType && $window.addEventListener && $window.addEventListener('storage', function(event) {
+ if ('ngStorage-' === event.key.slice(0, 10)) {
+ event.newValue ? $storage[event.key.slice(10)] = angular.fromJson(event.newValue) : delete $storage[event.key.slice(10)];
+
+ _last$storage = angular.copy($storage);
+
+ $rootScope.$apply();
+ }
+ });
+
+ return $storage;
+ }
+ ];
+ }
+
+})();
Added: tika/site/publish/1.14/miredot/js/watch-fighters.js
URL: http://svn.apache.org/viewvc/tika/site/publish/1.14/miredot/js/watch-fighters.js?rev=1769236&view=auto
==============================================================================
--- tika/site/publish/1.14/miredot/js/watch-fighters.js (added)
+++ tika/site/publish/1.14/miredot/js/watch-fighters.js Fri Nov 11 00:17:41 2016
@@ -0,0 +1,108 @@
+'use strict';
+
+//based on https://github.com/abourget/abourget-angular
+angular.module('watchFighers', [])
+
+ .directive('setIf', [function () {
+ return {
+ transclude: 'element',
+ priority: 1000,
+ terminal: true,
+ restrict: 'A',
+ compile: function (element, attr, linker) {
+ return function (scope, iterStartElement, attr) {
+ iterStartElement[0].doNotMove = true;
+ var expression = attr.setIf;
+ var value = scope.$eval(expression);
+ if (value) {
+ linker(scope, function (clone) {
+ iterStartElement.after(clone);
+ });
+ }
+ };
+ }
+ };
+ }])
+
+
+ .directive('setHtml', function() {
+ return {
+ restrict: "A",
+ priority: 100,
+ link: function($scope, $el, $attr) {
+ $($el).html($scope.$eval($attr.setHtml) || '');
+ }
+ };
+ })
+
+ .directive('setText', function() {
+ return {
+ restrict: "A",
+ priority: 100,
+ link: function($scope, $el, $attr) {
+ $($el).text($scope.$eval($attr.setText) || '');
+ }
+ };
+ })
+
+ .directive('setClass', function() {
+ return {
+ restrict: "A",
+ priority: 100,
+ link: function($scope, $el, $attr) {
+
+ function setClass(attributeValue, $scope, $el) {
+ if (attributeValue.indexOf(":") > 0) { //classname : condition
+ var classNameCondition = attributeValue.split(":", 2);
+ var className = jQuery.trim(classNameCondition[0]);
+ var condition = $scope.$eval(jQuery.trim(classNameCondition[1]));
+ if (condition) {
+ $($el).addClass(className);
+ }
+ } else { //just classname
+ $($el).addClass($scope.$eval(attributeValue) || '');
+ }
+ }
+
+ if ($attr.setClass.indexOf(",") > 0) { //multiple classes
+ _.each($attr.setClass.split(','), function(attributeValue) {
+ setClass(jQuery.trim(attributeValue), $scope, $el);
+ });
+ } else {
+ setClass($attr.setClass, $scope, $el);
+ }
+ }
+ };
+ })
+
+ .directive('setTitle', function() {
+ return {
+ restrict: "A",
+ priority: 100,
+ link: function($scope, $el, $attr) {
+ $($el).attr('title', $scope.$eval($attr.setTitle) || '');
+ }
+ };
+ })
+
+ .directive('setHref', function() {
+ return {
+ restrict: "A",
+ priority: 100,
+ link: function($scope, $el, $attr) {
+ $($el).attr('href', $scope.$eval($attr.setHref) || '');
+ }
+ };
+ })
+
+ .directive('setId', function() {
+ return {
+ restrict: "A",
+ priority: 100,
+ link: function($scope, $el, $attr) {
+ $($el).attr('id', $scope.$eval($attr.setId) || '');
+ }
+ };
+ })
+
+ ;
\ No newline at end of file
Added: tika/site/publish/1.14/miredot/lib/angular-ui/angular-ui-ieshiv.js
URL: http://svn.apache.org/viewvc/tika/site/publish/1.14/miredot/lib/angular-ui/angular-ui-ieshiv.js?rev=1769236&view=auto
==============================================================================
--- tika/site/publish/1.14/miredot/lib/angular-ui/angular-ui-ieshiv.js (added)
+++ tika/site/publish/1.14/miredot/lib/angular-ui/angular-ui-ieshiv.js Fri Nov 11 00:17:41 2016
@@ -0,0 +1,59 @@
+/**
+ * AngularUI - The companion suite for AngularJS
+ * @version v0.4.0 - 2013-02-15
+ * @link http://angular-ui.github.com
+ * @license MIT License, http://www.opensource.org/licenses/MIT
+ */
+
+// READ: http://docs-next.angularjs.org/guide/ie
+// element tags are statically defined in order to accommodate lazy-loading whereby directives are also unknown
+
+// The ieshiv takes care of our ui.directives and AngularJS's ng-view, ng-include, ng-pluralize, ng-switch.
+// However, IF you have custom directives that can be used as html tags (yours or someone else's) then
+// add list of directives into <code>window.myCustomTags</code>
+
+// <!--[if lte IE 8]>
+// <script>
+// window.myCustomTags = [ 'yourCustomDirective', 'somebodyElsesDirective' ]; // optional
+// </script>
+// <script src="build/angular-ui-ieshiv.js"></script>
+// <![endif]-->
+
+(function (exports) {
+
+ var debug = window.ieShivDebug || false,
+ tags = [ "ngInclude", "ngPluralize", "ngView", "ngSwitch", "uiCurrency", "uiCodemirror", "uiDate", "uiEvent",
+ "uiKeypress", "uiKeyup", "uiKeydown", "uiMask", "uiMapInfoWindow", "uiMapMarker", "uiMapPolyline",
+ "uiMapPolygon", "uiMapRectangle", "uiMapCircle", "uiMapGroundOverlay", "uiModal", "uiReset",
+ "uiScrollfix", "uiSelect2", "uiShow", "uiHide", "uiToggle", "uiSortable", "uiTinymce"
+ ];
+
+ window.myCustomTags = window.myCustomTags || []; // externally defined by developer using angular-ui directives
+ tags.push.apply(tags, window.myCustomTags);
+
+ var toCustomElements = function (str) {
+ var result = [];
+ var dashed = str.replace(/([A-Z])/g, function ($1) {
+ return " " + $1.toLowerCase();
+ });
+ var tokens = dashed.split(' ');
+ var ns = tokens[0];
+ var dirname = tokens.slice(1).join('-');
+
+ // this is finite list and it seemed senseless to create a custom method
+ result.push(ns + ":" + dirname);
+ result.push(ns + "-" + dirname);
+ result.push("x-" + ns + "-" + dirname);
+ result.push("data-" + ns + "-" + dirname);
+ return result;
+ };
+
+ for (var i = 0, tlen = tags.length; i < tlen; i++) {
+ var customElements = toCustomElements(tags[i]);
+ for (var j = 0, clen = customElements.length; j < clen; j++) {
+ var customElement = customElements[j];
+ document.createElement(customElement);
+ }
+ }
+
+})(window);
\ No newline at end of file
Added: tika/site/publish/1.14/miredot/lib/angular-ui/angular-ui-ieshiv.min.js
URL: http://svn.apache.org/viewvc/tika/site/publish/1.14/miredot/lib/angular-ui/angular-ui-ieshiv.min.js?rev=1769236&view=auto
==============================================================================
--- tika/site/publish/1.14/miredot/lib/angular-ui/angular-ui-ieshiv.min.js (added)
+++ tika/site/publish/1.14/miredot/lib/angular-ui/angular-ui-ieshiv.min.js Fri Nov 11 00:17:41 2016
@@ -0,0 +1,7 @@
+/**
+ * AngularUI - The companion suite for AngularJS
+ * @version v0.4.0 - 2013-02-15
+ * @link http://angular-ui.github.com
+ * @license MIT License, http://www.opensource.org/licenses/MIT
+ */
+(function(e){var t=window.ieShivDebug||!1,n=["ngInclude","ngPluralize","ngView","ngSwitch","uiCurrency","uiCodemirror","uiDate","uiEvent","uiKeypress","uiKeyup","uiKeydown","uiMask","uiMapInfoWindow","uiMapMarker","uiMapPolyline","uiMapPolygon","uiMapRectangle","uiMapCircle","uiMapGroundOverlay","uiModal","uiReset","uiScrollfix","uiSelect2","uiShow","uiHide","uiToggle","uiSortable","uiTinymce"];window.myCustomTags=window.myCustomTags||[],n.push.apply(n,window.myCustomTags);var r=function(e){var t=[],n=e.replace(/([A-Z])/g,function(e){return" "+e.toLowerCase()}),r=n.split(" "),i=r[0],s=r.slice(1).join("-");return t.push(i+":"+s),t.push(i+"-"+s),t.push("x-"+i+"-"+s),t.push("data-"+i+"-"+s),t};for(var i=0,s=n.length;i<s;i++){var o=r(n[i]);for(var u=0,a=o.length;u<a;u++){var f=o[u];document.createElement(f)}}})(window);
\ No newline at end of file
Added: tika/site/publish/1.14/miredot/lib/angular-ui/angular-ui.css
URL: http://svn.apache.org/viewvc/tika/site/publish/1.14/miredot/lib/angular-ui/angular-ui.css?rev=1769236&view=auto
==============================================================================
--- tika/site/publish/1.14/miredot/lib/angular-ui/angular-ui.css (added)
+++ tika/site/publish/1.14/miredot/lib/angular-ui/angular-ui.css Fri Nov 11 00:17:41 2016
@@ -0,0 +1,50 @@
+/**
+ * import components to builds angular-ui.css
+ */
+
+/* ui-reset */
+
+.ui-resetwrap {
+ position: relative;
+ display: inline-block;
+}
+
+.ui-reset {
+ position: absolute;
+ top: 0;
+ right: 0;
+ z-index: 2;
+ display: none;
+ height: 100%;
+ cursor: pointer;
+}
+
+.ui-resetwrap:hover .ui-reset {
+ display: block;
+}
+
+/* ui-currency */
+
+.ui-currency-pos {
+ color: green;
+}
+
+.ui-currency-neg {
+ color: red;
+}
+
+.ui-currency-zero {
+ color: blue;
+}
+
+.ui-currency-pos.ui-bignum,
+.ui-currency-neg.ui-smallnum {
+ font-size: 110%;
+}
+
+/* highlight */
+
+.ui-match {
+ background: yellow;
+}
+