ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vjapa...@apache.org
Subject svn commit: r1560995 [1/2] - in /ctakes/branches/ytex/ctakes-ytex-web: ./ .settings/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/ctakes/ src/main/java/org/apache/ctakes/ytex/ src/main/java/org/apa...
Date Fri, 24 Jan 2014 13:33:11 GMT
Author: vjapache
Date: Fri Jan 24 13:33:09 2014
New Revision: 1560995

URL: http://svn.apache.org/r1560995
Log:
ctakes-ytex-web initial import

Added:
    ctakes/branches/ytex/ctakes-ytex-web/
    ctakes/branches/ytex/ctakes-ytex-web/.classpath
    ctakes/branches/ytex/ctakes-ytex-web/.project
    ctakes/branches/ytex/ctakes-ytex-web/.settings/
    ctakes/branches/ytex/ctakes-ytex-web/.settings/.jsdtscope
    ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.core.resources.prefs
    ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.jdt.core.prefs
    ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.m2e.core.prefs
    ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.common.component
    ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
    ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.common.project.facet.core.xml
    ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.jsdt.ui.superType.container
    ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.jsdt.ui.superType.name
    ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.validation.prefs
    ctakes/branches/ytex/ctakes-ytex-web/README.txt
    ctakes/branches/ytex/ctakes-ytex-web/pom.xml
    ctakes/branches/ytex/ctakes-ytex-web/src/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptFirstWord.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptLookupBean.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptSearchService.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptSearchServiceImpl.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentSearchResult.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentSearchService.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentSearchServiceImpl.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentViewBean.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/FullTextDocumentViewBean.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/FullTextSearchBean.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SearchConfigBean.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSearchBean.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSimBean.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSimRegistryBean.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSimServiceBean.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/ws/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/ws/ConceptSimilarityRestService.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/ws/ConceptSimilarityWebService.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/ws/ConceptSimilarityWebServiceImpl.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/ws/SimServiceInfo.java
    ctakes/branches/ytex/ctakes-ytex-web/src/main/resources/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/WEB-INF/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/WEB-INF/applicationContext.xml
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/WEB-INF/faces-config.xml
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/WEB-INF/inc-content/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/WEB-INF/inc-content/header.xhtml
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/WEB-INF/inc-templates/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/WEB-INF/inc-templates/commonLayout.xhtml
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/WEB-INF/web.xml
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/about.xhtml
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/css/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/css/images/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/css/images/banner_bg.gif   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/css/images/banner_hdr_address.jpg   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/css/images/banner_logo.jpg   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/css/images/bgslice_footer.gif   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/css/images/bgslice_footer.jpg   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/css/images/blue004.jpg   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/css/images/footer_faces.jpg   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/css/images/images.jpg   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/css/mainscript.css
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/css/menuStyle.css
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/images/
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/images/blue-fade-bkgnd.gif   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/images/blue-header-fade.gif   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/images/button_bkgnd.gif   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/images/button_bkgnd2.gif   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/images/complete-address-button-dis.gif   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/images/complete-address-button.gif   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/images/debug.gif   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/images/favicon.ico   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/images/hide-notes-button.gif   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/images/new-address-button-disabled.gif   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/images/new-address-button.gif   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/images/reset-button.gif   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/images/status_alert.gif   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/images/status_blank.gif   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/images/status_progress.gif   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/images/view-notes-button.gif   (with props)
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/index.jsp
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/metricCheckboxes.xhtml
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/semanticSearch.xhtml
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/semanticSim.xhtml
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/semanticSimMulti.xhtml
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/timeout.jsp
    ctakes/branches/ytex/ctakes-ytex-web/src/main/webapp/viewDocument.xhtml

Added: ctakes/branches/ytex/ctakes-ytex-web/.classpath
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/.classpath?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/.classpath (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/.classpath Fri Jan 24 13:33:09 2014
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: ctakes/branches/ytex/ctakes-ytex-web/.project
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/.project?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/.project (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/.project Fri Jan 24 13:33:09 2014
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>ctakes-ytex-web</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+		<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+	</natures>
+</projectDescription>

Added: ctakes/branches/ytex/ctakes-ytex-web/.settings/.jsdtscope
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/.settings/.jsdtscope?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/.settings/.jsdtscope (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/.settings/.jsdtscope Fri Jan 24 13:33:09 2014
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/webapp"/>
+	<classpathentry kind="src" path="target/m2e-wtp/web-resources"/>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+		<attributes>
+			<attribute name="hide" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+	<classpathentry kind="output" path=""/>
+</classpath>

Added: ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.core.resources.prefs?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.core.resources.prefs (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.core.resources.prefs Fri Jan 24 13:33:09 2014
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+encoding//src/main/resources=UTF-8
+encoding/<project>=UTF-8

Added: ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.jdt.core.prefs?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.jdt.core.prefs (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.jdt.core.prefs Fri Jan 24 13:33:09 2014
@@ -0,0 +1,8 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6

Added: ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.m2e.core.prefs
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.m2e.core.prefs?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.m2e.core.prefs (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.m2e.core.prefs Fri Jan 24 13:33:09 2014
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1

Added: ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.common.component
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.common.component?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.common.component (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.common.component Fri Jan 24 13:33:09 2014
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
+    <wb-module deploy-name="ctakes-ytex-web">
+        <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
+        <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
+        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
+        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
+        <dependent-module archiveName="ctakes-ytex-3.1.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ctakes-ytex/ctakes-ytex">
+            <dependency-type>uses</dependency-type>
+        </dependent-module>
+        <dependent-module archiveName="ctakes-ytex-res-3.1.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ctakes-ytex-res/ctakes-ytex-res">
+            <dependency-type>uses</dependency-type>
+        </dependent-module>
+        <property name="context-root" value="ctakes-ytex-web"/>
+        <property name="java-output-path" value="/ctakes-ytex-web/target/classes"/>
+    </wb-module>
+</project-modules>

Added: ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml Fri Jan 24 13:33:09 2014
@@ -0,0 +1,7 @@
+<root>
+  <facet id="jst.jaxrs">
+    <node name="libprov">
+      <attribute name="provider-id" value="jaxrs-no-op-library-provider"/>
+    </node>
+  </facet>
+</root>

Added: ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.common.project.facet.core.xml
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.common.project.facet.core.xml?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.common.project.facet.core.xml (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.common.project.facet.core.xml Fri Jan 24 13:33:09 2014
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+  <fixed facet="wst.jsdt.web"/>
+  <installed facet="java" version="1.6"/>
+  <installed facet="jst.web" version="2.3"/>
+  <installed facet="wst.jsdt.web" version="1.0"/>
+  <installed facet="jst.jaxrs" version="1.1"/>
+</faceted-project>

Added: ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.jsdt.ui.superType.container
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.jsdt.ui.superType.container?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.jsdt.ui.superType.container (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.jsdt.ui.superType.container Fri Jan 24 13:33:09 2014
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file

Added: ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.jsdt.ui.superType.name
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.jsdt.ui.superType.name?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.jsdt.ui.superType.name (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.jsdt.ui.superType.name Fri Jan 24 13:33:09 2014
@@ -0,0 +1 @@
+Window
\ No newline at end of file

Added: ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.validation.prefs
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.validation.prefs?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.validation.prefs (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/.settings/org.eclipse.wst.validation.prefs Fri Jan 24 13:33:09 2014
@@ -0,0 +1,2 @@
+disabled=06target
+eclipse.preferences.version=1

Added: ctakes/branches/ytex/ctakes-ytex-web/README.txt
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/README.txt?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/README.txt (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/README.txt Fri Jan 24 13:33:09 2014
@@ -0,0 +1,17 @@
+ctakes-ytex-web is a web application that provides the following:
+* searching the annotated corpus by concepts (implemented by queries to ytex tables)
+* computing the semantic similarity of concept pairs
+* provides Web & Restful services for computing semantic similarity
+
+ctakes-ytex-web just relies on ctakes-ytex (and is independent of the 
+rest of ctakes).  Although this produces a war file (as it should), we 
+don't actually deliver a WAR file with the ctakes distro. We package and 
+install a ctakes-ytex-web.jar (notice the extension) file with the classes from this project. 
+We deliver the exploded web-app in the ctakes distro under desc/ctakes-ytex-web.  All 
+non-web app specific resources (properties files, spring config files) are 
+in ctakes-ytex-res project/resources directory of ctakes.  
+	
+To build and run the web app run the following (command line/eclipse):
+mvn clean install jetty:run 
+
+This relies on you having correctly built and configured the ctakes-ytex.

Added: ctakes/branches/ytex/ctakes-ytex-web/pom.xml
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/pom.xml?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/pom.xml (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/pom.xml Fri Jan 24 13:33:09 2014
@@ -0,0 +1,265 @@
+<?xml version="1.0"?>
+<!-- see accompanying README.txt	-->
+<project
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.apache.ctakes</groupId>
+		<artifactId>ctakes</artifactId>
+		<version>3.1.2-SNAPSHOT</version>
+	</parent>
+	<artifactId>ctakes-ytex-web</artifactId>
+	<packaging>war</packaging>
+	<name>ctakes-ytex-web</name>
+	<url>http://maven.apache.org</url>
+	<properties>
+		<cxf.version>2.7.8</cxf.version>
+		<jetty.useTestScope>false</jetty.useTestScope>
+		<provided.scope>compile</provided.scope>
+	</properties>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.ctakes</groupId>
+			<artifactId>ctakes-ytex</artifactId>
+			<scope>${provided.scope}</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.ctakes</groupId>
+			<artifactId>ctakes-ytex-res</artifactId>
+			<scope>${provided.scope}</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-web</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.sun.faces</groupId>
+			<artifactId>jsf-api</artifactId>
+			<version>2.1.3</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.sun.faces</groupId>
+			<artifactId>jsf-impl</artifactId>
+			<version>2.1.3</version>
+			<scope>compile</scope>
+		</dependency>
+		<!-- <dependency> <groupId>org.icepush</groupId> <artifactId>icepush</artifactId> 
+			<version>2.0.2</version> </dependency> -->
+		<dependency>
+			<groupId>org.icefaces</groupId>
+			<artifactId>icefaces</artifactId>
+			<version>2.0.2</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.icefaces</groupId>
+			<artifactId>icefaces-ace</artifactId>
+			<version>2.0.2</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.icefaces</groupId>
+			<artifactId>icefaces-compat</artifactId>
+			<version>2.0.2</version>
+		</dependency>
+
+		<dependency>
+			<groupId>backport-util-concurrent</groupId>
+			<artifactId>backport-util-concurrent</artifactId>
+			<version>3.1</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.jsr107cache</groupId>
+			<artifactId>jsr107cache</artifactId>
+			<version>1.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.cxf</groupId>
+			<artifactId>cxf-rt-frontend-jaxws</artifactId>
+			<version>${cxf.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.cxf</groupId>
+			<artifactId>cxf-rt-frontend-jaxrs</artifactId>
+			<version>${cxf.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.cxf</groupId>
+			<artifactId>cxf-rt-transports-http</artifactId>
+			<version>${cxf.version}</version>
+		</dependency>
+		<!-- Jetty is needed if you're are not using the CXFServlet <dependency> 
+			<groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http-jetty</artifactId> 
+			<version>${cxf.version}</version> </dependency> -->
+		<dependency>
+			<groupId>org.apache.cxf</groupId>
+			<artifactId>cxf-rt-databinding-aegis</artifactId>
+			<version>${cxf.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet.jsp</groupId>
+			<artifactId>jsp-api</artifactId>
+			<version>2.1</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>jstl</artifactId>
+			<version>1.2</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-el</groupId>
+			<artifactId>commons-el</artifactId>
+			<version>1.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.glassfish.web</groupId>
+			<artifactId>el-impl</artifactId>
+			<version>2.2</version>
+		</dependency>
+		<dependency>
+			<groupId>org.eclipse.jetty</groupId>
+			<artifactId>jetty-server</artifactId>
+			<version>9.1.0.M0</version>
+			<scope>${provided.scope}</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.eclipse.jetty</groupId>
+			<artifactId>jetty-runner</artifactId>
+			<version>9.1.0.M0</version>
+			<scope>${provided.scope}</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.eclipse.jetty</groupId>
+			<artifactId>jetty-jsp</artifactId>
+			<version>9.1.0.M0</version>
+			<scope>${provided.scope}</scope>
+		</dependency>
+	</dependencies>
+	<build>
+		<!-- dirty hack to get resources into the classpath (because the *-res 
+			dependencies are empty) -->
+		<resources>
+			<resource>
+				<directory>${project.basedir}/../ctakes-ytex-res/src/main/resources</directory>
+			</resource>
+			<resource>
+				<directory>
+				${project.basedir}/../ctakes-ytex/target/classes
+				</directory>
+				<excludes>
+					<exclude>**/*.class</exclude>
+				</excludes>
+			</resource>
+		</resources>
+		<!-- dirty hack to get test resources into the classpath (because the *-res 
+			dependencies are empty) -->
+		<testResources>
+			<testResource>
+				<directory>
+				${project.basedir}/../ctakes-ytex/target/test-classes
+				</directory>
+				<excludes>
+					<exclude>**/*.class</exclude>
+				</excludes>
+			</testResource>
+		</testResources>
+		<finalName>ctakes-ytex-web</finalName>
+		<plugins>
+			<plugin>
+				<groupId>org.eclipse.jetty</groupId>
+				<artifactId>jetty-maven-plugin</artifactId>
+				<version>9.1.0.M0</version>
+				<executions>
+					<execution>
+						<id>start-jetty</id>
+						<!-- <phase>pre-integration-test</phase> -->
+						<configuration>
+							<scanIntervalSeconds>5</scanIntervalSeconds>
+							<stopPort>9966</stopPort>
+							<stopKey>foo</stopKey>
+							<useProvidedScope>true</useProvidedScope>
+							<useTestScope>${jetty.useTestScope}</useTestScope>
+							<connectors>
+								<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+									<port>9080</port>
+									<maxIdleTime>60000</maxIdleTime>
+								</connector>
+							</connectors>
+							<daemon>true</daemon>
+							<jvmArgs>-XX:MaxPermSize=128m -Xmx512m
+								-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000</jvmArgs>
+						</configuration>
+						<goals>
+							<goal>run-forked</goal>
+						</goals>
+					</execution>
+					<execution>
+						<id>stop-jetty</id>
+						<!-- <phase>post-integration-test</phase> -->
+						<goals>
+							<goal>stop</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>selenium-maven-plugin</artifactId> 
+				<version>2.3</version> <executions> <execution> <id>start</id> <phase>pre-integration-test</phase> 
+				<goals> <goal>start-server</goal> </goals> <configuration> <background>true</background> 
+				<logOutput>true</logOutput> <multiWindow>true</multiWindow> </configuration> 
+				</execution> <execution> <id>stop</id> <phase>post-integration-test</phase> 
+				<goals> <goal>stop-server</goal> </goals> </execution> </executions> </plugin> 
+				<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> 
+				<configuration> <excludes> <exclude>**/integration/*Test.java </exclude> 
+				</excludes> </configuration> <executions> <execution> <id>integration-tests</id> 
+				<phase>integration-test</phase> <goals> <goal>test</goal> </goals> <configuration> 
+				<skip>false</skip> <excludes> <exclude>none</exclude> </excludes> <includes> 
+				<include>**/integration/*Test.java </include> </includes> </configuration> 
+				</execution> </executions> </plugin> -->
+			<plugin>
+				<artifactId>maven-jar-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>make-a-jar</id>
+						<phase>package</phase>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+						<configuration>
+							<finalName>${project.artifactId}-${project.version}</finalName>
+							<includes>
+								<!-- Resources will be copied by the assembly No need for it to be 
+									inside the jar -->
+								<include>**/*.class</include>
+								<include>**/META-INF/**</include>
+							</includes>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-install-plugin</artifactId>
+				<executions>
+					<execution>
+						<phase>install</phase>
+						<goals>
+							<goal>install-file</goal>
+						</goals>
+						<configuration>
+							<packaging>jar</packaging>
+							<artifactId>${project.artifactId}</artifactId>
+							<groupId>${project.groupId}</groupId>
+							<version>${project.version}</version>
+							<file>
+								${project.build.directory}/${project.artifactId}-${project.version}.jar
+							</file>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+
+	</build>
+</project>

Added: ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptFirstWord.java
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptFirstWord.java?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptFirstWord.java (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptFirstWord.java Fri Jan 24 13:33:09 2014
@@ -0,0 +1,45 @@
+package org.apache.ctakes.ytex.web.search;
+
+import java.io.Serializable;
+
+/**
+ * Mapped to V_UMLS_FWORD_LOOKUP
+ * This table does not have a primary key, so we can't map it with hibernate.
+ * We could add a primary key, but the lookups are fairly simple, so
+ * we do it with sql.
+ * 
+ * @author vijay
+ */
+public class ConceptFirstWord implements Serializable {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private String fword;
+	private String conceptId;
+	private String text;
+	public String getFword() {
+		return fword;
+	}
+	public void setFword(String fword) {
+		this.fword = fword;
+	}
+	public String getConceptId() {
+		return conceptId;
+	}
+	public void setConceptId(String cui) {
+		this.conceptId = cui;
+	}
+	public String getText() {
+		return text;
+	}
+	public void setText(String text) {
+		this.text = text;
+	}
+	@Override
+	public String toString() {
+		return "UMLSFirstWord [cui=" + conceptId + ", text=" + text + "]";
+	}
+	
+
+}

Added: ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptLookupBean.java
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptLookupBean.java?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptLookupBean.java (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptLookupBean.java Fri Jan 24 13:33:09 2014
@@ -0,0 +1,216 @@
+package org.apache.ctakes.ytex.web.search;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.model.SelectItem;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import com.icesoft.faces.component.selectinputtext.SelectInputText;
+
+/**
+ * JSF Backing Bean for semanticSearch.jspx. Search for documents based on
+ * concept ids, negation status, patient, and date. Based on the IceFaces
+ * autocomplete example.
+ * 
+ * @author vijay
+ * 
+ */
+public class ConceptLookupBean implements Serializable {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	private static final Log log = LogFactory.getLog(ConceptLookupBean.class);
+
+	private ConceptSearchService conceptSearchService;
+
+	public ConceptSearchService getConceptSearchService() {
+		return conceptSearchService;
+	}
+
+	public void setUmlsFirstWordService(
+			ConceptSearchService umlsFirstWordService) {
+		this.conceptSearchService = umlsFirstWordService;
+	}
+
+	public ConceptFirstWord getSearchCUI() {
+		return searchCUI;
+	}
+
+	public void setSearchCUI(ConceptFirstWord searchCUI) {
+		this.searchCUI = searchCUI;
+	}
+
+	// default city, no value.
+	private ConceptFirstWord currentCUI = new ConceptFirstWord();
+
+	private ConceptFirstWord searchCUI = new ConceptFirstWord();
+
+	// list of possible matches.
+	private List<SelectItem> matchesList = new ArrayList<SelectItem>();
+
+	public void resetListen(ActionEvent event) {
+		reset();
+	}
+
+	public void reset() {
+		this.matchesList.clear();
+		this.searchCUI = null;
+	}
+
+	/**
+	 * Called when a user has modifed the SelectInputText value. This method
+	 * call causes the match list to be updated.
+	 * 
+	 * @param event
+	 */
+	public void updateList(ValueChangeEvent event) {
+		String searchString = (String) event.getNewValue();
+		String term = this.conceptSearchService
+				.getTermByConceptId(searchString);
+		if (term != null) {
+			ConceptFirstWord cfw = new ConceptFirstWord();
+			cfw.setFword(term);
+			cfw.setConceptId(searchString);
+			cfw.setText(term);
+			currentCUI = cfw;
+			this.matchesList = new ArrayList<SelectItem>(0);
+		} else {
+
+			// get a new list of matches.
+			setMatches(event);
+
+			// Get the auto complete component from the event and assing
+			if (event.getComponent() instanceof SelectInputText) {
+				SelectInputText autoComplete = (SelectInputText) event
+						.getComponent();
+				// if no selected item then return the previously selected item.
+				if (autoComplete.getSelectedItem() != null) {
+					currentCUI = (ConceptFirstWord) autoComplete
+							.getSelectedItem().getValue();
+				}
+				// otherwise if there is a selected item get the value from the
+				// match list
+				else {
+					ConceptFirstWord tempCUI = getMatch(autoComplete.getValue()
+							.toString());
+					if (tempCUI != null) {
+						currentCUI = tempCUI;
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * Gets the currently selected city.
+	 * 
+	 * @return selected city.
+	 */
+	public ConceptFirstWord getCurrentCUI() {
+		return currentCUI;
+	}
+
+	/**
+	 * The list of possible matches for the given SelectInputText value
+	 * 
+	 * @return list of possible matches.
+	 */
+	public List<SelectItem> getList() {
+		return matchesList;
+	}
+
+	public static String formatUMLSFirstWord(ConceptFirstWord fword) {
+		return fword.getText() + " [" + fword.getConceptId() + ']';
+	}
+
+	public static ConceptFirstWord extractUMLSFirstWord(String fword) {
+		String tokens[] = fword.split("[|]");
+		ConceptFirstWord umlsFWord = new ConceptFirstWord();
+		// last token is cui
+		if (tokens.length > 1) {
+			String cui = tokens[tokens.length - 1];
+			StringBuilder builder = new StringBuilder();
+			for (int i = 0; i < tokens.length - 1; i++) {
+				builder.append(tokens[i]);
+			}
+			String text = builder.toString();
+			umlsFWord.setConceptId(cui);
+			umlsFWord.setText(text);
+		}
+		return umlsFWord;
+	}
+
+	public static Comparator<Object> umlsFirstWordComparator = new Comparator<Object>() {
+
+		// compare method for city entries.
+		public int compare(Object o1, Object o2) {
+			String s1;
+			String s2;
+
+			if (o1 instanceof ConceptFirstWord) {
+				s1 = formatUMLSFirstWord((ConceptFirstWord) o1);
+			} else {
+				s1 = o1.toString();
+			}
+
+			if (o2 instanceof ConceptFirstWord) {
+				s2 = formatUMLSFirstWord((ConceptFirstWord) o2);
+			} else {
+				s2 = o2.toString();
+			}
+			return s1.compareTo(s2);
+		}
+	};
+
+	private ConceptFirstWord getMatch(String value) {
+		ConceptFirstWord result = null;
+		if (matchesList != null) {
+			SelectItem si;
+			Iterator<SelectItem> iter = matchesList.iterator();
+			while (iter.hasNext()) {
+				si = iter.next();
+				if (value.equals(si.getLabel())) {
+					return (ConceptFirstWord) si.getValue();
+				}
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * Utility method for building the match list given the current value of the
+	 * SelectInputText component.
+	 * 
+	 * @param event
+	 */
+	private void setMatches(ValueChangeEvent event) {
+
+		Object searchWord = event.getNewValue();
+		String searchString;
+		if (searchWord instanceof SelectItem) {
+			searchString = ((SelectItem) searchWord).getLabel();
+		} else {
+			searchString = searchWord.toString();
+		}
+		if (searchString != null && searchString.length() > 2) {
+			List<ConceptFirstWord> cuis = this.conceptSearchService
+					.getConceptByFirstWord(searchString);
+			this.matchesList = new ArrayList<SelectItem>(cuis.size());
+			for (ConceptFirstWord cui : cuis) {
+				this.matchesList.add(new SelectItem(cui,
+						formatUMLSFirstWord(cui)));
+			}
+		}
+	}
+
+}

Added: ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptSearchService.java
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptSearchService.java?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptSearchService.java (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptSearchService.java Fri Jan 24 13:33:09 2014
@@ -0,0 +1,31 @@
+package org.apache.ctakes.ytex.web.search;
+
+import java.util.List;
+
+/**
+ * Dao to get Concepts corresponding to the given text
+ * 
+ * @author vijay
+ * 
+ */
+public interface ConceptSearchService {
+
+	/**
+	 * get Concepts that start with the specified text.
+	 * 
+	 * @param fword
+	 * @return
+	 */
+	public abstract List<ConceptFirstWord> getConceptByFirstWord(String fword);
+
+	public String getTermByConceptId(String conceptId);
+
+	/**
+	 * if the conceptId is a valid conceptId, get the corresponding term
+	 * 
+	 * @param conceptId
+	 * @return term
+	 */
+	public abstract String checkTermByConceptId(String conceptId);
+
+}
\ No newline at end of file

Added: ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptSearchServiceImpl.java
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptSearchServiceImpl.java?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptSearchServiceImpl.java (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/ConceptSearchServiceImpl.java Fri Jan 24 13:33:09 2014
@@ -0,0 +1,152 @@
+package org.apache.ctakes.ytex.web.search;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.sql.DataSource;
+
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.jdbc.core.RowMapper;
+import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
+
+public class ConceptSearchServiceImpl implements ConceptSearchService,
+		InitializingBean {
+	public static class ConceptFirstWordRowMapper implements
+			RowMapper<ConceptFirstWord> {
+
+		public ConceptFirstWord mapRow(ResultSet rs, int rowNum)
+				throws SQLException {
+			ConceptFirstWord fword = new ConceptFirstWord();
+			fword.setConceptId(rs.getString("conceptId"));
+			fword.setFword(rs.getString("fword"));
+			fword.setText(rs.getString("text"));
+			return fword;
+		}
+
+	}
+
+	private String conceptIdToTermQuery;
+	private Pattern conceptPattern;
+	private DataSource dataSource;
+	private String fwordToConceptIdQuery;
+
+	private SimpleJdbcTemplate jdbcTemplate;
+
+	private Properties searchProperties;
+	private Properties ytexProperties;
+
+	public void afterPropertiesSet() throws Exception {
+		this.fwordToConceptIdQuery = prepareQuery(this.getSearchProperties()
+				.getProperty("retrieveConceptByFword"));
+		this.conceptIdToTermQuery = prepareQuery(this.getSearchProperties()
+				.getProperty("retrieveTermByConceptId"));
+		this.conceptPattern = Pattern.compile(searchProperties.getProperty(
+				"conceptIdPattern", "\\AC\\d{7}\\Z"));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * gov.va.vacs.esld.dao.UMLSFirstWordDao#getUMLSbyFirstWord(java.lang.String
+	 * )
+	 */
+	public List<ConceptFirstWord> getConceptByFirstWord(String textStart) {
+		String words[] = textStart.toLowerCase().split("\\s+");
+		String fword = textStart.toLowerCase();
+		// int nFWordLength = fword.length();
+		String text = textStart.toLowerCase();
+		int nTextLength = textStart.length();
+		if (words.length > 1) {
+			fword = words[0];
+			// nFWordLength = fword.length();
+		}
+		// return this.jdbcTemplate.query(query, new
+		// UMLSFirstWordRowMapper(),
+		// new Object[] { fword.length(), fword, nTextLength, text });
+		Map<String, Object> args = new HashMap<String, Object>();
+		args.put("fword", fword);
+		args.put("fwordlen", fword.length());
+		args.put("term", text);
+		args.put("termlen", nTextLength);
+		return this.jdbcTemplate.query(fwordToConceptIdQuery,
+				new ConceptFirstWordRowMapper(), args);
+	}
+
+	private List<ConceptFirstWord> getConceptById(String conceptId) {
+		String term = getTermByConceptId(conceptId);
+		if (term != null) {
+			List<ConceptFirstWord> terms = new ArrayList<ConceptFirstWord>(1);
+			ConceptFirstWord cft = new ConceptFirstWord();
+			cft.setConceptId(conceptId);
+			cft.setFword(term);
+			cft.setText(term);
+			terms.add(cft);
+			return terms;
+		} else {
+			return new ArrayList<ConceptFirstWord>(0);
+		}
+	}
+
+	public DataSource getDataSource() {
+		return this.dataSource;
+	}
+
+	public Properties getSearchProperties() {
+		return searchProperties;
+	}
+
+	public String checkTermByConceptId(String conceptId) {
+		Matcher m = conceptPattern.matcher(conceptId);
+		if (m.find()) {
+			return getTermByConceptId(conceptId);
+		} else {
+			return null;
+		}
+	}
+
+	public String getTermByConceptId(String conceptId) {
+		Map<String, Object> args = new HashMap<String, Object>();
+		args.put("conceptId", conceptId);
+		return this.jdbcTemplate.queryForObject(this.conceptIdToTermQuery,
+				String.class, args);
+	}
+
+	public Properties getYtexProperties() {
+		return ytexProperties;
+	}
+
+	private String prepareQuery(String queryTemplate) {
+		String dbName = this.getYtexProperties().getProperty("db.name");
+		String dbSchema = this.getYtexProperties().getProperty("db.schema");
+		String umlsSchema = this.getYtexProperties().getProperty("umls.schema",
+				dbSchema);
+		String umlsCatalog = this.getYtexProperties().getProperty(
+				"umls.catalog", dbName);
+		String query = queryTemplate.replaceAll("@db\\.schema@", this
+				.getYtexProperties().getProperty("db.schema"));
+		query = query.replaceAll("@umls\\.schema@", umlsSchema);
+		query = query.replaceAll("@umls\\.catalog@", umlsCatalog);
+		return query;
+	}
+
+	public void setDataSource(DataSource dataSource) {
+		this.dataSource = dataSource;
+		this.jdbcTemplate = new SimpleJdbcTemplate(dataSource);
+	}
+
+	public void setSearchProperties(Properties searchProperties) {
+		this.searchProperties = searchProperties;
+	}
+
+	public void setYtexProperties(Properties ytexProperties) {
+		this.ytexProperties = ytexProperties;
+	}
+}

Added: ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentSearchResult.java
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentSearchResult.java?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentSearchResult.java (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentSearchResult.java Fri Jan 24 13:33:09 2014
@@ -0,0 +1,75 @@
+package org.apache.ctakes.ytex.web.search;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Encapsulates document search results
+ * @author vijay
+ *
+ */
+public class DocumentSearchResult implements Serializable {
+	@Override
+	public String toString() {
+		return "DocumentSearchResult [cuiText=" + cuiText + ", documentID="
+				+ documentID + ", sentenceText=" + sentenceText + "]";
+	}
+	public int getDocumentID() {
+		return documentID;
+	}
+	public void setDocumentID(int documentID) {
+		this.documentID = documentID;
+	}
+	public String getSentenceText() {
+		return sentenceText;
+	}
+	public void setSentenceText(String sentenceText) {
+		this.sentenceText = sentenceText;
+	}
+	public Date getDocumentDate() {
+		return documentDate;
+	}
+	public void setDocumentDate(Date documentDate) {
+		this.documentDate = documentDate;
+	}
+	public String getDocumentTitle() {
+		return documentTitle;
+	}
+	public void setDocumentTitle(String documentTitle) {
+		this.documentTitle = documentTitle;
+	}
+	public String getDocumentTypeName() {
+		return documentTypeName;
+	}
+	public void setDocumentTypeName(String documentTypeName) {
+		this.documentTypeName = documentTypeName;
+	}
+	int documentID;
+	String sentenceText;
+	Date documentDate;
+	String documentTitle;
+	String documentTypeName;
+	String cuiText;
+	public String getCuiText() {
+		return cuiText;
+	}
+	public void setCuiText(String cuiText) {
+		this.cuiText = cuiText;
+	}
+	public DocumentSearchResult(int documentID, String sentenceText,
+			Date documentDate, String documentTitle, String documentTypeName,
+			String cuiText) {
+		super();
+		this.documentID = documentID;
+		this.sentenceText = sentenceText;
+		this.documentDate = documentDate;
+		this.documentTitle = documentTitle;
+		this.documentTypeName = documentTypeName;
+		this.cuiText = cuiText;
+	}
+	public DocumentSearchResult() {
+		super();
+	}
+	
+	
+}

Added: ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentSearchService.java
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentSearchService.java?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentSearchService.java (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentSearchService.java Fri Jan 24 13:33:09 2014
@@ -0,0 +1,46 @@
+package org.apache.ctakes.ytex.web.search;
+
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * Service for searching documents.
+ * Executes queries defined in ytex/search.properties.
+ * @author vijay
+ *
+ */
+public interface DocumentSearchService {
+
+	public abstract List<DocumentSearchResult> searchByCui(String cui);
+
+	/**
+	 * Extended search
+	 * @param code concept CUI or code.  this is the only required argument
+	 * @param documentTypeName document type name.  (in VACS @see DocumentType)
+	 * @param dateFrom document date greater than or equal to this
+	 * @param dateTo document date less than or equal to this
+	 * @param patientId patient id (study id in VACS)
+	 * @param negationStatus true - only affirmed terms.  false - only negated terms. 
+	 * @return list of results matching query
+	 */
+	public List<DocumentSearchResult> extendedSearch(String code, String documentTypeName, Date dateFrom,
+			Date dateTo, Integer patientId, Boolean negationStatus);
+
+	/**
+	 * perform full text search
+	 * @param searchTerm
+	 * @return list of maps for each record.  map keys correspond to search query headings.  map (i.e. query) must contain DOCUMENT_ID (integer) and NOTE (string) fields.
+	 */
+	public List<Map<String, Object>> fullTextSearch(String searchTerm);
+
+	/**
+	 * retrieve note for specified document id, retrieved via full text search
+	 * @param documentId
+	 * @return note text.
+	 */
+	public String getFullTextSearchDocument(int documentId);
+
+}
\ No newline at end of file

Added: ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentSearchServiceImpl.java
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentSearchServiceImpl.java?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentSearchServiceImpl.java (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentSearchServiceImpl.java Fri Jan 24 13:33:09 2014
@@ -0,0 +1,185 @@
+package org.apache.ctakes.ytex.web.search;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.sql.DataSource;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.hibernate.SessionFactory;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.jdbc.core.RowMapper;
+import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
+
+public class DocumentSearchServiceImpl implements DocumentSearchService,
+		InitializingBean {
+	public static class DocumentSearchResultMapper implements
+			RowMapper<DocumentSearchResult> {
+
+		public DocumentSearchResult mapRow(ResultSet rs, int rowNum)
+				throws SQLException {
+			DocumentSearchResult result = new DocumentSearchResult();
+			result.setCuiText(rs.getString("cui_text"));
+			result.setDocumentDate(rs.getDate("doc_date"));
+			result.setDocumentID(rs.getInt("document_id"));
+			result.setDocumentTitle(rs.getString("doc_title"));
+			result.setDocumentTypeName(rs.getString("document_type_name"));
+			result.setSentenceText(rs.getString("sentence_text"));
+			return result;
+		}
+	}
+	private static final Log log = LogFactory
+			.getLog(DocumentSearchServiceImpl.class);
+	private DataSource dataSource;
+	private SimpleJdbcTemplate jdbcTemplate;
+	private String query;
+
+	private Properties searchProperties;
+
+	private SessionFactory sessionFactory;
+
+	private Properties ytexProperties;
+	public void afterPropertiesSet() throws Exception {
+		this.query = searchProperties.getProperty("retrieveDocumentByCUI")
+				.replaceAll("@db\\.schema@",
+						this.getYtexProperties().getProperty("db.schema"));
+	}
+
+	/**
+	 * Extended search
+	 * 
+	 * @param code
+	 *            concept CUI or code. this is the only required argument
+	 * @param documentTypeName
+	 *            document type name. (in VACS @see DocumentType)
+	 * @param dateFrom
+	 *            document date greater than or equal to this
+	 * @param dateTo
+	 *            document date less than or equal to this
+	 * @param patientId
+	 *            patient id (study id in VACS)
+	 * @param negationStatus
+	 *            true - only affirmed terms. false - only negated terms.
+	 * @return list of results matching query
+	 */
+	public List<DocumentSearchResult> extendedSearch(String code,
+			String documentTypeName, Date dateFrom, Date dateTo,
+			Integer patientId, Boolean negationStatus) {
+		Map<String, Object> mapArgs = this.initMapArgs(code);
+		if (documentTypeName != null) {
+			mapArgs.put("document_type_name", documentTypeName);
+		}
+		if (dateFrom != null) {
+			mapArgs.put("from_doc_date", dateFrom);
+		}
+		if (dateTo != null) {
+			mapArgs.put("to_doc_date", dateTo);
+		}
+		if (patientId != null) {
+			mapArgs.put("patient_id", patientId);
+		}
+		if (negationStatus != null) {
+			mapArgs.put("certainty", negationStatus ? 0 : -1);
+		}
+		if (log.isDebugEnabled()) {
+			log.debug("executing query, query=" + query
+					+ ", args=" + mapArgs);
+		}
+		return this.jdbcTemplate.query(query,
+				new DocumentSearchResultMapper(), mapArgs);
+	}
+
+	/**
+	 * perform full text search
+	 * 
+	 * @param searchTerm
+	 * @return list of maps for each record. map keys correspond to search query
+	 *         headings. map (i.e. query) must contain DOCUMENT_ID (integer) and
+	 *         NOTE (string) fields.
+	 */
+	public List<Map<String, Object>> fullTextSearch(String searchTerm) {
+		return this.jdbcTemplate.queryForList(
+				this.searchProperties.getProperty("retrieveDocumentFullText"),
+				searchTerm);
+	}
+
+	public DataSource getDataSource() {
+		return this.dataSource;
+	}
+
+	/**
+	 * retrieve note for specified document id, retrieved via full text search
+	 * 
+	 * @param documentId
+	 * @return note text.
+	 */
+	public String getFullTextSearchDocument(int documentId) {
+		return this.jdbcTemplate.queryForObject(this.searchProperties
+				.getProperty("retrieveFullTextSearchDocument"), String.class,
+				documentId);
+	}
+
+	public Properties getSearchProperties() {
+		return searchProperties;
+	}
+
+	public SessionFactory getSessionFactory() {
+		return sessionFactory;
+	}
+
+	public Properties getYtexProperties() {
+		return ytexProperties;
+	}
+
+	private Map<String, Object> initMapArgs(String code) {
+		Map<String, Object> mapArgs = new HashMap<String, Object>(1);
+		mapArgs.put("code", code);
+		mapArgs.put("document_type_name", null);
+		mapArgs.put("from_doc_date", null);
+		mapArgs.put("to_doc_date", null);
+		mapArgs.put("patient_id", null);
+		mapArgs.put("certainty", null);
+		return mapArgs;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see gov.va.vacs.esld.dao.DocumentSearchDao#searchByCui(java.lang.String)
+	 */
+	public List<DocumentSearchResult> searchByCui(String code) {
+		Map<String, Object> mapArgs = this.initMapArgs(code);
+		return this.jdbcTemplate.query(query, new DocumentSearchResultMapper(),
+				mapArgs);
+		// String query =
+		// "select new ytex.web.search.DocumentSearchResult(d.documentID, substring(d.docText, 1,10), current_timestamp(), substring(d.docText, 1,10), substring(d.docText, 1,10), substring(d.docText, ne.begin+1,ne.end-ne.begin)) from OntologyConceptAnnotation o inner join o.namedEntityAnnotation ne inner join o.namedEntityAnnotation.document d";
+		// Query q =
+		// this.getSessionFactory().getCurrentSession().createQuery(searchProperties.getProperty("retrieveDocumentByCUIHql"));
+		// q.setParameter("code", code);
+		// q.setMaxResults(100);
+		// return q.list();
+	}
+
+	public void setDataSource(DataSource dataSource) {
+		this.dataSource = dataSource;
+		this.jdbcTemplate = new SimpleJdbcTemplate(dataSource);
+	}
+
+	public void setSearchProperties(Properties searchProperties) {
+		this.searchProperties = searchProperties;
+	}
+
+	public void setSessionFactory(SessionFactory sessionFactory) {
+		this.sessionFactory = sessionFactory;
+	}
+
+	public void setYtexProperties(Properties ytexProperties) {
+		this.ytexProperties = ytexProperties;
+	}
+}

Added: ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentViewBean.java
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentViewBean.java?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentViewBean.java (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/DocumentViewBean.java Fri Jan 24 13:33:09 2014
@@ -0,0 +1,103 @@
+package org.apache.ctakes.ytex.web.search;
+
+import java.io.Serializable;
+import java.util.Properties;
+
+import javax.faces.context.FacesContext;
+import javax.sql.DataSource;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
+
+/**
+ * JSF bean for viewing a document retrieved via semanticSearch.jspx. Relies on
+ * documentID parameter.
+ * 
+ * @author vijay
+ * 
+ */
+public class DocumentViewBean implements Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private transient DataSource dataSource;
+	private String docText;
+	private int documentID;
+	private transient SimpleJdbcTemplate jdbcTemplate;
+	private String rawText;
+
+	private Properties searchProperties;
+
+	private Properties ytexProperties;
+
+	public DataSource getDataSource() {
+		return dataSource;
+	}
+
+	public String getDocText() {
+		this.loadDocument();
+		return docText;
+	}
+
+	public int getDocumentID() {
+		String strDocumentID = (String) FacesContext.getCurrentInstance()
+				.getExternalContext().getRequestParameterMap()
+				.get("documentID");
+		if (strDocumentID != null) {
+			try {
+				documentID = Integer.parseInt(strDocumentID);
+			} catch (NumberFormatException nfe) {
+
+			}
+		}
+		return documentID;
+	}
+
+	private String getQuery() {
+		return searchProperties.getProperty("retrieveDocumentByID").replaceAll(
+				"@db\\.schema@",
+				this.getYtexProperties().getProperty("db.schema"));
+	}
+
+	public String getRawText() {
+		return rawText;
+	}
+
+	public Properties getSearchProperties() {
+		return searchProperties;
+	}
+
+	public Properties getYtexProperties() {
+		return ytexProperties;
+	}
+
+	public void loadDocument() {
+		if (getDocumentID() != 0) {
+			this.rawText = loadRawText(documentID);
+			if (rawText != null)
+				this.docText = StringEscapeUtils.escapeXml(rawText).replaceAll(
+						"\n", "<br>");
+		}
+	}
+
+	private String loadRawText(int documentId) {
+		return this.jdbcTemplate.queryForObject(this.getQuery(), String.class,
+				documentId);
+	}
+
+	public void setDataSource(DataSource dataSource) {
+		this.dataSource = dataSource;
+		this.jdbcTemplate = new SimpleJdbcTemplate(dataSource);
+	}
+
+	public void setSearchProperties(Properties searchProperties) {
+		this.searchProperties = searchProperties;
+	}
+
+	public void setYtexProperties(Properties ytexProperties) {
+		this.ytexProperties = ytexProperties;
+	}
+
+}

Added: ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/FullTextDocumentViewBean.java
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/FullTextDocumentViewBean.java?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/FullTextDocumentViewBean.java (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/FullTextDocumentViewBean.java Fri Jan 24 13:33:09 2014
@@ -0,0 +1,48 @@
+package org.apache.ctakes.ytex.web.search;
+
+import javax.faces.context.FacesContext;
+
+import org.apache.commons.lang.StringEscapeUtils;
+
+
+/**
+ * Jsf bean to view results of fullTextSearch.jspx.
+ * Relies on documentID parameter.
+ * @author vijay
+ *
+ */
+public class FullTextDocumentViewBean {
+	private String docText;
+	private DocumentSearchService documentSearchService;
+
+	private int documentID;
+
+	public int getDocumentID() {
+		this.loadDocument();
+		return documentID;
+	}
+
+	public String getDocText() {
+		this.loadDocument();
+		return docText;
+	}
+	public DocumentSearchService getDocumentSearchService() {
+		return documentSearchService;
+	}
+
+	public void setDocumentSearchService(DocumentSearchService documentSearchService) {
+		this.documentSearchService = documentSearchService;
+	}
+
+	public void loadDocument() {
+		if (this.docText == null) {
+			String strDocumentID = (String) FacesContext.getCurrentInstance()
+					.getExternalContext().getRequestParameterMap().get(
+							"documentID");
+			documentID = Integer.parseInt(strDocumentID); 
+			String docTextUnformatted = this.documentSearchService
+					.getFullTextSearchDocument(documentID);
+			this.docText = StringEscapeUtils.escapeXml(docTextUnformatted).replaceAll("\n", "<br>");
+		}
+	}
+}

Added: ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/FullTextSearchBean.java
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/FullTextSearchBean.java?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/FullTextSearchBean.java (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/FullTextSearchBean.java Fri Jan 24 13:33:09 2014
@@ -0,0 +1,49 @@
+package org.apache.ctakes.ytex.web.search;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.event.ActionEvent;
+
+
+/**
+ * Jsf bean for full text search.
+ * 
+ * 
+ * @author vijay
+ *
+ */
+public class FullTextSearchBean {
+	private String searchTerm;
+	private List<Map<String,Object>> searchResultList;
+	private DocumentSearchService documentSearchService;
+	
+	public String getSearchTerm() {
+		return searchTerm;
+	}
+
+	public void setSearchTerm(String searchTerm) {
+		this.searchTerm = searchTerm;
+	}
+
+	public List<Map<String, Object>> getSearchResultList() {
+		return searchResultList;
+	}
+
+	public void setSearchResultList(List<Map<String, Object>> searchResultList) {
+		this.searchResultList = searchResultList;
+	}
+
+	public DocumentSearchService getDocumentSearchService() {
+		return documentSearchService;
+	}
+
+	public void setDocumentSearchService(DocumentSearchService documentSearchService) {
+		this.documentSearchService = documentSearchService;
+	}
+
+	public void searchListen(ActionEvent event) {
+		if(searchTerm != null && searchTerm.trim().length() > 0)
+			this.searchResultList = documentSearchService.fullTextSearch(searchTerm);
+	}
+}

Added: ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SearchConfigBean.java
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SearchConfigBean.java?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SearchConfigBean.java (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SearchConfigBean.java Fri Jan 24 13:33:09 2014
@@ -0,0 +1,20 @@
+package org.apache.ctakes.ytex.web.search;
+
+import java.util.Properties;
+
+/**
+ * JSF Bean that holds search configuration parameters.
+ * @author vijay
+ *
+ */
+public class SearchConfigBean {
+	private Properties searchProperties;
+
+	public Properties getSearchProperties() {
+		return searchProperties;
+	}
+
+	public void setSearchProperties(Properties searchProperties) {
+		this.searchProperties = searchProperties;
+	} 
+}

Added: ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSearchBean.java
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSearchBean.java?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSearchBean.java (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSearchBean.java Fri Jan 24 13:33:09 2014
@@ -0,0 +1,283 @@
+package org.apache.ctakes.ytex.web.search;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.model.SelectItem;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import com.icesoft.faces.component.selectinputtext.SelectInputText;
+
+/**
+ * JSF Backing Bean for semanticSearch.jspx. Search for documents based on
+ * concept ids, negation status, patient, and date. Based on the IceFaces
+ * autocomplete example.
+ * 
+ * @author vijay
+ * 
+ */
+public class SemanticSearchBean implements Serializable {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	private static final Log log = LogFactory.getLog(SemanticSearchBean.class);
+
+	private transient ConceptSearchService umlsFirstWordService;
+	private transient DocumentSearchService documentSearchService;
+	private Date dateFrom;
+	private Date dateTo;
+	private Integer patientId;
+	private Boolean negationStatus;
+
+	public ConceptSearchService getUmlsFirstWordService() {
+		return umlsFirstWordService;
+	}
+
+	public void setUmlsFirstWordService(
+			ConceptSearchService umlsFirstWordService) {
+		this.umlsFirstWordService = umlsFirstWordService;
+	}
+
+	public DocumentSearchService getDocumentSearchService() {
+		return documentSearchService;
+	}
+
+	public void setDocumentSearchService(
+			DocumentSearchService documentSearchService) {
+		this.documentSearchService = documentSearchService;
+	}
+
+	public Date getDateFrom() {
+		return dateFrom;
+	}
+
+	public void setDateFrom(Date dateFrom) {
+		this.dateFrom = dateFrom;
+	}
+
+	public Date getDateTo() {
+		return dateTo;
+	}
+
+	public void setDateTo(Date dateTo) {
+		this.dateTo = dateTo;
+	}
+
+	public Integer getPatientId() {
+		return patientId;
+	}
+
+	public void setPatientId(Integer patientId) {
+		if (patientId != null && patientId != 0)
+			this.patientId = patientId;
+	}
+
+	public Boolean getNegationStatus() {
+		return negationStatus;
+	}
+
+	public void setNegationStatus(Boolean negationStatus) {
+		this.negationStatus = negationStatus;
+	}
+
+	public ConceptFirstWord getSearchCUI() {
+		return searchCUI;
+	}
+
+	public void setSearchCUI(ConceptFirstWord searchCUI) {
+		this.searchCUI = searchCUI;
+	}
+
+	public List<DocumentSearchResult> getSearchResultList() {
+		return searchResultList;
+	}
+
+	public void setSearchResultList(List<DocumentSearchResult> searchResultList) {
+		this.searchResultList = searchResultList;
+	}
+
+	// default city, no value.
+	private ConceptFirstWord currentCUI = new ConceptFirstWord();
+
+	private ConceptFirstWord searchCUI = new ConceptFirstWord();
+
+	// list of possible matches.
+	private List<SelectItem> matchesList = new ArrayList<SelectItem>();
+
+	private List<DocumentSearchResult> searchResultList = new ArrayList<DocumentSearchResult>();
+
+	public void searchListen(ActionEvent event) {
+		this.searchCUI = this.currentCUI;
+		if (this.currentCUI != null) {
+			if (this.getNegationStatus() != null || this.getPatientId() != null
+					|| this.getDateFrom() != null || this.getDateTo() != null) {
+				this.searchResultList = this.documentSearchService
+						.extendedSearch(this.currentCUI.getConceptId(), null,
+								this.getDateFrom(), this.getDateTo(),
+								this.getPatientId(), this.getNegationStatus());
+			} else {
+				this.searchResultList = this.documentSearchService
+						.searchByCui(this.currentCUI.getConceptId());
+			}
+			if (log.isDebugEnabled())
+				log.debug(this.searchResultList);
+		}
+	}
+
+	public void resetListen(ActionEvent event) {
+		this.setNegationStatus(null);
+		this.setDateFrom(null);
+		this.setDateTo(null);
+		this.setPatientId(null);
+		this.setSearchResultList(null);
+		this.searchCUI = null;
+		// can't clear cui in UI - only in backing bean
+		// this.currentCUI = null;
+		// this.matchesList = null;
+	}
+
+	/**
+	 * Called when a user has modifed the SelectInputText value. This method
+	 * call causes the match list to be updated.
+	 * 
+	 * @param event
+	 */
+	public void updateList(ValueChangeEvent event) {
+
+		// get a new list of matches.
+		setMatches(event);
+
+		// Get the auto complete component from the event and assing
+		if (event.getComponent() instanceof SelectInputText) {
+			SelectInputText autoComplete = (SelectInputText) event
+					.getComponent();
+			// if no selected item then return the previously selected item.
+			if (autoComplete.getSelectedItem() != null) {
+				currentCUI = (ConceptFirstWord) autoComplete.getSelectedItem()
+						.getValue();
+			}
+			// otherwise if there is a selected item get the value from the
+			// match list
+			else {
+				ConceptFirstWord tempCUI = getMatch(autoComplete.getValue()
+						.toString());
+				if (tempCUI != null) {
+					currentCUI = tempCUI;
+				}
+			}
+		}
+	}
+
+	/**
+	 * Gets the currently selected city.
+	 * 
+	 * @return selected city.
+	 */
+	public ConceptFirstWord getCurrentCUI() {
+		return currentCUI;
+	}
+
+	/**
+	 * The list of possible matches for the given SelectInputText value
+	 * 
+	 * @return list of possible matches.
+	 */
+	public List<SelectItem> getList() {
+		return matchesList;
+	}
+
+	public static String formatUMLSFirstWord(ConceptFirstWord fword) {
+		return fword.getText() + " [" + fword.getConceptId() + ']';
+	}
+
+	public static ConceptFirstWord extractUMLSFirstWord(String fword) {
+		String tokens[] = fword.split("[|]");
+		ConceptFirstWord umlsFWord = new ConceptFirstWord();
+		// last token is cui
+		if (tokens.length > 1) {
+			String cui = tokens[tokens.length - 1];
+			StringBuilder builder = new StringBuilder();
+			for (int i = 0; i < tokens.length - 1; i++) {
+				builder.append(tokens[i]);
+			}
+			String text = builder.toString();
+			umlsFWord.setConceptId(cui);
+			umlsFWord.setText(text);
+		}
+		return umlsFWord;
+	}
+
+	public static Comparator<Object> umlsFirstWordComparator = new Comparator<Object>() {
+
+		// compare method for city entries.
+		public int compare(Object o1, Object o2) {
+			String s1;
+			String s2;
+
+			if (o1 instanceof ConceptFirstWord) {
+				s1 = formatUMLSFirstWord((ConceptFirstWord) o1);
+			} else {
+				s1 = o1.toString();
+			}
+
+			if (o2 instanceof ConceptFirstWord) {
+				s2 = formatUMLSFirstWord((ConceptFirstWord) o2);
+			} else {
+				s2 = o2.toString();
+			}
+			return s1.compareTo(s2);
+		}
+	};
+
+	private ConceptFirstWord getMatch(String value) {
+		ConceptFirstWord result = null;
+		if (matchesList != null) {
+			SelectItem si;
+			Iterator<SelectItem> iter = matchesList.iterator();
+			while (iter.hasNext()) {
+				si = iter.next();
+				if (value.equals(si.getLabel())) {
+					return (ConceptFirstWord) si.getValue();
+				}
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * Utility method for building the match list given the current value of the
+	 * SelectInputText component.
+	 * 
+	 * @param event
+	 */
+	private void setMatches(ValueChangeEvent event) {
+
+		Object searchWord = event.getNewValue();
+		String searchString;
+		if (searchWord instanceof SelectItem) {
+			searchString = ((SelectItem) searchWord).getLabel();
+		} else {
+			searchString = searchWord.toString();
+		}
+		if (searchString != null && searchString.length() > 2) {
+			List<ConceptFirstWord> cuis = this.umlsFirstWordService
+					.getConceptByFirstWord(searchString);
+			this.matchesList = new ArrayList<SelectItem>(cuis.size());
+			for (ConceptFirstWord cui : cuis) {
+				this.matchesList.add(new SelectItem(cui,
+						formatUMLSFirstWord(cui)));
+			}
+		}
+	}
+
+}

Added: ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSimBean.java
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSimBean.java?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSimBean.java (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSimBean.java Fri Jan 24 13:33:09 2014
@@ -0,0 +1,350 @@
+package org.apache.ctakes.ytex.web.search;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.Serializable;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ValueChangeEvent;
+
+import org.apache.ctakes.ytex.kernel.metric.ConceptPair;
+import org.apache.ctakes.ytex.kernel.metric.ConceptPairSimilarity;
+import org.apache.ctakes.ytex.kernel.metric.ConceptSimilarityService;
+import org.apache.ctakes.ytex.kernel.metric.ConceptSimilarityService.SimilarityMetricEnum;
+import org.apache.ctakes.ytex.kernel.metric.LCSPath;
+import org.apache.ctakes.ytex.kernel.metric.SimilarityInfo;
+
+public class SemanticSimBean implements Serializable {
+	public static class SimilarityEntry implements Serializable {
+		/**
+		 * 
+		 */
+		private static final long serialVersionUID = 1L;
+		private ConceptPair conceptPair;
+		private Map<SimilarityMetricEnum, Double> similarityMap;
+
+		public ConceptPair getConceptPair() {
+			return conceptPair;
+		}
+
+		public Map<SimilarityMetricEnum, Double> getSimilarityMap() {
+			return similarityMap;
+		}
+
+		public void setConceptPair(ConceptPair conceptPair) {
+			this.conceptPair = conceptPair;
+		}
+
+		public void setSimilarityMap(
+				Map<SimilarityMetricEnum, Double> similarityMap) {
+			this.similarityMap = similarityMap;
+		}
+
+	}
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	transient ConceptLookupBean concept1;
+	transient ConceptLookupBean concept2;
+	transient String conceptGraphName;
+	transient String conceptPairText;
+	transient String corpusLcsTerm;
+	transient String exportType;
+
+	transient String intrinsicLcsTerm;
+	transient Map<String, String> lcsPathMap = new TreeMap<String, String>();
+	transient List<SimilarityMetricEnum> metrics = new ArrayList<SimilarityMetricEnum>();
+	transient String[] metricSelectCorpusIC;
+	transient String[] metricSelectIntrinsicIC;
+	transient String[] metricSelectTaxonomy;
+
+	transient SemanticSimRegistryBean semanticSimRegistryBean;
+
+	/**
+	 * when doing similarity for multiple concept pairs
+	 */
+	transient List<SimilarityEntry> similarityList;
+
+	transient Map<SimilarityMetricEnum, Double> similarityMap = new HashMap<SimilarityMetricEnum, Double>();
+
+	/**
+	 * when doing similarity for a single concept pair
+	 */
+	transient SimilarityInfo simInfo = new SimilarityInfo();
+	public SemanticSimBean() {
+	}
+	public ConceptLookupBean getConcept1() {
+		return concept1;
+	}
+
+	public ConceptLookupBean getConcept2() {
+		return concept2;
+	}
+
+	public String getConceptGraphName() {
+		return conceptGraphName;
+	}
+
+	public String getConceptPairText() {
+		return conceptPairText;
+	}
+
+	public String getCorpusLcsTerm() {
+		return corpusLcsTerm;
+	}
+
+	public String getExportType() {
+		return exportType;
+	}
+
+	public String getIntrinsicLcsTerm() {
+		return intrinsicLcsTerm;
+	}
+
+	public Map<String, String> getLcsPathMap() {
+		return lcsPathMap;
+	}
+
+	public List<SimilarityMetricEnum> getMetrics() {
+		return metrics;
+	}
+
+	public String[] getMetricSelectCorpusIC() {
+		return metricSelectCorpusIC;
+	}
+
+	public String[] getMetricSelectIntrinsicIC() {
+		return metricSelectIntrinsicIC;
+	}
+
+	public String[] getMetricSelectTaxonomy() {
+		return metricSelectTaxonomy;
+	}
+
+	public SemanticSimRegistryBean getSemanticSimRegistryBean() {
+		return semanticSimRegistryBean;
+	}
+
+	public List<SimilarityEntry> getSimilarityList() {
+		return similarityList;
+	}
+
+	public Map<SimilarityMetricEnum, Double> getSimilarityMap() {
+		return similarityMap;
+	}
+
+	public SimilarityInfo getSimInfo() {
+		return simInfo;
+	}
+
+	private void initMetrics() {
+		this.metrics.clear();
+		for (String metric : this.metricSelectTaxonomy) {
+			metrics.add(SimilarityMetricEnum.valueOf(metric));
+		}
+		for (String metric : this.metricSelectCorpusIC) {
+			metrics.add(SimilarityMetricEnum.valueOf(metric));
+		}
+		for (String metric : this.metricSelectIntrinsicIC) {
+			metrics.add(SimilarityMetricEnum.valueOf(metric));
+		}
+	}
+
+	private void reset() {
+		ConceptSearchService searchSvc = this.getSemanticSimRegistryBean()
+				.getSemanticSimServiceMap().get(this.conceptGraphName)
+				.getConceptSearchService();
+		concept1.reset();
+		concept1.setUmlsFirstWordService(searchSvc);
+		concept2.reset();
+		concept2.setUmlsFirstWordService(searchSvc);
+		this.simInfo = null;
+		this.intrinsicLcsTerm = null;
+		this.corpusLcsTerm = null;
+		this.metrics.clear();
+		if (this.similarityMap != null)
+			this.similarityMap.clear();
+	}
+
+	public void resetListen(ActionEvent event) {
+		reset();
+	}
+
+	public void setConcept1(ConceptLookupBean concept1) {
+		this.concept1 = concept1;
+	}
+
+	public void setConcept2(ConceptLookupBean concept2) {
+		this.concept2 = concept2;
+	}
+
+	public void setConceptGraphName(String conceptGraphName) {
+		this.conceptGraphName = conceptGraphName;
+	}
+
+	public void setConceptPairText(String conceptPairText) {
+		this.conceptPairText = conceptPairText;
+	}
+
+	public void setCorpusLcsTerm(String corpusLcsTerm) {
+		this.corpusLcsTerm = corpusLcsTerm;
+	}
+
+	public void setExportType(String exportType) {
+		this.exportType = exportType;
+	}
+
+	public void setIntrinsicLcsTerm(String intrinsicLcsTerm) {
+		this.intrinsicLcsTerm = intrinsicLcsTerm;
+	}
+
+	public void setLcsPathMap(Map<String, String> lcsPathMap) {
+		this.lcsPathMap = lcsPathMap;
+	}
+
+	public void setMetrics(List<SimilarityMetricEnum> metrics) {
+		this.metrics = metrics;
+	}
+
+	public void setMetricSelectCorpusIC(String[] metricSelectCorpusIC) {
+		this.metricSelectCorpusIC = metricSelectCorpusIC;
+	}
+
+	public void setMetricSelectIntrinsicIC(String[] metricSelectIntrinsicIC) {
+		this.metricSelectIntrinsicIC = metricSelectIntrinsicIC;
+	}
+
+	public void setMetricSelectTaxonomy(String[] metricSelectTaxonomy) {
+		this.metricSelectTaxonomy = metricSelectTaxonomy;
+	}
+
+	public void setSemanticSimRegistryBean(
+			SemanticSimRegistryBean semanticSimRegistryBean) {
+		this.semanticSimRegistryBean = semanticSimRegistryBean;
+		if (semanticSimRegistryBean != null)
+			this.conceptGraphName = semanticSimRegistryBean
+					.getDefaultConceptGraphName();
+	}
+
+	public void setSimilarityList(List<SimilarityEntry> similarityList) {
+		this.similarityList = similarityList;
+	}
+
+	public void setSimilarityMap(Map<SimilarityMetricEnum, Double> similarityMap) {
+		this.similarityMap = similarityMap;
+	}
+
+	public void setSimInfo(SimilarityInfo simInfo) {
+		this.simInfo = simInfo;
+	}
+
+	/**
+	 * handle submit
+	 * 
+	 * @param event
+	 */
+	public void simListen(ActionEvent event) {
+		if (this.concept1.getCurrentCUI() != null
+				&& this.concept2.getCurrentCUI() != null) {
+			this.concept1.setSearchCUI(this.concept1.getCurrentCUI());
+			this.concept2.setSearchCUI(this.concept2.getCurrentCUI());
+			initMetrics();
+			ConceptSimilarityService simSvc = this.getSemanticSimRegistryBean()
+					.getSemanticSimServiceMap().get(conceptGraphName)
+					.getConceptSimilarityService();
+			ConceptSearchService searchSvc = this.getSemanticSimRegistryBean()
+					.getSemanticSimServiceMap().get(conceptGraphName)
+					.getConceptSearchService();
+			ConceptPairSimilarity csim = simSvc.similarity(metrics, concept1
+					.getSearchCUI().getConceptId(), concept2.getSearchCUI()
+					.getConceptId(), null, true);
+			this.simInfo = csim.getSimilarityInfo();
+			this.similarityMap = toSimMap(csim);
+			lcsPathMap.clear();
+			if (simInfo.getLcsPaths() != null) {
+				for (LCSPath lcsPath : simInfo.getLcsPaths()) {
+					String lcs = lcsPath.getLcs();
+					lcsPathMap.put(lcs, lcsPath.toString());
+				}
+			}
+			if (simInfo.getCorpusLcs() != null) {
+				this.corpusLcsTerm = searchSvc.getTermByConceptId(simInfo
+						.getCorpusLcs());
+			} else {
+				this.corpusLcsTerm = null;
+			}
+			if (simInfo.getIntrinsicLcs() != null) {
+				this.intrinsicLcsTerm = searchSvc.getTermByConceptId(simInfo
+						.getIntrinsicLcs());
+			} else {
+				this.intrinsicLcsTerm = null;
+			}
+		}
+	}
+
+	public void simMultiListen(ActionEvent event) throws IOException {
+		this.similarityList = new ArrayList<SimilarityEntry>();
+		if (conceptPairText != null) {
+			initMetrics();
+			// parse concept pairs
+			List<ConceptPair> conceptPairs = new ArrayList<ConceptPair>();
+			BufferedReader r = new BufferedReader(new StringReader(
+					conceptPairText));
+			String line = null;
+			while ((line = r.readLine()) != null) {
+				String concepts[] = line.split(",|\\s");
+				if (concepts.length == 2) {
+					ConceptPair p = new ConceptPair();
+					p.setConcept1(concepts[0]);
+					p.setConcept2(concepts[1]);
+					conceptPairs.add(p);
+				}
+			}
+			// calculate sim
+			ConceptSimilarityService simSvc = this.getSemanticSimRegistryBean()
+					.getSemanticSimServiceMap().get(conceptGraphName)
+					.getConceptSimilarityService();
+			List<ConceptPairSimilarity> similarities = simSvc.similarity(
+					conceptPairs, metrics, null, false);
+			// load list with results
+			for (int i = 0; i < conceptPairs.size(); i++) {
+				SimilarityEntry e = new SimilarityEntry();
+				e.setConceptPair(conceptPairs.get(i));
+				e.setSimilarityMap(this.toSimMap(similarities.get(i)));
+				this.similarityList.add(e);
+			}
+		}
+
+	}
+
+	private Map<SimilarityMetricEnum, Double> toSimMap(
+			ConceptPairSimilarity csim) {
+		Map<SimilarityMetricEnum, Double> simMap = new TreeMap<SimilarityMetricEnum, Double>();
+		for (int i = 0; i < metrics.size(); i++) {
+			simMap.put(metrics.get(i), csim.getSimilarities()
+					.get(i));
+		}
+		return simMap;
+	}
+
+	/**
+	 * handle selecting different concept graph
+	 * 
+	 * @param event
+	 */
+	public void updateConceptGraph(ValueChangeEvent event) {
+		String newConceptGraphName = (String) event.getNewValue();
+		if (!newConceptGraphName.equals(this.conceptGraphName)) {
+			this.conceptGraphName = newConceptGraphName;
+			this.reset();
+		}
+	}
+}

Added: ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSimRegistryBean.java
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSimRegistryBean.java?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSimRegistryBean.java (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSimRegistryBean.java Fri Jan 24 13:33:09 2014
@@ -0,0 +1,47 @@
+package org.apache.ctakes.ytex.web.search;
+
+import java.util.List;
+import java.util.SortedMap;
+import java.util.TreeMap;
+
+public class SemanticSimRegistryBean {
+	String defaultConceptGraphName;
+	SortedMap<String, String> semanticSimDescriptionMap;
+	List<SemanticSimServiceBean> semanticSimServiceList;
+
+	SortedMap<String, SemanticSimServiceBean> semanticSimServiceMap;
+
+	public String getDefaultConceptGraphName() {
+		return defaultConceptGraphName;
+	}
+
+	public SortedMap<String, String> getSemanticSimDescriptionMap() {
+		return semanticSimDescriptionMap;
+	}
+
+	public List<SemanticSimServiceBean> getSemanticSimServiceList() {
+		return semanticSimServiceList;
+	}
+
+	public SortedMap<String, SemanticSimServiceBean> getSemanticSimServiceMap() {
+		return semanticSimServiceMap;
+	}
+
+	public void setSemanticSimServiceList(
+			List<SemanticSimServiceBean> semanticSimServiceList) {
+		this.semanticSimServiceList = semanticSimServiceList;
+		if (semanticSimServiceList != null && semanticSimServiceList.size() > 0) {
+			semanticSimServiceMap = new TreeMap<String, SemanticSimServiceBean>();
+			semanticSimDescriptionMap = new TreeMap<String, String>();
+			defaultConceptGraphName = semanticSimServiceList.get(0)
+					.getConceptSimilarityService().getConceptGraphName();
+			for (SemanticSimServiceBean s : semanticSimServiceList) {
+				semanticSimServiceMap.put(s.getConceptSimilarityService()
+						.getConceptGraphName(), s);
+				semanticSimDescriptionMap.put(s.getDescription(), s
+						.getConceptSimilarityService().getConceptGraphName());
+			}
+		}
+	}
+
+}

Added: ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSimServiceBean.java
URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSimServiceBean.java?rev=1560995&view=auto
==============================================================================
--- ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSimServiceBean.java (added)
+++ ctakes/branches/ytex/ctakes-ytex-web/src/main/java/org/apache/ctakes/ytex/web/search/SemanticSimServiceBean.java Fri Jan 24 13:33:09 2014
@@ -0,0 +1,36 @@
+package org.apache.ctakes.ytex.web.search;
+
+import org.apache.ctakes.ytex.kernel.metric.ConceptSimilarityService;
+
+public class SemanticSimServiceBean {
+
+	private ConceptSearchService conceptSearchService;
+	private String description;
+	private ConceptSimilarityService conceptSimilarityService;
+
+	public ConceptSearchService getConceptSearchService() {
+		return conceptSearchService;
+	}
+
+	public void setConceptSearchService(
+			ConceptSearchService conceptSearchService) {
+		this.conceptSearchService = conceptSearchService;
+	}
+
+	public String getDescription() {
+		return description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	public ConceptSimilarityService getConceptSimilarityService() {
+		return conceptSimilarityService;
+	}
+
+	public void setConceptSimilarityService(
+			ConceptSimilarityService conceptSimilarityService) {
+		this.conceptSimilarityService = conceptSimilarityService;
+	}
+}



Mime
View raw message