Lists all Persons that were at the same place (id) at the same time.
+ If the place is indoor, the contact persons of each person is added to the result too.
+
+
Parameters:
+
s - contains program argument (id of place and date string, separated by comma)
Returns the enum constant of this class with the specified name.
+The string must match exactly an identifier used to declare an
+enum constant in this class. (Extraneous whitespace characters are
+not permitted.)
+
+
Parameters:
+
name - the name of the enum constant to be returned.
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
Overview
+
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+
+
+
Package
+
Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain six categories:
+
+
Interfaces
+
Classes
+
Enum Classes
+
Exceptions
+
Errors
+
Annotation Interfaces
+
+
+
+
Class or Interface
+
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+
+
Class Inheritance Diagram
+
Direct Subclasses
+
All Known Subinterfaces
+
All Known Implementing Classes
+
Class or Interface Declaration
+
Class or Interface Description
+
+
+
+
Nested Class Summary
+
Field Summary
+
Property Summary
+
Constructor Summary
+
Method Summary
+
+
+
+
Field Details
+
Property Details
+
Constructor Details
+
Method Details
+
+
The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+
+
+
Annotation Interface
+
Each annotation interface has its own separate page with the following sections:
+
+
Annotation Interface Declaration
+
Annotation Interface Description
+
Required Element Summary
+
Optional Element Summary
+
Element Details
+
+
+
+
Enum Class
+
Each enum class has its own separate page with the following sections:
+
+
Enum Declaration
+
Enum Description
+
Enum Constant Summary
+
Enum Constant Details
+
+
+
+
Use
+
Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its "Use" page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+
+
+
Tree (Class Hierarchy)
+
There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.
+
+
When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
+
When viewing a particular package, class or interface page, clicking on "Tree" displays the hierarchy for only that package.
+
+
+
+
Index
+
The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields, as well as lists of all packages and all classes.
You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camel-case" abbreviations. For example:
+
+
j.l.obj will match "java.lang.Object"
+
InpStr will match "java.io.InputStream"
+
HM.cK will match "java.util.HashMap.containsKey(Object)"
+
+
diff --git a/docs/jquery-ui.overrides.css b/docs/jquery-ui.overrides.css
new file mode 100644
index 0000000..f89acb6
--- /dev/null
+++ b/docs/jquery-ui.overrides.css
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+.ui-state-active,
+.ui-widget-content .ui-state-active,
+.ui-widget-header .ui-state-active,
+a.ui-button:active,
+.ui-button:active,
+.ui-button.ui-state-active:hover {
+ /* Overrides the color of selection used in jQuery UI */
+ background: #F8981D;
+}
diff --git a/docs/member-search-index.js b/docs/member-search-index.js
new file mode 100644
index 0000000..22d7e7d
--- /dev/null
+++ b/docs/member-search-index.js
@@ -0,0 +1 @@
+memberSearchIndex = [{"p":"de.dhbw.contactdb","c":"Main","l":"argument_error()"},{"p":"de.dhbw.contactdb.utils","c":"db_new_entity","l":"db_new_entity()","u":"%3Cinit%3E()"},{"p":"de.dhbw.contactdb","c":"Visit","l":"end"},{"p":"de.dhbw.contactdb","c":"Main","l":"getContactPersons(int)"},{"p":"de.dhbw.contactdb","c":"Visit","l":"getEnd()"},{"p":"de.dhbw.contactdb","c":"Person","l":"getId()"},{"p":"de.dhbw.contactdb","c":"Place","l":"getId()"},{"p":"de.dhbw.contactdb","c":"Person","l":"getName()"},{"p":"de.dhbw.contactdb","c":"Place","l":"getName()"},{"p":"de.dhbw.contactdb","c":"Visit","l":"getPerson()"},{"p":"de.dhbw.contactdb","c":"Visit","l":"getPlace()"},{"p":"de.dhbw.contactdb","c":"Main","l":"getSearchString(String)","u":"getSearchString(java.lang.String)"},{"p":"de.dhbw.contactdb","c":"Visit","l":"getStart()"},{"p":"de.dhbw.contactdb","c":"Main","l":"getVisitors(String)","u":"getVisitors(java.lang.String)"},{"p":"de.dhbw.contactdb","c":"Person","l":"id"},{"p":"de.dhbw.contactdb","c":"Place","l":"id"},{"p":"de.dhbw.contactdb","c":"Place","l":"indoor"},{"p":"de.dhbw.contactdb","c":"Place","l":"isIndoor()"},{"p":"de.dhbw.contactdb","c":"Visit","l":"isInTimePeriod(LocalDateTime)","u":"isInTimePeriod(java.time.LocalDateTime)"},{"p":"de.dhbw.contactdb","c":"Visit","l":"isOverlapping(LocalDateTime, LocalDateTime)","u":"isOverlapping(java.time.LocalDateTime,java.time.LocalDateTime)"},{"p":"de.dhbw.contactdb","c":"ProjektTester","l":"MAIN_CLASS"},{"p":"de.dhbw.contactdb","c":"Main","l":"Main()","u":"%3Cinit%3E()"},{"p":"de.dhbw.contactdb","c":"Main","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"de.dhbw.contactdb","c":"ProjektTester","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"de.dhbw.contactdb","c":"Person","l":"name"},{"p":"de.dhbw.contactdb","c":"Place","l":"name"},{"p":"de.dhbw.contactdb.utils","c":"Parser","l":"new_entity"},{"p":"de.dhbw.contactdb.utils","c":"Parser","l":"parse(String)","u":"parse(java.lang.String)"},{"p":"de.dhbw.contactdb.utils","c":"Parser","l":"Parser()","u":"%3Cinit%3E()"},{"p":"de.dhbw.contactdb","c":"ProjektTester","l":"passedTestNetzwerk(String, String)","u":"passedTestNetzwerk(java.lang.String,java.lang.String)"},{"p":"de.dhbw.contactdb","c":"Visit","l":"person"},{"p":"de.dhbw.contactdb.utils","c":"db_new_entity","l":"PERSON"},{"p":"de.dhbw.contactdb","c":"Person","l":"Person(int, String)","u":"%3Cinit%3E(int,java.lang.String)"},{"p":"de.dhbw.contactdb","c":"Main","l":"persons"},{"p":"de.dhbw.contactdb","c":"Visit","l":"place"},{"p":"de.dhbw.contactdb.utils","c":"db_new_entity","l":"PLACE"},{"p":"de.dhbw.contactdb","c":"Place","l":"Place(int, String, boolean)","u":"%3Cinit%3E(int,java.lang.String,boolean)"},{"p":"de.dhbw.contactdb","c":"Main","l":"places"},{"p":"de.dhbw.contactdb","c":"ProjektTester","l":"ProjektTester()","u":"%3Cinit%3E()"},{"p":"de.dhbw.contactdb","c":"Main","l":"searchForPerson(String)","u":"searchForPerson(java.lang.String)"},{"p":"de.dhbw.contactdb","c":"Main","l":"searchForPlace(String)","u":"searchForPlace(java.lang.String)"},{"p":"de.dhbw.contactdb","c":"Visit","l":"setEnd(LocalDateTime)","u":"setEnd(java.time.LocalDateTime)"},{"p":"de.dhbw.contactdb","c":"Person","l":"setId(int)"},{"p":"de.dhbw.contactdb","c":"Place","l":"setId(int)"},{"p":"de.dhbw.contactdb","c":"Person","l":"setName(String)","u":"setName(java.lang.String)"},{"p":"de.dhbw.contactdb","c":"Place","l":"setName(String)","u":"setName(java.lang.String)"},{"p":"de.dhbw.contactdb","c":"Visit","l":"setPerson(Person)","u":"setPerson(de.dhbw.contactdb.Person)"},{"p":"de.dhbw.contactdb","c":"Visit","l":"setStart(LocalDateTime)","u":"setStart(java.time.LocalDateTime)"},{"p":"de.dhbw.contactdb","c":"Visit","l":"start"},{"p":"de.dhbw.contactdb","c":"Person","l":"toString()"},{"p":"de.dhbw.contactdb","c":"Place","l":"toString()"},{"p":"de.dhbw.contactdb","c":"Visit","l":"toString()"},{"p":"de.dhbw.contactdb.utils","c":"db_new_entity","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"de.dhbw.contactdb.utils","c":"db_new_entity","l":"values()"},{"p":"de.dhbw.contactdb.utils","c":"db_new_entity","l":"VISIT"},{"p":"de.dhbw.contactdb","c":"Visit","l":"Visit(LocalDateTime, LocalDateTime, Person, Place)","u":"%3Cinit%3E(java.time.LocalDateTime,java.time.LocalDateTime,de.dhbw.contactdb.Person,de.dhbw.contactdb.Place)"},{"p":"de.dhbw.contactdb","c":"Main","l":"visits"}];updateSearchResults();
\ No newline at end of file
diff --git a/docs/module-search-index.js b/docs/module-search-index.js
new file mode 100644
index 0000000..0d59754
--- /dev/null
+++ b/docs/module-search-index.js
@@ -0,0 +1 @@
+moduleSearchIndex = [];updateSearchResults();
\ No newline at end of file
diff --git a/docs/overview-summary.html b/docs/overview-summary.html
new file mode 100644
index 0000000..983f48c
--- /dev/null
+++ b/docs/overview-summary.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+Generated Documentation (Untitled)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("
").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete});
\ No newline at end of file
diff --git a/docs/script-dir/jquery-ui.structure.min.css b/docs/script-dir/jquery-ui.structure.min.css
new file mode 100644
index 0000000..e880892
--- /dev/null
+++ b/docs/script-dir/jquery-ui.structure.min.css
@@ -0,0 +1,5 @@
+/*! jQuery UI - v1.12.1 - 2018-12-06
+* http://jqueryui.com
+* Copyright jQuery Foundation and other contributors; Licensed MIT */
+
+.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}
\ No newline at end of file
diff --git a/docs/script.js b/docs/script.js
new file mode 100644
index 0000000..864989c
--- /dev/null
+++ b/docs/script.js
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+var moduleSearchIndex;
+var packageSearchIndex;
+var typeSearchIndex;
+var memberSearchIndex;
+var tagSearchIndex;
+function loadScripts(doc, tag) {
+ createElem(doc, tag, 'search.js');
+
+ createElem(doc, tag, 'module-search-index.js');
+ createElem(doc, tag, 'package-search-index.js');
+ createElem(doc, tag, 'type-search-index.js');
+ createElem(doc, tag, 'member-search-index.js');
+ createElem(doc, tag, 'tag-search-index.js');
+}
+
+function createElem(doc, tag, path) {
+ var script = doc.createElement(tag);
+ var scriptElement = doc.getElementsByTagName(tag)[0];
+ script.src = pathtoroot + path;
+ scriptElement.parentNode.insertBefore(script, scriptElement);
+}
+
+function show(tableId, selected, columns) {
+ if (tableId !== selected) {
+ document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')')
+ .forEach(function(elem) {
+ elem.style.display = 'none';
+ });
+ }
+ document.querySelectorAll('div.' + selected)
+ .forEach(function(elem, index) {
+ elem.style.display = '';
+ var isEvenRow = index % (columns * 2) < columns;
+ elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor);
+ elem.classList.add(isEvenRow ? evenRowColor : oddRowColor);
+ });
+ updateTabs(tableId, selected);
+}
+
+function updateTabs(tableId, selected) {
+ document.querySelector('div#' + tableId +' .summary-table')
+ .setAttribute('aria-labelledby', selected);
+ document.querySelectorAll('button[id^="' + tableId + '"]')
+ .forEach(function(tab, index) {
+ if (selected === tab.id || (tableId === selected && index === 0)) {
+ tab.className = activeTableTab;
+ tab.setAttribute('aria-selected', true);
+ tab.setAttribute('tabindex',0);
+ } else {
+ tab.className = tableTab;
+ tab.setAttribute('aria-selected', false);
+ tab.setAttribute('tabindex',-1);
+ }
+ });
+}
+
+function switchTab(e) {
+ var selected = document.querySelector('[aria-selected=true]');
+ if (selected) {
+ if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) {
+ // left or up arrow key pressed: move focus to previous tab
+ selected.previousSibling.click();
+ selected.previousSibling.focus();
+ e.preventDefault();
+ } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) {
+ // right or down arrow key pressed: move focus to next tab
+ selected.nextSibling.click();
+ selected.nextSibling.focus();
+ e.preventDefault();
+ }
+ }
+}
+
+var updateSearchResults = function() {};
+
+function indexFilesLoaded() {
+ return moduleSearchIndex
+ && packageSearchIndex
+ && typeSearchIndex
+ && memberSearchIndex
+ && tagSearchIndex;
+}
+
+// Workaround for scroll position not being included in browser history (8249133)
+document.addEventListener("DOMContentLoaded", function(e) {
+ var contentDiv = document.querySelector("div.flex-content");
+ window.addEventListener("popstate", function(e) {
+ if (e.state !== null) {
+ contentDiv.scrollTop = e.state;
+ }
+ });
+ window.addEventListener("hashchange", function(e) {
+ history.replaceState(contentDiv.scrollTop, document.title);
+ });
+ contentDiv.addEventListener("scroll", function(e) {
+ var timeoutID;
+ if (!timeoutID) {
+ timeoutID = setTimeout(function() {
+ history.replaceState(contentDiv.scrollTop, document.title);
+ timeoutID = null;
+ }, 100);
+ }
+ });
+ if (!location.hash) {
+ history.replaceState(contentDiv.scrollTop, document.title);
+ }
+});
diff --git a/docs/search.js b/docs/search.js
new file mode 100644
index 0000000..2c2ced0
--- /dev/null
+++ b/docs/search.js
@@ -0,0 +1,354 @@
+/*
+ * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+var noResult = {l: "No results found"};
+var loading = {l: "Loading search index..."};
+var catModules = "Modules";
+var catPackages = "Packages";
+var catTypes = "Classes and Interfaces";
+var catMembers = "Members";
+var catSearchTags = "Search Tags";
+var highlight = "$&";
+var searchPattern = "";
+var fallbackPattern = "";
+var RANKING_THRESHOLD = 2;
+var NO_MATCH = 0xffff;
+var MIN_RESULTS = 3;
+var MAX_RESULTS = 500;
+var UNNAMED = "";
+function escapeHtml(str) {
+ return str.replace(//g, ">");
+}
+function getHighlightedText(item, matcher, fallbackMatcher) {
+ var escapedItem = escapeHtml(item);
+ var highlighted = escapedItem.replace(matcher, highlight);
+ if (highlighted === escapedItem) {
+ highlighted = escapedItem.replace(fallbackMatcher, highlight)
+ }
+ return highlighted;
+}
+function getURLPrefix(ui) {
+ var urlPrefix="";
+ var slash = "/";
+ if (ui.item.category === catModules) {
+ return ui.item.l + slash;
+ } else if (ui.item.category === catPackages && ui.item.m) {
+ return ui.item.m + slash;
+ } else if (ui.item.category === catTypes || ui.item.category === catMembers) {
+ if (ui.item.m) {
+ urlPrefix = ui.item.m + slash;
+ } else {
+ $.each(packageSearchIndex, function(index, item) {
+ if (item.m && ui.item.p === item.l) {
+ urlPrefix = item.m + slash;
+ }
+ });
+ }
+ }
+ return urlPrefix;
+}
+function createSearchPattern(term) {
+ var pattern = "";
+ var isWordToken = false;
+ term.replace(/,\s*/g, ", ").trim().split(/\s+/).forEach(function(w, index) {
+ if (index > 0) {
+ // whitespace between identifiers is significant
+ pattern += (isWordToken && /^\w/.test(w)) ? "\\s+" : "\\s*";
+ }
+ var tokens = w.split(/(?=[A-Z,.()<>[\/])/);
+ for (var i = 0; i < tokens.length; i++) {
+ var s = tokens[i];
+ if (s === "") {
+ continue;
+ }
+ pattern += $.ui.autocomplete.escapeRegex(s);
+ isWordToken = /\w$/.test(s);
+ if (isWordToken) {
+ pattern += "([a-z0-9_$<>\\[\\]]*?)";
+ }
+ }
+ });
+ return pattern;
+}
+function createMatcher(pattern, flags) {
+ var isCamelCase = /[A-Z]/.test(pattern);
+ return new RegExp(pattern, flags + (isCamelCase ? "" : "i"));
+}
+var watermark = 'Search';
+$(function() {
+ var search = $("#search");
+ var reset = $("#reset");
+ search.val('');
+ search.prop("disabled", false);
+ reset.prop("disabled", false);
+ search.val(watermark).addClass('watermark');
+ search.blur(function() {
+ if ($(this).val().length === 0) {
+ $(this).val(watermark).addClass('watermark');
+ }
+ });
+ search.on('click keydown paste', function() {
+ if ($(this).val() === watermark) {
+ $(this).val('').removeClass('watermark');
+ }
+ });
+ reset.click(function() {
+ search.val('').focus();
+ });
+ search.focus()[0].setSelectionRange(0, 0);
+});
+$.widget("custom.catcomplete", $.ui.autocomplete, {
+ _create: function() {
+ this._super();
+ this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)");
+ },
+ _renderMenu: function(ul, items) {
+ var rMenu = this;
+ var currentCategory = "";
+ rMenu.menu.bindings = $();
+ $.each(items, function(index, item) {
+ var li;
+ if (item.category && item.category !== currentCategory) {
+ ul.append("