You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by rw...@apache.org on 2013/11/07 13:39:16 UTC

svn commit: r1539617 - in /stanbol/trunk/entityhub/site/linkeddata: ./ src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/

Author: rwesten
Date: Thu Nov  7 12:39:16 2013
New Revision: 1539617

URL: http://svn.apache.org/r1539617
Log:
STANBOL-1127: removed ConfigurationPolicy.REQUIRE annotation from all components provided by this module.

Modified:
    stanbol/trunk/entityhub/site/linkeddata/pom.xml
    stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/CoolUriDereferencer.java
    stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/LarqSearcher.java
    stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/SparqlDereferencer.java
    stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/SparqlSearcher.java
    stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/VirtuosoSearcher.java

Modified: stanbol/trunk/entityhub/site/linkeddata/pom.xml
URL: http://svn.apache.org/viewvc/stanbol/trunk/entityhub/site/linkeddata/pom.xml?rev=1539617&r1=1539616&r2=1539617&view=diff
==============================================================================
--- stanbol/trunk/entityhub/site/linkeddata/pom.xml (original)
+++ stanbol/trunk/entityhub/site/linkeddata/pom.xml Thu Nov  7 12:39:16 2013
@@ -84,25 +84,16 @@
       <groupId>org.apache.stanbol</groupId>
       <artifactId>org.apache.stanbol.entityhub.servicesapi</artifactId>
       <version>1.0.0-SNAPSHOT</version>
-      <scope>provided</scope>
     </dependency>
-     <!-- dependency>
-      <groupId>org.apache.stanbol</groupId>
-      <artifactId>org.apache.stanbol.entityhub.core</artifactId>
-      <version>0.9.0-incubating</version>
-      <scope>provided</scope>
-    </dependency -->
     <dependency>
       <groupId>org.apache.stanbol</groupId>
       <artifactId>org.apache.stanbol.entityhub.model.clerezza</artifactId>
       <version>1.0.0-SNAPSHOT</version>
-      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.stanbol</groupId>
       <artifactId>org.apache.stanbol.entityhub.query.clerezza</artifactId>
       <version>1.0.0-SNAPSHOT</version>
-      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.stanbol</groupId>
@@ -113,17 +104,12 @@
     <dependency>
       <groupId>org.apache.clerezza</groupId>
       <artifactId>rdf.core</artifactId>
-      <scope>provided</scope>
+      <!-- scope>provided</scope -->
     </dependency>
-    <!-- dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <scope>provided</scope>
-    </dependency -->
     <dependency>
       <groupId>javax.ws.rs</groupId>
       <artifactId>javax.ws.rs-api</artifactId>
-      <scope>provided</scope>
+      <!-- scope>provided</scope -->
     </dependency>
     <dependency>
       <groupId>org.codehaus.jettison</groupId>
@@ -132,7 +118,7 @@
     <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
-      <scope>provided</scope>
+      <!-- scope>provided</scope -->
     </dependency>
     <!-- for tests -->
     <dependency>

Modified: stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/CoolUriDereferencer.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/CoolUriDereferencer.java?rev=1539617&r1=1539616&r2=1539617&view=diff
==============================================================================
--- stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/CoolUriDereferencer.java (original)
+++ stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/CoolUriDereferencer.java Thu Nov  7 12:39:16 2013
@@ -41,7 +41,6 @@ import org.slf4j.LoggerFactory;
 @Component(
         name="org.apache.stanbol.entityhub.dereferencer.CoolUriDereferencer",
         factory="org.apache.stanbol.entityhub.dereferencer.CoolUriDereferencerFactory",
-        policy=ConfigurationPolicy.REQUIRE, //the baseUri is required!
         specVersion="1.1"
         )
 public class CoolUriDereferencer extends AbstractEntityDereferencer implements EntityDereferencer{

Modified: stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/LarqSearcher.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/LarqSearcher.java?rev=1539617&r1=1539616&r2=1539617&view=diff
==============================================================================
--- stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/LarqSearcher.java (original)
+++ stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/LarqSearcher.java Thu Nov  7 12:39:16 2013
@@ -34,9 +34,9 @@ import org.apache.stanbol.commons.indexe
 import org.apache.stanbol.entityhub.core.query.QueryResultListImpl;
 import org.apache.stanbol.entityhub.core.site.AbstractEntitySearcher;
 import org.apache.stanbol.entityhub.query.clerezza.RdfQueryResultList;
-import org.apache.stanbol.entityhub.query.clerezza.SparqlFieldQuery;
-import org.apache.stanbol.entityhub.query.clerezza.SparqlFieldQueryFactory;
-import org.apache.stanbol.entityhub.query.clerezza.SparqlQueryUtils.EndpointTypeEnum;
+import org.apache.stanbol.entityhub.query.sparql.SparqlFieldQuery;
+import org.apache.stanbol.entityhub.query.sparql.SparqlFieldQueryFactory;
+import org.apache.stanbol.entityhub.query.sparql.SparqlEndpointTypeEnum;
 import org.apache.stanbol.entityhub.servicesapi.model.Representation;
 import org.apache.stanbol.entityhub.servicesapi.query.FieldQuery;
 import org.apache.stanbol.entityhub.servicesapi.query.QueryResultList;
@@ -47,7 +47,6 @@ import org.slf4j.LoggerFactory;
 @Component(
         name="org.apache.stanbol.entityhub.searcher.LarqSearcher",
         factory="org.apache.stanbol.entityhub.searcher.LarqSearcherFactory",
-        policy=ConfigurationPolicy.REQUIRE, //the queryUri and the SPARQL Endpoint are required
         specVersion="1.1"
         )
 public class LarqSearcher extends AbstractEntitySearcher implements EntitySearcher {
@@ -62,7 +61,7 @@ public class LarqSearcher extends Abstra
     public final QueryResultList<Representation> find(FieldQuery parsedQuery) throws IOException {
         long start = System.currentTimeMillis();
         final SparqlFieldQuery query = SparqlFieldQueryFactory.getSparqlFieldQuery(parsedQuery);
-        query.setEndpointType(EndpointTypeEnum.LARQ);
+        query.setSparqlEndpointType(SparqlEndpointTypeEnum.LARQ);
         String sparqlQuery = query.toSparqlConstruct();
         long initEnd = System.currentTimeMillis();
         log.debug("  > InitTime: "+(initEnd-start));
@@ -90,7 +89,7 @@ public class LarqSearcher extends Abstra
     @Override
     public final QueryResultList<String> findEntities(FieldQuery parsedQuery) throws IOException {
         final SparqlFieldQuery query = SparqlFieldQueryFactory.getSparqlFieldQuery(parsedQuery);
-        query.setEndpointType(EndpointTypeEnum.LARQ);
+        query.setSparqlEndpointType(SparqlEndpointTypeEnum.LARQ);
         String sparqlQuery = query.toSparqlSelect(false);
         InputStream in = sendSparqlRequest(getQueryUri(), sparqlQuery, SparqlSearcher.DEFAULT_SPARQL_RESULT_CONTENT_TYPE);
         //Move to util class!

Modified: stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/SparqlDereferencer.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/SparqlDereferencer.java?rev=1539617&r1=1539616&r2=1539617&view=diff
==============================================================================
--- stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/SparqlDereferencer.java (original)
+++ stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/SparqlDereferencer.java Thu Nov  7 12:39:16 2013
@@ -21,7 +21,6 @@ import java.io.InputStream;
 
 import org.apache.clerezza.rdf.core.MGraph;
 import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
 import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
 import org.apache.felix.scr.annotations.Component;
@@ -44,7 +43,6 @@ import org.slf4j.LoggerFactory;
 @Component(
         name="org.apache.stanbol.entityhub.dereferencer.SparqlDereferencer",
         factory="org.apache.stanbol.entityhub.dereferencer.SparqlDereferencerFactory",
-        policy=ConfigurationPolicy.REQUIRE, //the baseUri and the SPARQL Endpoint are required
         specVersion="1.1"
         )
 @Service(value=EntityDereferencer.class)

Modified: stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/SparqlSearcher.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/SparqlSearcher.java?rev=1539617&r1=1539616&r2=1539617&view=diff
==============================================================================
--- stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/SparqlSearcher.java (original)
+++ stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/SparqlSearcher.java Thu Nov  7 12:39:16 2013
@@ -25,7 +25,6 @@ import java.util.List;
 import org.apache.clerezza.rdf.core.MGraph;
 import org.apache.clerezza.rdf.core.TripleCollection;
 import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
 import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
 import org.apache.commons.io.IOUtils;
@@ -36,9 +35,8 @@ import org.apache.stanbol.commons.indexe
 import org.apache.stanbol.entityhub.core.query.QueryResultListImpl;
 import org.apache.stanbol.entityhub.core.site.AbstractEntitySearcher;
 import org.apache.stanbol.entityhub.query.clerezza.RdfQueryResultList;
-import org.apache.stanbol.entityhub.query.clerezza.SparqlFieldQuery;
-import org.apache.stanbol.entityhub.query.clerezza.SparqlFieldQueryFactory;
-import org.apache.stanbol.entityhub.servicesapi.defaults.NamespaceEnum;
+import org.apache.stanbol.entityhub.query.sparql.SparqlFieldQuery;
+import org.apache.stanbol.entityhub.query.sparql.SparqlFieldQueryFactory;
 import org.apache.stanbol.entityhub.servicesapi.model.Representation;
 import org.apache.stanbol.entityhub.servicesapi.query.FieldQuery;
 import org.apache.stanbol.entityhub.servicesapi.query.QueryResultList;
@@ -52,7 +50,6 @@ import org.slf4j.LoggerFactory;
 @Component(
         name="org.apache.stanbol.entityhub.searcher.SparqlSearcher",
         factory="org.apache.stanbol.entityhub.searcher.SparqlSearcherFactory",
-        policy=ConfigurationPolicy.REQUIRE, //the queryUri and the SPARQL Endpoint are required
         specVersion="1.1"
         )
 public class SparqlSearcher extends AbstractEntitySearcher implements EntitySearcher {

Modified: stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/VirtuosoSearcher.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/VirtuosoSearcher.java?rev=1539617&r1=1539616&r2=1539617&view=diff
==============================================================================
--- stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/VirtuosoSearcher.java (original)
+++ stanbol/trunk/entityhub/site/linkeddata/src/main/java/org/apache/stanbol/entityhub/site/linkeddata/impl/VirtuosoSearcher.java Thu Nov  7 12:39:16 2013
@@ -35,24 +35,18 @@ import org.apache.stanbol.commons.indexe
 import org.apache.stanbol.entityhub.core.query.QueryResultListImpl;
 import org.apache.stanbol.entityhub.core.site.AbstractEntitySearcher;
 import org.apache.stanbol.entityhub.query.clerezza.RdfQueryResultList;
-import org.apache.stanbol.entityhub.query.clerezza.SparqlFieldQuery;
-import org.apache.stanbol.entityhub.query.clerezza.SparqlFieldQueryFactory;
-import org.apache.stanbol.entityhub.query.clerezza.SparqlQueryUtils.EndpointTypeEnum;
+import org.apache.stanbol.entityhub.query.sparql.SparqlFieldQuery;
+import org.apache.stanbol.entityhub.query.sparql.SparqlFieldQueryFactory;
+import org.apache.stanbol.entityhub.query.sparql.SparqlEndpointTypeEnum;
 import org.apache.stanbol.entityhub.servicesapi.model.Representation;
 import org.apache.stanbol.entityhub.servicesapi.query.FieldQuery;
 import org.apache.stanbol.entityhub.servicesapi.query.QueryResultList;
 import org.apache.stanbol.entityhub.servicesapi.site.EntitySearcher;
 import org.slf4j.LoggerFactory;
 
-@Component(name = "org.apache.stanbol.entityhub.searcher.VirtuosoSearcher", factory = "org.apache.stanbol.entityhub.searcher.VirtuosoSearcherFactory", policy = ConfigurationPolicy.REQUIRE, // the
-// queryUri
-// and
-// the
-// SPARQL
-// Endpoint
-// are
-// required
-specVersion = "1.1")
+@Component(name = "org.apache.stanbol.entityhub.searcher.VirtuosoSearcher", 
+    factory = "org.apache.stanbol.entityhub.searcher.VirtuosoSearcherFactory", 
+    specVersion = "1.1")
 public class VirtuosoSearcher extends AbstractEntitySearcher implements EntitySearcher {
     @Reference
     private Parser parser;
@@ -65,7 +59,7 @@ public class VirtuosoSearcher extends Ab
     public final QueryResultList<Representation> find(FieldQuery parsedQuery) throws IOException {
         long start = System.currentTimeMillis();
         final SparqlFieldQuery query = SparqlFieldQueryFactory.getSparqlFieldQuery(parsedQuery);
-        query.setEndpointType(EndpointTypeEnum.Virtuoso);
+        query.setSparqlEndpointType(SparqlEndpointTypeEnum.Virtuoso);
         String sparqlQuery = query.toSparqlConstruct();
         long initEnd = System.currentTimeMillis();
         log.info("  > InitTime: " + (initEnd - start));
@@ -94,7 +88,7 @@ public class VirtuosoSearcher extends Ab
     @Override
     public final QueryResultList<String> findEntities(FieldQuery parsedQuery) throws IOException {
         final SparqlFieldQuery query = SparqlFieldQueryFactory.getSparqlFieldQuery(parsedQuery);
-        query.setEndpointType(EndpointTypeEnum.Virtuoso);
+        query.setSparqlEndpointType(SparqlEndpointTypeEnum.Virtuoso);
         String sparqlQuery = query.toSparqlSelect(false);
         log.trace("Sending Sparql request [{}].", sparqlQuery);
         InputStream in = sendSparqlRequest(getQueryUri(), sparqlQuery,