Author: suat
Date: Tue Dec 13 08:50:06 2011
New Revision: 1213600

URL: http://svn.apache.org/viewvc?rev=1213600&view=rev
Log:
Small bug fixes e.g location of search box, setting content item title 
correctly...

Modified:
    
incubator/stanbol/trunk/contenthub/core/src/main/java/org/apache/stanbol/contenthub/core/store/SolrContentItemImpl.java
    
incubator/stanbol/trunk/contenthub/core/src/main/java/org/apache/stanbol/contenthub/core/store/SolrStoreImpl.java
    incubator/stanbol/trunk/contenthub/pom.xml
    
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/static/style/search.css
    
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/ContenthubStoreResource/index.ftl
    
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/SearchResource/index.ftl
    
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/SearchResource/result.ftl
    
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/SearchResource/result_full.ftl

Modified: 
incubator/stanbol/trunk/contenthub/core/src/main/java/org/apache/stanbol/contenthub/core/store/SolrContentItemImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/contenthub/core/src/main/java/org/apache/stanbol/contenthub/core/store/SolrContentItemImpl.java?rev=1213600&r1=1213599&r2=1213600&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/contenthub/core/src/main/java/org/apache/stanbol/contenthub/core/store/SolrContentItemImpl.java
 (original)
+++ 
incubator/stanbol/trunk/contenthub/core/src/main/java/org/apache/stanbol/contenthub/core/store/SolrContentItemImpl.java
 Tue Dec 13 08:50:06 2011
@@ -148,6 +148,10 @@ public class SolrContentItemImpl impleme
         } else {
             List<Object> titleList = 
constraints.get(SolrFieldName.TITLE.toString());
             if (titleList != null) {
+                String titleCons = titleList.toString();
+                titleCons = titleCons.substring(1,titleCons.length()-1);
+                titleList.clear();
+                titleList.add(titleCons);
                 title = titleList.get(0).toString();
             } else {
                 title = id;

Modified: 
incubator/stanbol/trunk/contenthub/core/src/main/java/org/apache/stanbol/contenthub/core/store/SolrStoreImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/contenthub/core/src/main/java/org/apache/stanbol/contenthub/core/store/SolrStoreImpl.java?rev=1213600&r1=1213599&r2=1213600&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/contenthub/core/src/main/java/org/apache/stanbol/contenthub/core/store/SolrStoreImpl.java
 (original)
+++ 
incubator/stanbol/trunk/contenthub/core/src/main/java/org/apache/stanbol/contenthub/core/store/SolrStoreImpl.java
 Tue Dec 13 08:50:06 2011
@@ -420,7 +420,11 @@ public class SolrStoreImpl implements So
             }
         }
 
-        return new SolrContentItemImpl(id, title, content.getBytes(), 
mimeType, metadata, constraints);
+        byte[] contentByte = null;
+        if(content != null){
+               contentByte = content.getBytes();
+        }
+        return new SolrContentItemImpl(id, title, contentByte, mimeType, 
metadata, constraints);
     }
 
     @Override

Modified: incubator/stanbol/trunk/contenthub/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/contenthub/pom.xml?rev=1213600&r1=1213599&r2=1213600&view=diff
==============================================================================
--- incubator/stanbol/trunk/contenthub/pom.xml (original)
+++ incubator/stanbol/trunk/contenthub/pom.xml Tue Dec 13 08:50:06 2011
@@ -16,45 +16,45 @@
    limitations under the License.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
 
-       <modelVersion>4.0.0</modelVersion>
+  <modelVersion>4.0.0</modelVersion>
 
-       <parent>
-               <groupId>org.apache.stanbol</groupId>
-               <artifactId>org.apache.stanbol.contenthub.parent</artifactId>
-               <version>0.9.0-incubating-SNAPSHOT</version>
-               <relativePath>./parent</relativePath>
-       </parent>
-
-       <groupId>org.apache.stanbol</groupId>
-       <artifactId>org.apache.stanbol.contenthub.reactor</artifactId>
-       <packaging>pom</packaging>
+  <parent>
+    <groupId>org.apache.stanbol</groupId>
+    <artifactId>org.apache.stanbol.contenthub.parent</artifactId>
+    <version>0.9.0-incubating-SNAPSHOT</version>
+    <relativePath>./parent</relativePath>
+  </parent>
+
+  <groupId>org.apache.stanbol</groupId>
+  <artifactId>org.apache.stanbol.contenthub.reactor</artifactId>
+  <packaging>pom</packaging>
 
-       <name>Apache Stanbol Contenthub Reactor</name>
-       <description>
+  <name>Apache Stanbol Contenthub Reactor</name>
+  <description>
     Pseudo project to build the complete Contenthub bundle
   </description>
 
-       <inceptionYear>2011</inceptionYear>
+  <inceptionYear>2011</inceptionYear>
 
-       <scm>
-               <connection>
+  <scm>
+    <connection>
                
scm:svn:http://svn.apache.org/repos/asf/incubator/stanbol/trunk/contenthub/
     </connection>
-               <developerConnection>
+    <developerConnection>
                
scm:svn:https://svn.apache.org/repos/asf/incubator/stanbol/trunk/contenthub/
     </developerConnection>
-       </scm>
+  </scm>
 
-       <modules>
-               <module>parent</module>
-               <module>api</module>
-               <module>core</module>
-               <module>search</module>
-               <module>helper/cnn-importer</module>
-               <module>web</module>
-               <!--<module>ldpath</module>-->
-               <module>bundlelist</module>
-       </modules>
+  <modules>
+    <module>parent</module>
+    <module>api</module>
+    <module>core</module>
+    <module>search</module>
+    <module>helper/cnn-importer</module>
+    <module>web</module>
+<!--     <module>ldpath</module> -->
+    <module>bundlelist</module>
+  </modules>
 </project>

Modified: 
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/static/style/search.css
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/static/style/search.css?rev=1213600&r1=1213599&r2=1213600&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/static/style/search.css
 (original)
+++ 
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/static/style/search.css
 Tue Dec 13 08:50:06 2011
@@ -73,9 +73,6 @@ div .resources{
 }
 
 div .searchbox {
-  position: absolute;
-  top: 15%;
-  left: 65%;
   margin-left: 0.5em;
   border: 1px solid transparent;
   padding: 0.5em 0.5em 0.5em 0.5em;

Modified: 
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/ContenthubStoreResource/index.ftl
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/ContenthubStoreResource/index.ftl?rev=1213600&r1=1213599&r2=1213600&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/ContenthubStoreResource/index.ftl
 (original)
+++ 
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/ContenthubStoreResource/index.ftl
 Tue Dec 13 08:50:06 2011
@@ -20,11 +20,11 @@
 
 <div class="panel" id="webview">
 
-<div class="searchbox">
-<table><tr><td>
-<input type="text" id="searchKeywords" name="searchKeywords" onkeydown="if 
(event.keyCode == 13) document.getElementById('searchButton').click()" /><input 
id="searchButton" type="button" value="Search" onclick="performSearch()" />
-</td></tr><tr align="right"><td>
-<div><a href="contenthub/search" />Search Page</a></div></td></tr></table>
+<div class="searchbox" align="right">
+  <table><td>
+    <tr><input type="text" id="searchKeywords" name="searchKeywords" 
onkeydown="if (event.keyCode == 13) 
document.getElementById('searchButton').click()" /><input id="searchButton" 
type="button" value="Search" onclick="performSearch()" /></tr>
+    <tr><div><a href="contenthub/search" />Search Page</a></div></tr>
+  </td></table>
 </div>
 
 <#--

Modified: 
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/SearchResource/index.ftl
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/SearchResource/index.ftl?rev=1213600&r1=1213599&r2=1213600&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/SearchResource/index.ftl
 (original)
+++ 
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/SearchResource/index.ftl
 Tue Dec 13 08:50:06 2011
@@ -95,8 +95,6 @@
 
                function getResults(jsonCons,facetName,facetValue,operation){
                        //clears the content of div because it'll be filled by 
explorer posts
-                       //$("#tempEntityHubSuggestions").empty();
-                       $("#allSuggestions").remove();
                                                
                        var keywordToSearch = $("#keywordIn").val();
                        
@@ -231,6 +229,11 @@
                        }
                        //means if there is need to recalculate the suggestions 
from mexternal resource such as entityhub
                        if(operation == "first" || operation == "explore" || 
operation == "previousSuggestion") {
+                               //if there ia lready suggestion on the page, 
first cleans them
+                               if(document.getElementById("allSuggestions")) {
+                                       
$("#entityHubSuggestionSubDiv").html('');
+                               }
+                               $("#tempEntityHubSuggestions").html('');
                                $.ajax({
                                        url : 
"${it.publicBaseUri}contenthub/search/suggestion",
                                        type : "POST",

Modified: 
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/SearchResource/result.ftl
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/SearchResource/result.ftl?rev=1213600&r1=1213599&r2=1213600&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/SearchResource/result.ftl
 (original)
+++ 
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/SearchResource/result.ftl
 Tue Dec 13 08:50:06 2011
@@ -24,7 +24,7 @@
 <div id="text">
 </div>
 <div id="result" class="result">
-<a href="">Back to Search</a></br>
+<a href="${it.publicBaseUri}contenthub/search">Back to Search</a></br>
        <#assign con=it.templateData.context>
        <!--General Divs for layout  -->
        <div class="keywords">

Modified: 
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/SearchResource/result_full.ftl
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/SearchResource/result_full.ftl?rev=1213600&r1=1213599&r2=1213600&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/SearchResource/result_full.ftl
 (original)
+++ 
incubator/stanbol/trunk/contenthub/web/src/main/resources/org/apache/stanbol/contenthub/web/templates/org/apache/stanbol/contenthub/web/resources/SearchResource/result_full.ftl
 Tue Dec 13 08:50:06 2011
@@ -105,7 +105,9 @@
                $(document).ready(init);
        
                function init() {
-               
+                       if(document.getElementById("allSuggestions")) {
+                                       $("#entityHubSuggestionSubDiv").empty();
+                               }
                        $.ajax({
                                url : 
"${it.publicBaseUri}contenthub/search/suggestion",
                                type : "POST",
@@ -148,7 +150,6 @@
                function getResults(jsonCons,facetName,facetValue,operation){
                        //clears the content of div because it'll be filled by 
explorer posts
                        //$("#tempEntityHubSuggestions").empty();
-                       $("#allSuggestions").remove();
                                                
                        var keywordToSearch = $("#keywordIn").val();
                        
@@ -279,6 +280,10 @@
                        }
                        //means if there is need to recalculate the suggestions 
from external resource such as entityhub
                        if(operation == "first" || operation == "explore" || 
operation == "previousSuggestion") {
+                               if(document.getElementById("allSuggestions")) {
+                                       
$("#entityHubSuggestionSubDiv").html('');
+                               }
+                               $("#tempEntityHubSuggestions").html('');
                                $.ajax({
                                        url : 
"${it.publicBaseUri}contenthub/search/suggestion",
                                        type : "POST",


Reply via email to