Author: meric
Date: Wed Feb 27 16:07:15 2013
New Revision: 1450825
URL: http://svn.apache.org/r1450825
Log:
STANBOL-499 Contenthub Search small changes
* dependency versions are updated according to the last release
* component version is updated to 0.11.0-SNAPSHOT
* merged with trunk(r1444001)
* SolrQueryUtil is deprecated and moved to servicesapi/index/search/solr
Modified:
stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/pom.xml
stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/src/license/THIRD-PARTY.properties
stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/FacetImpl.java
stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/FeaturedSearchImpl.java
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/pom.xml
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/license/THIRD-PARTY.properties
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/main/java/org/apache/stanbol/contenthub/search/related/ontologyresource/IndexingHelper.java
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/main/java/org/apache/stanbol/contenthub/search/related/ontologyresource/QueryFactory.java
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/main/java/org/apache/stanbol/contenthub/search/related/referencedsite/ReferencedSiteSearch.java
stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/pom.xml
stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/src/license/THIRD-PARTY.properties
stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/src/main/java/org/apache/stanbol/contenthub/search/solr/SolrSearchImpl.java
stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/src/main/java/org/apache/stanbol/contenthub/search/solr/util/SolrQueryUtil.java
Modified:
stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/pom.xml?rev=1450825&r1=1450824&r2=1450825&view=diff
==============================================================================
---
stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/pom.xml
(original)
+++
stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/pom.xml
Wed Feb 27 16:07:15 2013
@@ -16,9 +16,9 @@
<parent>
<groupId>org.apache.stanbol</groupId>
- <artifactId>org.apache.stanbol.contenthub.parent</artifactId>
- <version>0.10.0-incubating-SNAPSHOT</version>
- <relativePath>../../parent</relativePath>
+ <artifactId>apache-stanbol-contenthub</artifactId>
+ <version>0.11.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
</parent>
<artifactId>org.apache.stanbol.contenthub.search.featured</artifactId>
@@ -33,6 +33,18 @@
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Import-Package>
+ org.apache.stanbol.contenthub.servicesapi.index.search.featured;
provide:=true,
+ *
+ </Import-Package>
+ <Export-Package>
+ org.apache.stanbol.contenthub.search.featured,
+ org.apache.stanbol.contenthub.search.featured.util
+ </Export-Package>
+ </instructions>
+ </configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
@@ -40,27 +52,25 @@
</plugin>
</plugins>
</build>
+
<dependencies>
+ <!-- Increased version because of the Faceted search API -->
<dependency>
<groupId>org.apache.stanbol</groupId>
<artifactId>org.apache.stanbol.contenthub.servicesapi</artifactId>
- <version>0.10.0-incubating-SNAPSHOT</version>
+ <version>0.11.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.stanbol</groupId>
<artifactId>org.apache.stanbol.contenthub.store.solr</artifactId>
- <version>0.10.0-incubating-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.stanbol</groupId>
- <artifactId>org.apache.stanbol.contenthub.index</artifactId>
- <version>0.10.0-incubating-SNAPSHOT</version>
+ <version>0.11.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.stanbol</groupId>
<artifactId>org.apache.stanbol.contenthub.search.solr</artifactId>
- <version>0.10.0-incubating-SNAPSHOT</version>
+ <version>0.11.0-SNAPSHOT</version>
</dependency>
+
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.annotations</artifactId>
Modified:
stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/src/license/THIRD-PARTY.properties
URL:
http://svn.apache.org/viewvc/stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/src/license/THIRD-PARTY.properties?rev=1450825&r1=1450824&r2=1450825&view=diff
==============================================================================
---
stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/src/license/THIRD-PARTY.properties
(original)
+++
stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/src/license/THIRD-PARTY.properties
Wed Feb 27 16:07:15 2013
@@ -1,31 +1,33 @@
# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
-# - Apache 2
-# - Apache License
-# - Apache Software License, Version 1.1
-# - BSD
-# - BSD-style license
-# - CDDL 1.1
-# - Common Development and Distribution License (CDDL) v1.0
-# - Common Public License Version 1.0
-# - GPL2 w/ CPE
+# - Apache Software License
+# - Apache Software License, Version 2.0
+# - BSD License
+# - BSD-style
+# - Common Development And Distribution License (CDDL), Version 1.0
+# - Common Development And Distribution License (CDDL), Version 1.1
+# - Common Public License, Version 1.0
+# - Eclipse Public License, Version 1.0
+# - GNU General Public License (GPL), Version 2 with classpath exception
+# - GNU Lesser General Public License (LGPL)
+# - GNU Lesser General Public License (LGPL), Version 2.1
# - ICU License
# - MIT License
-# - The Apache Software License, Version 2.0
+# - Public Domain License
+# - Similar to Apache License but with the acknowledgment clause removed
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
-#Wed Feb 15 19:03:22 CET 2012
+#Thu Nov 08 10:06:58 CET 2012
antlr--antlr--2.7.2=Public Domain
asm--asm--3.1=BSD License
commons-beanutils--commons-beanutils--1.7.0=The Apache Software License,
Version 2.0
dom4j--dom4j--1.1=BSD-style
jakarta-regexp--jakarta-regexp--1.4=The Apache Software License, Version 2.0
javax.portlet--portlet-api--2.0=The Apache Software License, Version 2.0
-javax.servlet--servlet-api--2.4=Common Development And Distribution License
(CDDL), Version 1.0
-org.apache.zookeeper--zookeeper--3.3.1=The Apache Software License, Version 2.0
+javax.servlet--servlet-api--2.5=Common Development And Distribution License
(CDDL), Version 1.0
org.codehaus.jettison--jettison--1.3=The Apache Software License, Version 2.0
org.osgi--org.osgi.compendium--4.1.0=The Apache Software License, Version 2.0
org.osgi--org.osgi.core--4.1.0=The Apache Software License, Version 2.0
Modified:
stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/FacetImpl.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/FacetImpl.java?rev=1450825&r1=1450824&r2=1450825&view=diff
==============================================================================
---
stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/FacetImpl.java
(original)
+++
stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/FacetImpl.java
Wed Feb 27 16:07:15 2013
@@ -86,7 +86,7 @@ public class FacetImpl implements Facet
@Override
public boolean equals(Object obj) {
if (obj instanceof Facet) {
- return this.getLabel(null).equals(((Facet) obj).getLabel(null));
+ return this.getLabel(null) == ((Facet) obj).getLabel(null);
} else {
return false;
}
Modified:
stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/FeaturedSearchImpl.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/FeaturedSearchImpl.java?rev=1450825&r1=1450824&r2=1450825&view=diff
==============================================================================
---
stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/FeaturedSearchImpl.java
(original)
+++
stanbol/branches/contenthub-two-layered-structure/contenthub/search/featured/src/main/java/org/apache/stanbol/contenthub/search/featured/FeaturedSearchImpl.java
Wed Feb 27 16:07:15 2013
@@ -43,7 +43,6 @@ import org.apache.stanbol.commons.semant
import org.apache.stanbol.commons.semanticindex.index.IndexManagementException;
import org.apache.stanbol.commons.semanticindex.index.SemanticIndexManager;
import org.apache.stanbol.contenthub.index.solr.SolrSemanticIndex;
-import org.apache.stanbol.contenthub.search.solr.util.SolrQueryUtil;
import org.apache.stanbol.contenthub.servicesapi.index.search.SearchException;
import
org.apache.stanbol.contenthub.servicesapi.index.search.featured.ConstrainedDocumentSet;
import
org.apache.stanbol.contenthub.servicesapi.index.search.featured.Constraint;
@@ -52,6 +51,7 @@ import org.apache.stanbol.contenthub.ser
import
org.apache.stanbol.contenthub.servicesapi.index.search.featured.SearchResult;
import
org.apache.stanbol.contenthub.servicesapi.index.search.related.RelatedKeyword;
import
org.apache.stanbol.contenthub.servicesapi.index.search.related.RelatedKeywordSearchManager;
+import
org.apache.stanbol.contenthub.servicesapi.index.search.solr.SolrQueryUtil;
import org.apache.stanbol.contenthub.servicesapi.index.search.solr.SolrSearch;
import
org.apache.stanbol.contenthub.servicesapi.store.vocabulary.SolrVocabulary.SolrFieldName;
import org.apache.stanbol.enhancer.servicesapi.ContentItem;
@@ -67,7 +67,7 @@ import org.slf4j.LoggerFactory;
@Service
public class FeaturedSearchImpl implements FeaturedSearch {
- private final static Logger log =
LoggerFactory.getLogger(FeaturedSearchImpl.class);
+ private static final Logger log =
LoggerFactory.getLogger(FeaturedSearchImpl.class);
private static Map<String,List<String>> stopWords;
@@ -229,7 +229,8 @@ public class FeaturedSearchImpl implemen
log.error("Failed to get enmancements for the query term: {}",
queryTerm, e);
error = true;
} catch (IOException e) {
- log.error("Failed to get bytes of query term: {}", queryTerm, e);
+ log.error(
+ "Failed to create a ContentItem by using " +
contentItemFactory.getClass().getSimpleName() + "!", e);
error = true;
}
Modified:
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/pom.xml?rev=1450825&r1=1450824&r2=1450825&view=diff
==============================================================================
---
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/pom.xml
(original)
+++
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/pom.xml
Wed Feb 27 16:07:15 2013
@@ -16,9 +16,9 @@
<parent>
<groupId>org.apache.stanbol</groupId>
- <artifactId>org.apache.stanbol.contenthub.parent</artifactId>
- <version>0.10.0-incubating-SNAPSHOT</version>
- <relativePath>../../parent</relativePath>
+ <artifactId>apache-stanbol-contenthub</artifactId>
+ <version>0.11.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
</parent>
<artifactId>org.apache.stanbol.contenthub.search.related</artifactId>
@@ -36,6 +36,22 @@
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Import-Package>
+ org.apache.stanbol.contenthub.servicesapi.index.search.related;
provide:=true; version="[0.10,0.12)",
+ org.apache.stanbol.contenthub.servicesapi.index.search.featured;
provide:=true; version="[0.10,0.12)",
+ *
+ </Import-Package>
+ <Export-Package>
+ </Export-Package>
+ <Private-Package>
+ org.apache.stanbol.contenthub.search.related,
+ org.apache.stanbol.contenthub.search.related.ontologyresource,
+ org.apache.stanbol.contenthub.search.related.referencedsite
+ </Private-Package>
+ </instructions>
+ </configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
@@ -44,20 +60,27 @@
</plugins>
</build>
<dependencies>
+ <!-- Increased the version because of the API changes such as
+ ReferencedSiteManager-> SiteManager -->
<dependency>
<groupId>org.apache.stanbol</groupId>
<artifactId>org.apache.stanbol.entityhub.model.clerezza</artifactId>
- <version>0.11.0-incubating-SNAPSHOT</version>
+ <version>0.11.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.entityhub.core</artifactId>
+ <version>0.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.stanbol</groupId>
<artifactId>org.apache.stanbol.entityhub.servicesapi</artifactId>
- <version>0.11.0-incubating-SNAPSHOT</version>
+ <version>0.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.stanbol</groupId>
<artifactId>org.apache.stanbol.contenthub.servicesapi</artifactId>
- <version>0.10.0-incubating-SNAPSHOT</version>
+ <version>0.11.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
Modified:
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/license/THIRD-PARTY.properties
URL:
http://svn.apache.org/viewvc/stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/license/THIRD-PARTY.properties?rev=1450825&r1=1450824&r2=1450825&view=diff
==============================================================================
---
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/license/THIRD-PARTY.properties
(original)
+++
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/license/THIRD-PARTY.properties
Wed Feb 27 16:07:15 2013
@@ -19,9 +19,8 @@
# Please fill the missing licenses for dependencies :
#
#
-#Tue Apr 17 08:38:23 EEST 2012
-javax.servlet--servlet-api--2.4=Common Development And Distribution License
(CDDL), Version 1.0
-org.apache.zookeeper--zookeeper--3.3.1=The Apache Software License, Version 2.0
+#Thu Nov 08 10:04:31 CET 2012
+javax.servlet--servlet-api--2.5=Common Development And Distribution License
(CDDL), Version 1.0
org.osgi--org.osgi.compendium--4.1.0=The Apache Software License, Version 2.0
org.osgi--org.osgi.core--4.1.0=The Apache Software License, Version 2.0
xerces--xercesImpl--2.7.1=The Apache Software License, Version 2.0
Modified:
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/main/java/org/apache/stanbol/contenthub/search/related/ontologyresource/IndexingHelper.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/main/java/org/apache/stanbol/contenthub/search/related/ontologyresource/IndexingHelper.java?rev=1450825&r1=1450824&r2=1450825&view=diff
==============================================================================
---
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/main/java/org/apache/stanbol/contenthub/search/related/ontologyresource/IndexingHelper.java
(original)
+++
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/main/java/org/apache/stanbol/contenthub/search/related/ontologyresource/IndexingHelper.java
Wed Feb 27 16:07:15 2013
@@ -58,8 +58,7 @@ public class IndexingHelper {
}
// Add CMS objects
- Resource cmsObject =
ResourceFactory.createResource(Constants.CMS_OBJECT
- .getUnicodeString());
+ Resource cmsObject =
ResourceFactory.createResource(Constants.CMS_OBJECT.getUnicodeString());
List<Statement> cmsOBjects = model.listStatements(null, RDF.type,
cmsObject).toList();
for (Statement stmt : cmsOBjects) {
Resource subject = stmt.getSubject();
@@ -78,8 +77,7 @@ public class IndexingHelper {
public static String getCMSObjectName(Resource subject) {
String name = "";
- Property cmsNameProp =
ResourceFactory.createProperty(Constants.CMS_OBJECT_NAME
- .getUnicodeString());
+ Property cmsNameProp =
ResourceFactory.createProperty(Constants.CMS_OBJECT_NAME.getUnicodeString());
if (subject.hasProperty(cmsNameProp)) {
name = subject.getProperty(cmsNameProp).getString();
}
Modified:
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/main/java/org/apache/stanbol/contenthub/search/related/ontologyresource/QueryFactory.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/main/java/org/apache/stanbol/contenthub/search/related/ontologyresource/QueryFactory.java?rev=1450825&r1=1450824&r2=1450825&view=diff
==============================================================================
---
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/main/java/org/apache/stanbol/contenthub/search/related/ontologyresource/QueryFactory.java
(original)
+++
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/main/java/org/apache/stanbol/contenthub/search/related/ontologyresource/QueryFactory.java
Wed Feb 27 16:07:15 2013
@@ -34,7 +34,7 @@ public final class QueryFactory {
private static final String SEARCH = "PREFIX ss: <" + Constants.SEARCH_URI
+ ">";
private static final String CMS = "PREFIX cms:
<http://www.apache.org/stanbol/cms#>";
- public static final Query getClassQuery(String keyword) {
+ public static Query getClassQuery(String keyword) {
StringBuilder sb = new StringBuilder();
sb.append(RDF).append("\n");
@@ -49,7 +49,7 @@ public final class QueryFactory {
return com.hp.hpl.jena.query.QueryFactory.create(sb.toString());
}
- public static final Query getIndividualQuery(String keyword) {
+ public static Query getIndividualQuery(String keyword) {
StringBuilder sb = new StringBuilder();
sb.append(RDF).append("\n");
sb.append(OWL).append("\n");
@@ -64,7 +64,7 @@ public final class QueryFactory {
return com.hp.hpl.jena.query.QueryFactory.create(sb.toString());
}
- public static final Query getCMSObjectQuery(String keyword) {
+ public static Query getCMSObjectQuery(String keyword) {
StringBuilder sb = new StringBuilder();
sb.append(RDF).append("\n");
sb.append(OWL).append("\n");
Modified:
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/main/java/org/apache/stanbol/contenthub/search/related/referencedsite/ReferencedSiteSearch.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/main/java/org/apache/stanbol/contenthub/search/related/referencedsite/ReferencedSiteSearch.java?rev=1450825&r1=1450824&r2=1450825&view=diff
==============================================================================
---
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/main/java/org/apache/stanbol/contenthub/search/related/referencedsite/ReferencedSiteSearch.java
(original)
+++
stanbol/branches/contenthub-two-layered-structure/contenthub/search/related/src/main/java/org/apache/stanbol/contenthub/search/related/referencedsite/ReferencedSiteSearch.java
Wed Feb 27 16:07:15 2013
@@ -65,7 +65,7 @@ public class ReferencedSiteSearch implem
/**
* dbpedia-owl:place ranged properties for related places
*/
- public final static List<String> placeTypedProperties = Arrays
+ public static final List<String> placeTypedProperties = Arrays
.asList(new String[] {DBPEDIA_ONT_NAMESPACE +
DBPEDIA_ONT_NAMESPACE + "country",
DBPEDIA_ONT_NAMESPACE + "largestCity",
DBPEDIA_ONT_NAMESPACE + "city",
DBPEDIA_ONT_NAMESPACE + "state",
DBPEDIA_ONT_NAMESPACE + "capital",
@@ -76,7 +76,7 @@ public class ReferencedSiteSearch implem
/**
* dbpedia-owl:person ranged properties for related persons
*/
- public final static List<String> personTypedProperties = Arrays
+ public static final List<String> personTypedProperties = Arrays
.asList(new String[] {DBPEDIA_ONT_NAMESPACE + "leader",
DBPEDIA_ONT_NAMESPACE + "leaderName",
DBPEDIA_ONT_NAMESPACE + "child",
DBPEDIA_ONT_NAMESPACE + "spouse",
DBPEDIA_ONT_NAMESPACE + "partner",
DBPEDIA_ONT_NAMESPACE + "president"});
@@ -84,7 +84,7 @@ public class ReferencedSiteSearch implem
/**
* dbpedia-owl:organization ranged properties for related organizations
*/
- public final static List<String> organizationTypedProperties = Arrays
+ public static final List<String> organizationTypedProperties = Arrays
.asList(new String[] {DBPEDIA_ONT_NAMESPACE + "leaderParty",
DBPEDIA_ONT_NAMESPACE + "affiliation",
DBPEDIA_ONT_NAMESPACE + "team",
DBPEDIA_ONT_NAMESPACE + "party",
DBPEDIA_ONT_NAMESPACE + "otherParty",
Modified:
stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/pom.xml?rev=1450825&r1=1450824&r2=1450825&view=diff
==============================================================================
---
stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/pom.xml
(original)
+++
stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/pom.xml
Wed Feb 27 16:07:15 2013
@@ -16,9 +16,9 @@
<parent>
<groupId>org.apache.stanbol</groupId>
- <artifactId>org.apache.stanbol.contenthub.parent</artifactId>
- <version>0.10.0-incubating-SNAPSHOT</version>
- <relativePath>../../parent</relativePath>
+ <artifactId>apache-stanbol-contenthub</artifactId>
+ <version>0.11.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
</parent>
<artifactId>org.apache.stanbol.contenthub.search.solr</artifactId>
@@ -33,6 +33,18 @@
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Import-Package>
+ org.apache.stanbol.contenthub.servicesapi.index.search.solr;
provide:=true; version="[0.10,0.12)",
+ *
+ </Import-Package>
+ <Export-Package>
+ org.apache.stanbol.contenthub.search.solr,
+ org.apache.stanbol.contenthub.search.solr.util
+ </Export-Package>
+ </instructions>
+ </configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
@@ -41,20 +53,16 @@
</plugins>
</build>
<dependencies>
+ <!-- Increased version because of the faceted search API additions -->
<dependency>
<groupId>org.apache.stanbol</groupId>
<artifactId>org.apache.stanbol.contenthub.servicesapi</artifactId>
- <version>0.10.0-incubating-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.stanbol</groupId>
- <artifactId>org.apache.stanbol.contenthub.store.solr</artifactId>
- <version>0.10.0-incubating-SNAPSHOT</version>
+ <version>0.11.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.stanbol</groupId>
<artifactId>org.apache.stanbol.contenthub.index</artifactId>
- <version>0.10.0-incubating-SNAPSHOT</version>
+ <version>0.11.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
Modified:
stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/src/license/THIRD-PARTY.properties
URL:
http://svn.apache.org/viewvc/stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/src/license/THIRD-PARTY.properties?rev=1450825&r1=1450824&r2=1450825&view=diff
==============================================================================
---
stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/src/license/THIRD-PARTY.properties
(original)
+++
stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/src/license/THIRD-PARTY.properties
Wed Feb 27 16:07:15 2013
@@ -1,31 +1,33 @@
# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
-# - Apache 2
-# - Apache License
-# - Apache Software License, Version 1.1
-# - BSD
-# - BSD-style license
-# - CDDL 1.1
-# - Common Development and Distribution License (CDDL) v1.0
-# - Common Public License Version 1.0
-# - GPL2 w/ CPE
+# - Apache Software License
+# - Apache Software License, Version 2.0
+# - BSD License
+# - BSD-style
+# - Common Development And Distribution License (CDDL), Version 1.0
+# - Common Development And Distribution License (CDDL), Version 1.1
+# - Common Public License, Version 1.0
+# - Eclipse Public License, Version 1.0
+# - GNU General Public License (GPL), Version 2 with classpath exception
+# - GNU Lesser General Public License (LGPL)
+# - GNU Lesser General Public License (LGPL), Version 2.1
# - ICU License
# - MIT License
-# - The Apache Software License, Version 2.0
+# - Public Domain License
+# - Similar to Apache License but with the acknowledgment clause removed
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
-#Wed Feb 15 19:03:04 CET 2012
+#Thu Nov 08 10:04:25 CET 2012
antlr--antlr--2.7.2=Public Domain
asm--asm--3.1=BSD License
commons-beanutils--commons-beanutils--1.7.0=The Apache Software License,
Version 2.0
dom4j--dom4j--1.1=BSD-style
jakarta-regexp--jakarta-regexp--1.4=The Apache Software License, Version 2.0
javax.portlet--portlet-api--2.0=The Apache Software License, Version 2.0
-javax.servlet--servlet-api--2.4=Common Development And Distribution License
(CDDL), Version 1.0
-org.apache.zookeeper--zookeeper--3.3.1=The Apache Software License, Version 2.0
+javax.servlet--servlet-api--2.5=Common Development And Distribution License
(CDDL), Version 1.0
org.codehaus.jettison--jettison--1.3=The Apache Software License, Version 2.0
org.osgi--org.osgi.compendium--4.1.0=The Apache Software License, Version 2.0
org.osgi--org.osgi.core--4.1.0=The Apache Software License, Version 2.0
Modified:
stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/src/main/java/org/apache/stanbol/contenthub/search/solr/SolrSearchImpl.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/src/main/java/org/apache/stanbol/contenthub/search/solr/SolrSearchImpl.java?rev=1450825&r1=1450824&r2=1450825&view=diff
==============================================================================
---
stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/src/main/java/org/apache/stanbol/contenthub/search/solr/SolrSearchImpl.java
(original)
+++
stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/src/main/java/org/apache/stanbol/contenthub/search/solr/SolrSearchImpl.java
Wed Feb 27 16:07:15 2013
@@ -30,8 +30,8 @@ import org.apache.stanbol.commons.semant
import org.apache.stanbol.commons.semanticindex.index.IndexManagementException;
import org.apache.stanbol.commons.semanticindex.index.SemanticIndexManager;
import org.apache.stanbol.contenthub.index.solr.SolrSemanticIndex;
-import org.apache.stanbol.contenthub.search.solr.util.SolrQueryUtil;
import org.apache.stanbol.contenthub.servicesapi.index.search.SearchException;
+import
org.apache.stanbol.contenthub.servicesapi.index.search.solr.SolrQueryUtil;
import org.apache.stanbol.contenthub.servicesapi.index.search.solr.SolrSearch;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -53,8 +53,7 @@ public class SolrSearchImpl implements S
SolrQuery solrQuery = null;
SolrServer solrServer = null;
try {
- SolrSemanticIndex semanticIndex = (SolrSemanticIndex)
semanticIndexManager
- .getIndex(indexName);
+ SolrSemanticIndex semanticIndex = (SolrSemanticIndex)
semanticIndexManager.getIndex(indexName);
solrServer = semanticIndex.getServer();
solrQuery = SolrQueryUtil.prepareSolrQuery(solrServer, queryTerm);
} catch (SolrServerException e) {
@@ -77,8 +76,7 @@ public class SolrSearchImpl implements S
public QueryResponse search(SolrParams solrQuery, String indexName) throws
SearchException {
SolrServer solrServer = null;
try {
- SolrSemanticIndex semanticIndex = (SolrSemanticIndex)
semanticIndexManager
- .getIndex(indexName);
+ SolrSemanticIndex semanticIndex = (SolrSemanticIndex)
semanticIndexManager.getIndex(indexName);
solrServer = semanticIndex.getServer();
} catch (IndexManagementException e) {
log.error(e.getMessage(), e);
Modified:
stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/src/main/java/org/apache/stanbol/contenthub/search/solr/util/SolrQueryUtil.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/src/main/java/org/apache/stanbol/contenthub/search/solr/util/SolrQueryUtil.java?rev=1450825&r1=1450824&r2=1450825&view=diff
==============================================================================
---
stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/src/main/java/org/apache/stanbol/contenthub/search/solr/util/SolrQueryUtil.java
(original)
+++
stanbol/branches/contenthub-two-layered-structure/contenthub/search/solr/src/main/java/org/apache/stanbol/contenthub/search/solr/util/SolrQueryUtil.java
Wed Feb 27 16:07:15 2013
@@ -43,8 +43,10 @@ import org.slf4j.LoggerFactory;
/**
*
* @author anil.pacaci
- *
+ * @deprecated This class was moved to
+ * {@link
org.apache.stanbol.contenthub.servicesapi.index.search.solr.SolrQueryUtil}
*/
+@Deprecated
public class SolrQueryUtil {
private final static Logger log =
LoggerFactory.getLogger(SolrQueryUtil.class);
@@ -60,6 +62,7 @@ public class SolrQueryUtil {
public final static List<Character> queryDelimiters = Arrays.asList(' ',
',');
+ @Deprecated
private static String removeFacetConstraints(String query) {
int delimiteri = query.indexOf(facetDelimiter);
while (delimiteri > -1) {
@@ -87,6 +90,7 @@ public class SolrQueryUtil {
return query;
}
+ @Deprecated
private static String removeSpecialCharacter(String query, char ch) {
int starti = query.indexOf(ch);
while (starti > -1) {
@@ -99,6 +103,7 @@ public class SolrQueryUtil {
return query;
}
+ @Deprecated
private static String removeSpecialCharacters(String query) {
query = query.replaceAll("[+|\\-&!\\(\\)\\{\\}\\[\\]\\*\\?\\\\]", "");
query = removeSpecialCharacter(query, '^');
@@ -106,6 +111,7 @@ public class SolrQueryUtil {
return query;
}
+ @Deprecated
public static String extractQueryTermFromSolrQuery(SolrParams solrQuery) {
String queryFull = solrQuery instanceof SolrQuery ? ((SolrQuery)
solrQuery).getQuery() : solrQuery
.get(CommonParams.Q);
@@ -125,6 +131,7 @@ public class SolrQueryUtil {
* @param allAvailableFacetNames
* list of facets
*/
+ @Deprecated
public static <T> void setFacetFields(SolrQuery solrQuery, List<T>
allAvailableFacetNames) {
solrQuery.setFields("*", SCORE_FIELD);
solrQuery.setFacet(true);
@@ -162,6 +169,7 @@ public class SolrQueryUtil {
* @throws SolrServerException
* @throws IOException
*/
+ @Deprecated
public static SolrQuery prepareSolrQuery(SolrServer solrServer, String
queryTerm) throws SolrServerException,
IOException {
SolrQuery solrQuery = new SolrQuery();
@@ -177,6 +185,7 @@ public class SolrQueryUtil {
* {@link String} query term to be represented as a {@link
SolrQuery}
* @return {@link SolrQuery} wrapping the given <code>queryTerm</code>
*/
+ @Deprecated
public static SolrQuery prepareSolrQuery(String queryTerm) {
SolrQuery solrQuery = new SolrQuery();
solrQuery.setQuery(queryTerm);
@@ -196,6 +205,7 @@ public class SolrQueryUtil {
* additional constraints to be applied in the {@link
SolrQuery}.
* @return {@link SolrQuery} constructed by using the given parameters
*/
+ @Deprecated
public static SolrQuery prepareSolrQuery(String queryTerm,
List<FacetResult>
allAvailableFacets,
Map<String,List<Object>>
constraints) {
@@ -222,6 +232,7 @@ public class SolrQueryUtil {
return query;
}
+ @Deprecated
private static String getFacetFieldType(String fieldName,
List<FacetResult> allAvailableFacets) {
for (FacetResult fr : allAvailableFacets) {
if (fieldName.equals(fr.getFacetField().getName())) {
@@ -231,6 +242,7 @@ public class SolrQueryUtil {
return "";
}
+ @Deprecated
public static List<String> getAllFacetNames(SolrServer solrServer) throws
SolrServerException,
IOException {
List<String> facetNames = new ArrayList<String>();
@@ -241,6 +253,7 @@ public class SolrQueryUtil {
return facetNames;
}
+ @Deprecated
public static NamedList<Object> getAllFacetFields(SolrServer solrServer)
throws SolrServerException,
IOException {
LukeRequest qr = new LukeRequest();
@@ -266,6 +279,7 @@ public class SolrQueryUtil {
* @param solrQuery
* {@link SolrQuery} to be updated with the given
<code>constraints</code>
*/
+ @Deprecated
public static void addConstraintsToSolrQuery(Set<Constraint> constraints,
SolrQuery solrQuery) {
if (constraints != null) {
for (Constraint constraint : constraints) {