Skip to content

Commit

Permalink
Adding the TextSearchDemo example from WOWODC 2010
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Robert committed Aug 13, 2012
1 parent 175278c commit 6276b4f
Show file tree
Hide file tree
Showing 63 changed files with 216,019 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Build/build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,17 @@
<param name="wo.external.root.bundles" value="${frameworks.wonder.d2w}/DerbyPlugIn/ERMoviesLogic/ERSelenium/ERAttachment/ERTaggable" />
</antcall>
</target>

<target name="TextSearchDemo.all">
<antcall target="global.application.${build.action}" >
<param name="project.type" value="application" />
<param name="project.principal.class" value="er.examples.textsearchdemo.Application" />
<param name="project.name" value="TextSearchDemo" />
<param name="project.dir" value="Examples/Misc/TextSearchDemo" />
<param name="wo.system.root.bundles" value="${frameworks.system.core}" />
<param name="wo.external.root.bundles" value="${frameworks.wonder.core}/H2PlugIn/ERMoviesLogic/ERTaggable/Ajax/ERIndexing" />
</antcall>
</target>

<target name="D2WComponentTour.all">
<antcall target="global.application.${build.action}" >
Expand Down Expand Up @@ -1236,7 +1247,7 @@

<target name="common.applications.all" depends="BugTracker.all, ERMailer.all, Uber.all, SecretPal.all, ERXTest.all, PluginTest.all, WOTested.all" />

<target name="common.examples.all" depends="ERSeleniumExample.all, ERIndexingExample.all, ERMovies.all, D2WComponentTour.all, AjaxExample.all, AjaxExample2.all, YUIExample.all, EROpenIDExample.all, JavaRESTAdaptorExample.all, ERDivaliteExample.all, TickTockMan.all, ERComponentTour.all, ERRestRouteExample.all, Movies.all, ERWebSocketExample.all, ERJasperReportsExample.all, BackgroundTasks.all, ERCayenneExample.all, ERDistributionExampleModel.all, ERDistributionExampleServer.all, ERDistributionExampleClient.all, MooToolsExample.all, ERPDFExamples.all, JqueryMobileExample.all" />
<target name="common.examples.all" depends="ERSeleniumExample.all, ERIndexingExample.all, ERMovies.all, D2WComponentTour.all, AjaxExample.all, AjaxExample2.all, YUIExample.all, EROpenIDExample.all, JavaRESTAdaptorExample.all, ERDivaliteExample.all, TickTockMan.all, ERComponentTour.all, ERRestRouteExample.all, Movies.all, ERWebSocketExample.all, ERJasperReportsExample.all, BackgroundTasks.all, ERCayenneExample.all, ERDistributionExampleModel.all, ERDistributionExampleServer.all, ERDistributionExampleClient.all, MooToolsExample.all, ERPDFExamples.all, JqueryMobileExample.all, TextSearchDemo.all" />

<target name="dynareporting.frameworks.all" depends="DRGrouping.all, WRReporting.all" />
<target name="dynareporting.examples.all" depends="DocsByExample.all, DynaReporter.all, DRGroupingTest.all" />
Expand Down
23 changes: 23 additions & 0 deletions Examples/Misc/TextSearchDemo/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="Sources"/>
<classpathentry kind="con" path="WOFramework/ERMoviesLogic"/>
<classpathentry kind="con" path="WOFramework/ERExtensions"/>
<classpathentry kind="con" path="WOFramework/ERJars"/>
<classpathentry kind="con" path="WOFramework/ERPrototypes"/>
<classpathentry kind="con" path="WOFramework/JavaWOExtensions"/>
<classpathentry kind="con" path="WOFramework/WOOgnl"/>
<classpathentry kind="con" path="WOFramework/JavaEOAccess"/>
<classpathentry kind="con" path="WOFramework/JavaEOControl"/>
<classpathentry kind="con" path="WOFramework/JavaFoundation"/>
<classpathentry kind="con" path="WOFramework/JavaJDBCAdaptor"/>
<classpathentry kind="con" path="WOFramework/JavaWebObjects"/>
<classpathentry kind="con" path="WOFramework/JavaXML"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="WOFramework/ERIndexing"/>
<classpathentry kind="con" path="WOFramework/Ajax"/>
<classpathentry kind="con" path="WOFramework/ERTaggable"/>
<classpathentry kind="con" path="WOFramework/ERAttachment"/>
<classpathentry kind="con" path="WOFramework/H2PlugIn"/>
<classpathentry kind="output" path="bin"/>
</classpath>
6 changes: 6 additions & 0 deletions Examples/Misc/TextSearchDemo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
target
bin
build
*.xcodeproj
*.pbxproj
ant.*
23 changes: 23 additions & 0 deletions Examples/Misc/TextSearchDemo/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>TextSearchDemo</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.objectstyle.wolips.incrementalbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.objectstyle.wolips.incrementalapplicationnature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding//Components=UTF-8
6 changes: 6 additions & 0 deletions Examples/Misc/TextSearchDemo/Components/AutoSuggest.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wodefinitions>
<wo wocomponentcontent="false" class="AutoSuggest.java">

</wo>
</wodefinitions>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<webobject name = "PageWrapper">
<h1>Auto Suggest</h1>
<webobject name = "PrimeIndexLink">Prime Index</webobject>
<div id="SearchWrapper">
<wo:form>
<h4>Search</h4>
<wo:AjaxAutoComplete class="textfield" list="$currentValues" value="$searchString"/> <wo:submit value="Search" action="$searchAction"></wo:submit>
</wo:form>
<table>
<tr><th>Index</th><th>Title</th><th>Rank</th></tr>
<wo:if condition = "$foundScoreDocsCount">
<wo:loop count = "$foundScoreDocsCount" index = "$foundSetIndex">
<tr><td><wo:str value="$foundSetIndex" /></td><td><wo:link action="$showDetailsAction"><wo:str value="$currentDocument.title//VALID" /></wo:link></td><td><wo:str value="$currentDocument.score" /></td></tr>
</wo:loop>
</wo:if>
<wo:if condition = "$foundScoreDocsCount" negate="$true">
<tr><td>-</td><td><em>No Results Found</em></td><td>-</td></tr>
</wo:if>
</table>
</div>
</webobject>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
PageWrapper : PageWrapper {
pageTitle = "Auto Suggest";
}

PrimeIndexLink : WOHyperlink {
action = indexMoviesAction;
class = "Button PrimeIndexButton";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"WebObjects Release" = "WebObjects 5.0";
encoding = "UTF-8";
}
6 changes: 6 additions & 0 deletions Examples/Misc/TextSearchDemo/Components/DidYouMean.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wodefinitions>
<wo wocomponentcontent="false" class="DidYouMean.java">

</wo>
</wodefinitions>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<webobject name = "PageWrapper">
<h1>Did You Mean...</h1>
<webobject name = "PrimeIndexLink">Prime Index</webobject>
<div id="SearchWrapper">
<wo:form>
<h4>Search</h4>
<wo:textfield class="textfield" value="$searchString"/> <wo:submit value="Search" action="$searchAction"></wo:submit>
</wo:form>
<wo:if condition="$suggestion">
<em>Did you mean: <wo:link action="$useSuggestionAction"><wo:str value="$suggestion"/></wo:link></em>
</wo:if>
<table>
<tr><th>Index</th><th>Title</th><th>Rank</th></tr>
<wo:if condition = "$foundScoreDocsCount">
<wo:loop count = "$foundScoreDocsCount" index = "$foundSetIndex">
<tr><td><wo:str value="$foundSetIndex" /></td><td><wo:str value="$currentDocument.title//VALID" /></td><td><wo:str value="$currentDocument.score" /></td></tr>
</wo:loop>
</wo:if>
<wo:if condition = "$foundScoreDocsCount" negate="$true">
<tr><td>-</td><td><em>No Results Found</em></td><td>-</td></tr>
</wo:if>
</table>
</div>
</webobject>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
PageWrapper : PageWrapper {
pageTitle = "Did You Mean...";
}

PrimeIndexLink : WOHyperlink {
action = createDidYouMeanIndexAction;
class = "Button PrimeIndexButton";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"WebObjects Release" = "WebObjects 5.0";
encoding = "UTF-8";
}
5 changes: 5 additions & 0 deletions Examples/Misc/TextSearchDemo/Components/Main.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wodefinitions>
<wo wocomponentcontent="false" class="Main.java">
</wo>
</wodefinitions>
9 changes: 9 additions & 0 deletions Examples/Misc/TextSearchDemo/Components/Main.wo/Main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<webobject name = "PageWrapper">
<h1>Full Text Search Demo</h1>
<ul id="Choices">
<li><webobject name = "SimpleSearchLink">Simple Search</webobject></li>
<li><webobject name = "SpellCheckLink">Spell Check</webobject></li>
<li><webobject name = "DidYouMeanLink">Did You Mean...</webobject></li>
<li><webobject name = "AutoSuggestLink">Auto Suggest</webobject></li>
</ul>
</webobject>
23 changes: 23 additions & 0 deletions Examples/Misc/TextSearchDemo/Components/Main.wo/Main.wod
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
PageWrapper : PageWrapper {
pageTitle = "WOWODC : WOOT!";
}

SimpleSearchLink : WOHyperlink {
directActionName = "page";
?p = "SimpleSearch";
}

DidYouMeanLink : WOHyperlink {
directActionName = "page";
?p = "DidYouMean";
}

SpellCheckLink : WOHyperlink {
directActionName = "page";
?p = "SpellCheck";
}

AutoSuggestLink : WOHyperlink {
directActionName = "page";
?p = "AutoSuggest";
}
4 changes: 4 additions & 0 deletions Examples/Misc/TextSearchDemo/Components/Main.wo/Main.woo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"WebObjects Release" = "WebObjects 5.0";
encoding = "UTF-8";
}
6 changes: 6 additions & 0 deletions Examples/Misc/TextSearchDemo/Components/MovieDetails.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wodefinitions>
<wo wocomponentcontent="false" class="MovieDetails.java">

</wo>
</wodefinitions>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<webobject name = "PageWrapper">
<h1>Simple Search</h1>
<table id="MovieDetails">
<tr><th>Title</th><td><wo:str value="$movie.title"/></td></tr>
<tr><th>Revenue</th><td><wo:str value="$movie.revenue"/></td></tr>
<tr><th>Release Date</th><td><wo:str value="$movie.dateReleased"/></td></tr>
<tr><th>Starring</th><td><wo:str value="$movieTalent"/></td></tr>
<tr><th>Director</th><td><wo:str value="$movieDirectors"/></td></tr>
</table>
</webobject>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
PageWrapper : PageWrapper {
title = movie;
backPage = backPage;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"WebObjects Release" = "WebObjects 5.0";
encoding = "UTF-8";
}
9 changes: 9 additions & 0 deletions Examples/Misc/TextSearchDemo/Components/PageWrapper.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wodefinitions>
<wo class="PageWrapper.java" wocomponentcontent="true">

<binding name="pageTitle"/>

<binding name="backPage"/>
</wo>
</wodefinitions>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title><webobject name = "PageTitle"/></title>
<webobject name = "PageCSS"/>
<webobject name = "AutoCompleteCSS"/>
</head>
<body>
<div id="Content">
<webobject name = "Content"/>
</div>
<webobject name = "ShowBackButton">
<webobject name = "BackButton">&#0171; Back</webobject>
</webobject>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Content : WOComponentContent {

}

PageTitle : WOString {
value = ^pageTitle;
valueWhenEmpty = "Untitled";
}

PageCSS : ERXStyleSheet {
filename = "default.css";
framework = "app";
}

AutoCompleteCSS : ERXStyleSheet {
filename = "autocomplete.css";
framework = "app";
}

BackButton : WOHyperlink {
action = returnAction;
class = "Button"
}

ShowBackButton : WOConditional {
condition = showBackButton;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"WebObjects Release" = "WebObjects 5.0";
encoding = "UTF-8";
}
6 changes: 6 additions & 0 deletions Examples/Misc/TextSearchDemo/Components/SearchResults.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wodefinitions>
<wo wocomponentcontent="false" class="SearchResults.java">

</wo>
</wodefinitions>
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"WebObjects Release" = "WebObjects 5.0";
encoding = "UTF-8";
}
6 changes: 6 additions & 0 deletions Examples/Misc/TextSearchDemo/Components/SimpleSearch.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wodefinitions>
<wo wocomponentcontent="false" class="SimpleSearch.java">

</wo>
</wodefinitions>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<webobject name = "PageWrapper">
<h1>Simple Search</h1>
<webobject name = "PrimeIndexLink">Prime Index</webobject>
<div id="SearchWrapper">
<wo:form>
<h4>Search</h4>
<wo:textfield class="textfield" value="$searchString"/> <wo:submit value="Search" action="$searchAction"></wo:submit>
</wo:form>
<table>
<tr><th>Index</th><th>Title</th><th>Rank</th></tr>
<wo:if condition = "$foundScoreDocsCount">
<wo:loop count = "$foundScoreDocsCount" index = "$foundSetIndex">
<tr><td><wo:str value="$foundSetIndex" /></td><td><wo:link action="$showDetailsAction"><wo:str value="$currentDocument.title//VALID" /></wo:link></td><td><wo:str value="$currentDocument.score" /></td></tr>
</wo:loop>
</wo:if>
<wo:if condition = "$foundScoreDocsCount" negate="$true">
<tr><td>-</td><td><em>No Results Found</em></td><td>-</td></tr>
</wo:if>
</table>
</div>
</webobject>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
PageWrapper : PageWrapper {
pageTitle = "Simple Search";
backPage = backPage;
}

PrimeIndexLink : WOHyperlink {
action = indexMoviesAction;
class = "Button PrimeIndexButton";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"WebObjects Release" = "WebObjects 5.0";
encoding = "UTF-8";
}
6 changes: 6 additions & 0 deletions Examples/Misc/TextSearchDemo/Components/SpellCheck.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wodefinitions>
<wo wocomponentcontent="false" class="SpellCheck.java">

</wo>
</wodefinitions>
Loading

0 comments on commit 6276b4f

Please sign in to comment.