Author: rwesten
Date: Wed May 20 12:41:56 2015
New Revision: 1680546
URL: http://svn.apache.org/r1680546
Log:
STANBOL-1419: updated dependencies for the 0.12 branch. Other as for trunk this
does NOT update all maven build dependencies. NOTE the comments on the issue
for details.
Added:
stanbol/branches/release-0.12/enhancer/jersey/src/test/resources/
stanbol/branches/release-0.12/enhancer/jersey/src/test/resources/log4j.properties
stanbol/branches/release-0.12/launchers/full-war/src/main/sling/
stanbol/branches/release-0.12/launchers/full-war/src/main/sling/common.properties
Modified:
stanbol/branches/release-0.12/ (props changed)
stanbol/branches/release-0.12/cmsadapter/cmis/pom.xml
stanbol/branches/release-0.12/cmsadapter/core/pom.xml
stanbol/branches/release-0.12/cmsadapter/jcr/pom.xml
stanbol/branches/release-0.12/cmsadapter/jcr/src/main/java/org/apache/stanbol/cmsadapter/jcr/mapping/JCRContenthubFeeder.java
stanbol/branches/release-0.12/cmsadapter/servicesapi/pom.xml
stanbol/branches/release-0.12/cmsadapter/web/pom.xml
stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/CMSAdapterWebFragment.java
stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/BridgeDefinitionsResource.java
stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/NotifyResource.java
stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/ObjectTypesResource.java
stanbol/branches/release-0.12/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/impl/BundleInstaller.java
stanbol/branches/release-0.12/commons/jobs/web/src/main/java/org/apache/stanbol/commons/jobs/web/JobsFragment.java
stanbol/branches/release-0.12/commons/marmotta/kiwi/pom.xml
stanbol/branches/release-0.12/commons/namespaceprefix/stanbolprovider/src/main/java/org/apache/stanbol/commons/namespaceprefix/provider/stanbol/DefaultNamespaceMappingsProvider.java
stanbol/branches/release-0.12/commons/owl/pom.xml
stanbol/branches/release-0.12/commons/owl/src/test/java/org/apache/stanbol/commons/owl/util/TestOWLUtils.java
stanbol/branches/release-0.12/commons/security/felixwebconsole/pom.xml
stanbol/branches/release-0.12/commons/security/usermanagement/pom.xml
stanbol/branches/release-0.12/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/utils/DataFileResourceLoader.java
stanbol/branches/release-0.12/commons/solr/web/pom.xml
stanbol/branches/release-0.12/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/SolrServiceDispatchFilter.java
stanbol/branches/release-0.12/commons/stanboltools/bundledatafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/bundle/impl/DataBundleInstaller.java
stanbol/branches/release-0.12/commons/testing/http/pom.xml
stanbol/branches/release-0.12/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/BundleContextMock.java
stanbol/branches/release-0.12/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/Request.java
stanbol/branches/release-0.12/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/RequestExecutor.java
stanbol/branches/release-0.12/commons/testing/stanbol/pom.xml
stanbol/branches/release-0.12/commons/testing/stanbol/src/main/java/org/apache/stanbol/commons/testing/stanbol/StanbolTestBase.java
stanbol/branches/release-0.12/commons/web/home/src/main/java/org/apache/stanbol/commons/web/home/HomeWebFragment.java
stanbol/branches/release-0.12/commons/web/sparql/src/main/java/org/apache/stanbol/commons/web/sparql/SparqlEndpointWebFragment.java
stanbol/branches/release-0.12/contenthub/search/related/pom.xml
stanbol/branches/release-0.12/contenthub/web/src/main/java/org/apache/stanbol/contenthub/web/fragment/ContenthubWebFragment.java
stanbol/branches/release-0.12/demos/webvie/src/main/java/org/apache/stanbol/commons/web/vie/fragment/EnhancerVieWebFragment.java
stanbol/branches/release-0.12/enhancement-engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/testutils/MockComponentContext.java
stanbol/branches/release-0.12/enhancement-engines/entitylinking/labeltokenizer-lucene/src/test/java/org/apache/stanbol/enhancer/engines/entitylinking/labeltokenizer/lucene/MockComponentContext.java
stanbol/branches/release-0.12/enhancement-engines/entitylinking/labeltokenizer-opennlp/src/test/java/org/apache/stanbol/enhancer/engines/entitylinking/labeltokenizer/opennlp/MockComponentContext.java
stanbol/branches/release-0.12/enhancement-engines/keywordextraction/src/test/java/org/apache/stanbol/enhancer/engines/keywordextraction/impl/MockComponentContext.java
stanbol/branches/release-0.12/enhancement-engines/kuromoji-nlp/src/test/java/org/apache/stanbol/enhancer/engines/kuromoji/impl/MockComponentContext.java
stanbol/branches/release-0.12/enhancement-engines/refactor/pom.xml
stanbol/branches/release-0.12/enhancement-engines/refactor/src/main/java/org/apache/stanbol/enhancer/engines/refactor/dereferencer/DereferencerImpl.java
stanbol/branches/release-0.12/enhancement-engines/textannotationnewmodel/pom.xml
stanbol/branches/release-0.12/enhancement-engines/textannotationnewmodel/src/test/java/org/apache/stanbol/enhancer/engines/textannotationnewmodel/impl/MockComponentContext.java
stanbol/branches/release-0.12/enhancement-engines/tika/src/test/java/org/apache/stanbol/enhancer/engines/tika/MockComponentContext.java
stanbol/branches/release-0.12/enhancement-engines/topic/engine/src/main/java/org/apache/stanbol/enhancer/engine/topic/TopicClassificationEngine.java
stanbol/branches/release-0.12/enhancement-engines/topic/engine/src/main/java/org/apache/stanbol/enhancer/topic/training/SolrTrainingSet.java
stanbol/branches/release-0.12/enhancement-engines/topic/web/src/main/java/org/apache/stanbol/enhancer/web/topic/fragment/TopicClassifierFragment.java
stanbol/branches/release-0.12/enhancement-engines/topic/web/src/main/java/org/apache/stanbol/enhancer/web/topic/resource/TopicModelResource.java
stanbol/branches/release-0.12/enhancer/generic/nlp-json/pom.xml
stanbol/branches/release-0.12/enhancer/generic/nlp/pom.xml
stanbol/branches/release-0.12/enhancer/generic/servicesapi/pom.xml
stanbol/branches/release-0.12/enhancer/jersey/pom.xml
stanbol/branches/release-0.12/enhancer/jersey/src/main/java/org/apache/stanbol/enhancer/jersey/fragment/EnhancerWebFragment.java
stanbol/branches/release-0.12/enhancer/jersey/src/main/java/org/apache/stanbol/enhancer/jersey/reader/ContentItemReader.java
stanbol/branches/release-0.12/enhancer/jersey/src/main/java/org/apache/stanbol/enhancer/jersey/writers/ContentItemWriter.java
stanbol/branches/release-0.12/enhancer/jersey/src/test/java/org/apache/stanbol/enhancer/jersey/ContentItemReaderWriterTest.java
stanbol/branches/release-0.12/enhancer/jobmanager/event/pom.xml
stanbol/branches/release-0.12/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/fragment/EntityhubWebFragment.java
stanbol/branches/release-0.12/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/parsers/RepresentationReader.java
stanbol/branches/release-0.12/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/EnhancementPropertiesTest.java
stanbol/branches/release-0.12/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/MultiThreadedTestBase.java
stanbol/branches/release-0.12/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/MultipartRequestTest.java
stanbol/branches/release-0.12/integration-tests/src/test/java/org/apache/stanbol/entityhub/it/EntityhubTest.java
stanbol/branches/release-0.12/integration-tests/src/test/java/org/apache/stanbol/entityhub/it/ldpath/DbpediaLDPathTest.java
stanbol/branches/release-0.12/integration-tests/src/test/java/org/apache/stanbol/it/DefaultConfigTest.java
stanbol/branches/release-0.12/integration-tests/src/test/java/org/apache/stanbol/it/OsgiConsoleTest.java
stanbol/branches/release-0.12/integration-tests/src/test/resources/apache-project-doap-files.zip
stanbol/branches/release-0.12/launchers/bundlelists/marmotta/kiwi/src/main/bundles/list.xml
stanbol/branches/release-0.12/launchers/bundlelists/osgiframework/src/main/bundles/list.xml
stanbol/branches/release-0.12/launchers/bundlelists/stanbolcommons/src/main/bundles/list.xml
stanbol/branches/release-0.12/launchers/bundlelists/zzshell/src/main/bundles/list.xml
stanbol/branches/release-0.12/launchers/full-war/pom.xml
stanbol/branches/release-0.12/launchers/full-war/src/main/bundles/list.xml
stanbol/branches/release-0.12/launchers/full-war/src/main/webapp/WEB-INF/web.xml
stanbol/branches/release-0.12/launchers/full/pom.xml
stanbol/branches/release-0.12/launchers/full/src/main/bundles/list.xml
stanbol/branches/release-0.12/launchers/stable/pom.xml
stanbol/branches/release-0.12/ontologymanager/multiplexer/clerezza/src/test/java/org/apache/stanbol/ontologymanager/multiplexer/clerezza/MockOsgiContext.java
stanbol/branches/release-0.12/ontologymanager/registry/src/test/java/org/apache/stanbol/ontologymanager/registry/MockOsgiContext.java
stanbol/branches/release-0.12/ontologymanager/registry/src/test/java/org/apache/stanbol/ontologymanager/registry/TestOntologyRegistry.java
stanbol/branches/release-0.12/ontologymanager/registry/src/test/java/org/apache/stanbol/ontologymanager/registry/TestRegistryManager.java
stanbol/branches/release-0.12/ontologymanager/sources/clerezza/src/test/java/org/apache/stanbol/ontologymanager/sources/clerezza/MockOsgiContext.java
stanbol/branches/release-0.12/parent/pom.xml
stanbol/branches/release-0.12/pom.xml
stanbol/branches/release-0.12/reasoners/jena/pom.xml
stanbol/branches/release-0.12/reasoners/web/pom.xml
stanbol/branches/release-0.12/rules/adapters/abstract/src/main/java/org/apache/stanbol/rules/adapters/impl/RuleAdaptersFactoryImpl.java
stanbol/branches/release-0.12/rules/adapters/abstract/src/main/java/org/apache/stanbol/rules/adapters/impl/RuleAdaptersManagerImpl.java
stanbol/branches/release-0.12/rules/adapters/clerezza/src/main/java/org/apache/stanbol/rules/adapters/clerezza/ClerezzaAdapter.java
stanbol/branches/release-0.12/rules/adapters/jena/pom.xml
stanbol/branches/release-0.12/rules/adapters/jena/src/main/java/org/apache/stanbol/rules/adapters/impl/RuleAdaptersFactoryImpl.java
stanbol/branches/release-0.12/rules/adapters/jena/src/main/java/org/apache/stanbol/rules/adapters/impl/RuleAdaptersManagerImpl.java
stanbol/branches/release-0.12/rules/adapters/jena/src/main/java/org/apache/stanbol/rules/adapters/jena/JenaAdapter.java
stanbol/branches/release-0.12/rules/adapters/sparql/src/main/java/org/apache/stanbol/rules/adapters/sparql/SPARQLAdapter.java
stanbol/branches/release-0.12/rules/adapters/swrl/src/main/java/org/apache/stanbol/rules/adapters/swrl/SWRLAdapter.java
stanbol/branches/release-0.12/rules/base/pom.xml
stanbol/branches/release-0.12/rules/manager/pom.xml
stanbol/branches/release-0.12/rules/manager/src/main/java/org/apache/stanbol/rules/manager/arqextention/CreateURI.java
stanbol/branches/release-0.12/rules/refactor/pom.xml
stanbol/branches/release-0.12/rules/refactor/src/main/java/org/apache/stanbol/rules/refactor/impl/RefactorerImpl.java
stanbol/branches/release-0.12/rules/web/pom.xml
Propchange: stanbol/branches/release-0.12/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed May 20 12:41:56 2015
@@ -1,2 +1,2 @@
/stanbol/branches/stanbol-solr4:1455112-1458685
-/stanbol/trunk:1543372-1543373,1543405,1546706,1547070,1547313,1547718,1548212,1548552,1550654,1551133,1551879,1551886,1556839,1557037,1557995,1559644-1559645,1564229,1633587,1634576
+/stanbol/trunk:1543372-1543373,1543405,1546706,1547070,1547313,1547718,1548212,1548552,1550654,1551133,1551879,1551886,1556839,1557037,1557995,1559644-1559645,1564229,1633587,1634576,1638109
Modified: stanbol/branches/release-0.12/cmsadapter/cmis/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/cmsadapter/cmis/pom.xml?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
--- stanbol/branches/release-0.12/cmsadapter/cmis/pom.xml (original)
+++ stanbol/branches/release-0.12/cmsadapter/cmis/pom.xml Wed May 20 12:41:56
2015
@@ -75,10 +75,10 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
- <dependency>
+ <!-- dependency>
<groupId>com.hp.hpl.jena</groupId>
<artifactId>jena</artifactId>
- </dependency>
+ </dependency -->
<dependency>
<groupId>org.apache.chemistry.opencmis</groupId>
<artifactId>chemistry-opencmis-client-api</artifactId>
Modified: stanbol/branches/release-0.12/cmsadapter/core/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/cmsadapter/core/pom.xml?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
--- stanbol/branches/release-0.12/cmsadapter/core/pom.xml (original)
+++ stanbol/branches/release-0.12/cmsadapter/core/pom.xml Wed May 20 12:41:56
2015
@@ -74,8 +74,8 @@
<artifactId>org.apache.felix.scr.annotations</artifactId>
</dependency>
<dependency>
- <groupId>com.hp.hpl.jena</groupId>
- <artifactId>jena</artifactId>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-core</artifactId>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
Modified: stanbol/branches/release-0.12/cmsadapter/jcr/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/cmsadapter/jcr/pom.xml?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
--- stanbol/branches/release-0.12/cmsadapter/jcr/pom.xml (original)
+++ stanbol/branches/release-0.12/cmsadapter/jcr/pom.xml Wed May 20 12:41:56
2015
@@ -85,8 +85,8 @@
</dependency>
<dependency>
- <groupId>com.hp.hpl.jena</groupId>
- <artifactId>jena</artifactId>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-core</artifactId>
</dependency>
<dependency>
Modified:
stanbol/branches/release-0.12/cmsadapter/jcr/src/main/java/org/apache/stanbol/cmsadapter/jcr/mapping/JCRContenthubFeeder.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/cmsadapter/jcr/src/main/java/org/apache/stanbol/cmsadapter/jcr/mapping/JCRContenthubFeeder.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/cmsadapter/jcr/src/main/java/org/apache/stanbol/cmsadapter/jcr/mapping/JCRContenthubFeeder.java
(original)
+++
stanbol/branches/release-0.12/cmsadapter/jcr/src/main/java/org/apache/stanbol/cmsadapter/jcr/mapping/JCRContenthubFeeder.java
Wed May 20 12:41:56 2015
@@ -80,7 +80,7 @@ import org.slf4j.LoggerFactory;
* @author suat
*
*/
-@Component(metatype = true)
+@Component
@Service(value = ContenthubFeeder.class)
public class JCRContenthubFeeder implements ContenthubFeeder {
private static final String JCR_NT_FILE = "nt:file";
Modified: stanbol/branches/release-0.12/cmsadapter/servicesapi/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/cmsadapter/servicesapi/pom.xml?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
--- stanbol/branches/release-0.12/cmsadapter/servicesapi/pom.xml (original)
+++ stanbol/branches/release-0.12/cmsadapter/servicesapi/pom.xml Wed May 20
12:41:56 2015
@@ -50,12 +50,17 @@
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
- <groupId>com.hp.hpl.jena</groupId>
- <artifactId>jena</artifactId>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.clerezza</groupId>
<artifactId>rdf.core</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.scr.annotations</artifactId>
+ </dependency>
+
</dependencies>
</project>
Modified: stanbol/branches/release-0.12/cmsadapter/web/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/cmsadapter/web/pom.xml?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
--- stanbol/branches/release-0.12/cmsadapter/web/pom.xml (original)
+++ stanbol/branches/release-0.12/cmsadapter/web/pom.xml Wed May 20 12:41:56
2015
@@ -104,8 +104,8 @@
</dependency>
<dependency>
- <groupId>com.hp.hpl.jena</groupId>
- <artifactId>jena</artifactId>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-core</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
Modified:
stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/CMSAdapterWebFragment.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/CMSAdapterWebFragment.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/CMSAdapterWebFragment.java
(original)
+++
stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/CMSAdapterWebFragment.java
Wed May 20 12:41:56 2015
@@ -40,7 +40,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-@Component(immediate = true, metatype = true)
+@Component(immediate = true)
@Service
public class CMSAdapterWebFragment implements WebFragment {
Modified:
stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/BridgeDefinitionsResource.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/BridgeDefinitionsResource.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/BridgeDefinitionsResource.java
(original)
+++
stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/BridgeDefinitionsResource.java
Wed May 20 12:41:56 2015
@@ -61,7 +61,7 @@ public class BridgeDefinitionsResource e
public BridgeDefinitionsResource(@Context ServletContext context) {
try {
BundleContext bundleContext = (BundleContext)
context.getAttribute(BundleContext.class.getName());
- ServiceReference serviceReference =
bundleContext.getServiceReferences(null,
+ ServiceReference serviceReference =
bundleContext.getServiceReferences((String)null,
MAPPING_ENGINE_COMPONENT_FACTORY_FILTER)[0];
ComponentFactory componentFactory = (ComponentFactory)
bundleContext.getService(serviceReference);
@SuppressWarnings("rawtypes")
Modified:
stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/NotifyResource.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/NotifyResource.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/NotifyResource.java
(original)
+++
stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/NotifyResource.java
Wed May 20 12:41:56 2015
@@ -72,7 +72,7 @@ public class NotifyResource extends Base
public NotifyResource(@Context ServletContext context) {
try {
BundleContext bundleContext = (BundleContext)
context.getAttribute(BundleContext.class.getName());
- ServiceReference serviceReference =
bundleContext.getServiceReferences(null,
+ ServiceReference serviceReference =
bundleContext.getServiceReferences((String)null,
"(component.factory=org.apache.stanbol.cmsadapter.servicesapi.mapping.MappingEngineFactory)")[0];
ComponentFactory componentFactory = (ComponentFactory)
bundleContext.getService(serviceReference);
ComponentInstance componentInstance = componentFactory
Modified:
stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/ObjectTypesResource.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/ObjectTypesResource.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/ObjectTypesResource.java
(original)
+++
stanbol/branches/release-0.12/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/ObjectTypesResource.java
Wed May 20 12:41:56 2015
@@ -69,7 +69,7 @@ public class ObjectTypesResource extends
public ObjectTypesResource(@Context ServletContext context) {
try {
BundleContext bundleContext = (BundleContext)
context.getAttribute(BundleContext.class.getName());
- ServiceReference serviceReference =
bundleContext.getServiceReferences(null,
+ ServiceReference serviceReference =
bundleContext.getServiceReferences((String)null,
"(component.factory=org.apache.stanbol.cmsadapter.servicesapi.mapping.MappingEngineFactory)")[0];
ComponentFactory componentFactory = (ComponentFactory)
bundleContext.getService(serviceReference);
ComponentInstance componentInstance = componentFactory
Modified:
stanbol/branches/release-0.12/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/impl/BundleInstaller.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/impl/BundleInstaller.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/impl/BundleInstaller.java
(original)
+++
stanbol/branches/release-0.12/commons/installer/bundleprovider/src/main/java/org/apache/stanbol/commons/installer/provider/bundle/impl/BundleInstaller.java
Wed May 20 12:41:56 2015
@@ -201,13 +201,13 @@ public class BundleInstaller implements
}
}
log.debug(" ... registering");
- Dictionary<String, Object> headers = (Dictionary<String, Object>)
bundle.getHeaders();
+ Dictionary<String, String> headers = (Dictionary<String, String>)
bundle.getHeaders();
// log.info("With Headers:");
// for(Enumeration<String> keys =
headers.keys();keys.hasMoreElements();){
// String key = keys.nextElement();
// log.info(" > "+key+"="+headers.get(key));
// }
- String path = (String) headers.get(BUNDLE_INSTALLER_HEADER);
+ String path = headers.get(BUNDLE_INSTALLER_HEADER);
activated.put(bundle, path);
if (path != null) {
log.info(" ... process configuration within path {} for bundle
{}",path,bundle.getSymbolicName());
Modified:
stanbol/branches/release-0.12/commons/jobs/web/src/main/java/org/apache/stanbol/commons/jobs/web/JobsFragment.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/jobs/web/src/main/java/org/apache/stanbol/commons/jobs/web/JobsFragment.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/commons/jobs/web/src/main/java/org/apache/stanbol/commons/jobs/web/JobsFragment.java
(original)
+++
stanbol/branches/release-0.12/commons/jobs/web/src/main/java/org/apache/stanbol/commons/jobs/web/JobsFragment.java
Wed May 20 12:41:56 2015
@@ -34,7 +34,7 @@ import org.osgi.framework.BundleContext;
import org.osgi.service.component.ComponentContext;
-@Component(immediate = true, metatype = true)
+@Component(immediate = true)
@Service(WebFragment.class)
public class JobsFragment implements WebFragment{
Modified: stanbol/branches/release-0.12/commons/marmotta/kiwi/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/marmotta/kiwi/pom.xml?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
--- stanbol/branches/release-0.12/commons/marmotta/kiwi/pom.xml (original)
+++ stanbol/branches/release-0.12/commons/marmotta/kiwi/pom.xml Wed May 20
12:41:56 2015
@@ -60,6 +60,7 @@
marmotta-util-tripletable,
kiwi-caching-infinispan, kiwi-caching-hazelcast,
kiwi-caching-ehcache,
+ marmotta-model-vocabs,
tomcat-jdbc, tomcat-juli, postgresql
</Embed-Dependency>
<!-- DynamicImport-Package is needed for
@@ -125,7 +126,10 @@
<groupId>org.apache.marmotta</groupId>
<artifactId>kiwi-caching-hazelcast</artifactId>
</dependency>
-
+ <dependency>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>marmotta-model-vocabs</artifactId>
+ </dependency>
<dependency>
<groupId>org.openrdf.sesame</groupId>
Modified:
stanbol/branches/release-0.12/commons/namespaceprefix/stanbolprovider/src/main/java/org/apache/stanbol/commons/namespaceprefix/provider/stanbol/DefaultNamespaceMappingsProvider.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/namespaceprefix/stanbolprovider/src/main/java/org/apache/stanbol/commons/namespaceprefix/provider/stanbol/DefaultNamespaceMappingsProvider.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/commons/namespaceprefix/stanbolprovider/src/main/java/org/apache/stanbol/commons/namespaceprefix/provider/stanbol/DefaultNamespaceMappingsProvider.java
(original)
+++
stanbol/branches/release-0.12/commons/namespaceprefix/stanbolprovider/src/main/java/org/apache/stanbol/commons/namespaceprefix/provider/stanbol/DefaultNamespaceMappingsProvider.java
Wed May 20 12:41:56 2015
@@ -28,7 +28,7 @@ import org.osgi.framework.Constants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-@Component(immediate=true, metatype=true)
+@Component(immediate=true)
@Service
@Property(name=Constants.SERVICE_RANKING,value="1000000")
public class DefaultNamespaceMappingsProvider extends
NamespacePrefixProviderImpl implements NamespacePrefixProvider {
Modified: stanbol/branches/release-0.12/commons/owl/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/owl/pom.xml?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
--- stanbol/branches/release-0.12/commons/owl/pom.xml (original)
+++ stanbol/branches/release-0.12/commons/owl/pom.xml Wed May 20 12:41:56 2015
@@ -132,12 +132,12 @@
<!-- OWL deps -->
<dependency>
- <groupId>com.hp.hpl.jena</groupId>
- <artifactId>jena</artifactId>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-core</artifactId>
</dependency>
<dependency>
- <groupId>com.hp.hpl.jena</groupId>
- <artifactId>arq</artifactId>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-arq</artifactId>
</dependency>
<dependency>
Modified:
stanbol/branches/release-0.12/commons/owl/src/test/java/org/apache/stanbol/commons/owl/util/TestOWLUtils.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/owl/src/test/java/org/apache/stanbol/commons/owl/util/TestOWLUtils.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/commons/owl/src/test/java/org/apache/stanbol/commons/owl/util/TestOWLUtils.java
(original)
+++
stanbol/branches/release-0.12/commons/owl/src/test/java/org/apache/stanbol/commons/owl/util/TestOWLUtils.java
Wed May 20 12:41:56 2015
@@ -52,7 +52,7 @@ public class TestOWLUtils {
* I need a new Parser because if I use getInsance() I keep getting an
annoying exception on a
* RdfJsonParsing Provider that I don't need.
*/
- private static Parser parser = new Parser();
+ private static Parser parser = Parser.getInstance();
@BeforeClass
public static void setupTests() throws Exception {
Modified: stanbol/branches/release-0.12/commons/security/felixwebconsole/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/security/felixwebconsole/pom.xml?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
--- stanbol/branches/release-0.12/commons/security/felixwebconsole/pom.xml
(original)
+++ stanbol/branches/release-0.12/commons/security/felixwebconsole/pom.xml Wed
May 20 12:41:56 2015
@@ -94,8 +94,6 @@
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.webconsole</artifactId>
- <version>4.0.0</version>
- <type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
Modified: stanbol/branches/release-0.12/commons/security/usermanagement/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/security/usermanagement/pom.xml?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
--- stanbol/branches/release-0.12/commons/security/usermanagement/pom.xml
(original)
+++ stanbol/branches/release-0.12/commons/security/usermanagement/pom.xml Wed
May 20 12:41:56 2015
@@ -134,7 +134,6 @@
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.webconsole</artifactId>
- <version>3.1.8</version>
</dependency>
<dependency>
<groupId>org.apache.clerezza</groupId>
Modified:
stanbol/branches/release-0.12/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/utils/DataFileResourceLoader.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/utils/DataFileResourceLoader.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/utils/DataFileResourceLoader.java
(original)
+++
stanbol/branches/release-0.12/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/utils/DataFileResourceLoader.java
Wed May 20 12:41:56 2015
@@ -41,7 +41,7 @@ import org.apache.stanbol.commons.stanbo
* @author Rupert Westenthaler
*
*/
-@Component(immediate=true,policy=ConfigurationPolicy.OPTIONAL,metatype=true)
+@Component(immediate=true,policy=ConfigurationPolicy.OPTIONAL)
@Service(value={ResourceLoader.class, DataFileResourceLoader.class})
public class DataFileResourceLoader implements ResourceLoader {
Modified: stanbol/branches/release-0.12/commons/solr/web/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/solr/web/pom.xml?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
--- stanbol/branches/release-0.12/commons/solr/web/pom.xml (original)
+++ stanbol/branches/release-0.12/commons/solr/web/pom.xml Wed May 20 12:41:56
2015
@@ -128,7 +128,6 @@
<!-- required for ExtHttpService that supports Servlet Filters within
Felix -->
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.http.api</artifactId>
- <version>2.2.0</version>
<scope>provided</scope>
</dependency>
Modified:
stanbol/branches/release-0.12/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/SolrServiceDispatchFilter.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/SolrServiceDispatchFilter.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/SolrServiceDispatchFilter.java
(original)
+++
stanbol/branches/release-0.12/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/SolrServiceDispatchFilter.java
Wed May 20 12:41:56 2015
@@ -123,7 +123,7 @@ public class SolrServiceDispatchFilter e
try {
references = filter == null ?
context.getServiceReferences(CoreContainer.class.getName(), null) :
- context.getServiceReferences(null, filter.toString());
+ context.getServiceReferences((String)null,
filter.toString());
} catch (InvalidSyntaxException e) {
references = null;
//can not be happen, because we created the filter already in the
Modified:
stanbol/branches/release-0.12/commons/stanboltools/bundledatafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/bundle/impl/DataBundleInstaller.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/stanboltools/bundledatafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/bundle/impl/DataBundleInstaller.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/commons/stanboltools/bundledatafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/bundle/impl/DataBundleInstaller.java
(original)
+++
stanbol/branches/release-0.12/commons/stanboltools/bundledatafileprovider/src/main/java/org/apache/stanbol/commons/stanboltools/datafileprovider/bundle/impl/DataBundleInstaller.java
Wed May 20 12:41:56 2015
@@ -116,7 +116,7 @@ public class DataBundleInstaller impleme
activated.put(bundle, null);
}
log.debug("Register Bundle {} with
DataBundleInstaller",bundle.getSymbolicName());
- Dictionary<String, Object> headers = (Dictionary<String, Object>)
bundle.getHeaders();
+ Dictionary<String, String> headers = (Dictionary<String, String>)
bundle.getHeaders();
// log.info("With Headers:");
// for(Enumeration<String> keys =
headers.keys();keys.hasMoreElements();){
// String key = keys.nextElement();
Modified: stanbol/branches/release-0.12/commons/testing/http/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/testing/http/pom.xml?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
--- stanbol/branches/release-0.12/commons/testing/http/pom.xml (original)
+++ stanbol/branches/release-0.12/commons/testing/http/pom.xml Wed May 20
12:41:56 2015
@@ -47,13 +47,11 @@
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpcore-osgi</artifactId>
- <scope>compile</scope>
+ <artifactId>httpcore</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient-osgi</artifactId>
- <scope>compile</scope>
+ <artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
@@ -63,17 +61,19 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
- <scope>compile</scope>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>
Modified:
stanbol/branches/release-0.12/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/BundleContextMock.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/BundleContextMock.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/BundleContextMock.java
(original)
+++
stanbol/branches/release-0.12/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/BundleContextMock.java
Wed May 20 12:41:56 2015
@@ -18,6 +18,7 @@ package org.apache.stanbol.commons.testi
import java.io.File;
import java.io.InputStream;
+import java.util.Collection;
import java.util.Dictionary;
import java.util.HashMap;
import java.util.Map;
@@ -48,62 +49,62 @@ public class BundleContextMock implement
private Map<ServiceReference, Object> serviceMap = new
HashMap<ServiceReference,Object>();
public void addBundleListener(BundleListener listener) {
- // TODO Auto-generated method stub
+
}
public void addFrameworkListener(FrameworkListener listener) {
- // TODO Auto-generated method stub
+
}
public void addServiceListener(ServiceListener listener) {
- // TODO Auto-generated method stub
+
}
public void addServiceListener(ServiceListener listener, String filter)
throws InvalidSyntaxException {
- // TODO Auto-generated method stub
+
}
public Filter createFilter(String filter) throws InvalidSyntaxException {
- // TODO Auto-generated method stub
+
return null;
}
public ServiceReference[] getAllServiceReferences(String clazz, String
filter) throws InvalidSyntaxException {
- // TODO Auto-generated method stub
+
return null;
}
public Bundle getBundle() {
- // TODO Auto-generated method stub
+
return null;
}
public Bundle getBundle(long id) {
- // TODO Auto-generated method stub
+
return null;
}
public Bundle[] getBundles() {
- // TODO Auto-generated method stub
+
return null;
}
public File getDataFile(String filename) {
- // TODO Auto-generated method stub
+
return null;
}
public String getProperty(String key) {
- // TODO Auto-generated method stub
+
return null;
}
- public Object getService(ServiceReference reference) {
- return this.serviceMap.get(reference);
+ public <S> S getService(ServiceReference<S> reference) {
+ return (S)this.serviceMap.get(reference);
}
/**
@@ -116,32 +117,26 @@ public class BundleContextMock implement
ServiceReference dummy = new ServiceReference() {
public boolean isAssignableTo(Bundle bundle, String className) {
- // TODO Auto-generated method stub
return false;
}
public Bundle[] getUsingBundles() {
- // TODO Auto-generated method stub
return null;
}
public String[] getPropertyKeys() {
- // TODO Auto-generated method stub
return null;
}
public Object getProperty(String key) {
- // TODO Auto-generated method stub
return null;
}
public Bundle getBundle() {
- // TODO Auto-generated method stub
return null;
}
public int compareTo(Object reference) {
- // TODO Auto-generated method stub
return 0;
}
};
@@ -149,53 +144,68 @@ public class BundleContextMock implement
this.serviceMap.put(dummy, instance);
}
- public ServiceReference getServiceReference(String clazz) {
- return this.serviceReferenceMap.get(clazz);
- }
-
public ServiceReference[] getServiceReferences(String clazz, String
filter) throws InvalidSyntaxException {
- // TODO Auto-generated method stub
return null;
}
public Bundle installBundle(String location) throws BundleException {
- // TODO Auto-generated method stub
return null;
}
public Bundle installBundle(String location, InputStream input) throws
BundleException {
- // TODO Auto-generated method stub
return null;
}
- public ServiceRegistration registerService(String[] clazzes, Object
service, Dictionary properties) {
- // TODO Auto-generated method stub
- return null;
+ public void removeBundleListener(BundleListener listener) {
}
- public ServiceRegistration registerService(String clazz, Object service,
Dictionary properties) {
- // TODO Auto-generated method stub
- return null;
+ public void removeFrameworkListener(FrameworkListener listener) {
}
- public void removeBundleListener(BundleListener listener) {
- // TODO Auto-generated method stub
+ public void removeServiceListener(ServiceListener listener) {
+ }
+ @Override
+ public ServiceRegistration<?> registerService(String[] clazzes, Object
service,
+ Dictionary<String,?> properties) {
+ return null;
}
- public void removeFrameworkListener(FrameworkListener listener) {
- // TODO Auto-generated method stub
+ @Override
+ public ServiceRegistration<?> registerService(String clazz, Object service,
+ Dictionary<String,?> properties) {
+ return null;
+ }
+ @Override
+ public <S> ServiceRegistration<S> registerService(Class<S> clazz, S
service,
+ Dictionary<String,?> properties) {
+ return null;
}
- public void removeServiceListener(ServiceListener listener) {
- // TODO Auto-generated method stub
+ @Override
+ public <S> ServiceReference<S> getServiceReference(Class<S> clazz) {
+ return (ServiceReference<S>) getServiceReference(clazz.getName());
+ }
+ @Override
+ public ServiceReference<?> getServiceReference(String clazz) {
+ return this.serviceReferenceMap.get(clazz);
+ }
+ @Override
+ public <S> Collection<ServiceReference<S>> getServiceReferences(Class<S>
clazz, String filter)
+ throws InvalidSyntaxException {
+ return null;
}
- public boolean ungetService(ServiceReference reference) {
- // TODO Auto-generated method stub
+ public boolean ungetService(ServiceReference<?> reference) {
return false;
}
+ @Override
+ public Bundle getBundle(String location) {
+ return null;
+ }
+
+
}
Modified:
stanbol/branches/release-0.12/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/Request.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/Request.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/Request.java
(original)
+++
stanbol/branches/release-0.12/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/Request.java
Wed May 20 12:41:56 2015
@@ -21,7 +21,7 @@ import java.net.URLEncoder;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
-import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.entity.StringEntity;
/**
@@ -30,16 +30,17 @@ import org.apache.http.entity.StringEnti
*/
public class Request {
- private final HttpUriRequest request;
- private String username;
- private String password;
+ private final HttpRequestBase request;
+//configure on unit test level
+// private String username;
+// private String password;
private boolean redirects = true;
- Request(HttpUriRequest r) {
+ Request(HttpRequestBase r) {
request = r;
}
- public HttpUriRequest getRequest() {
+ public HttpRequestBase getRequest() {
return request;
}
@@ -48,12 +49,6 @@ public class Request {
return this;
}
- public Request withCredentials(String username, String password) {
- this.username = username;
- this.password = password;
- return this;
- }
-
public Request withRedirects(boolean followRedirectsAutomatically) {
redirects = followRedirectsAutomatically;
return this;
@@ -111,13 +106,13 @@ public class Request {
return this;
}
- public String getUsername() {
- return username;
- }
-
- public String getPassword() {
- return password;
- }
+// public String getUsername() {
+// return username;
+// }
+
+// public String getPassword() {
+// return password;
+// }
public boolean getRedirects() {
return redirects;
Modified:
stanbol/branches/release-0.12/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/RequestExecutor.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/RequestExecutor.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/RequestExecutor.java
(original)
+++
stanbol/branches/release-0.12/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/RequestExecutor.java
Wed May 20 12:41:56 2015
@@ -18,47 +18,34 @@ package org.apache.stanbol.commons.testi
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringReader;
import java.nio.charset.Charset;
-import java.nio.charset.CharsetDecoder;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.util.regex.Pattern;
-import org.apache.commons.io.IOUtils;
import org.apache.commons.io.LineIterator;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
-import org.apache.http.HttpException;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpRequestInterceptor;
import org.apache.http.HttpResponse;
import org.apache.http.ParseException;
-import org.apache.http.auth.AuthScope;
-import org.apache.http.auth.AuthState;
-import org.apache.http.auth.Credentials;
-import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.ClientProtocolException;
-import org.apache.http.client.CredentialsProvider;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.client.params.ClientPNames;
-import org.apache.http.client.protocol.ClientContext;
import org.apache.http.entity.ContentType;
-import org.apache.http.impl.auth.BasicScheme;
-import org.apache.http.impl.client.DefaultHttpClient;
-import org.apache.http.protocol.ExecutionContext;
+import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.protocol.HTTP;
-import org.apache.http.protocol.HttpContext;
import org.apache.http.util.EntityUtils;
-import org.junit.Assert;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Executes a Request and provides convenience methods
@@ -66,8 +53,10 @@ import org.junit.Assert;
*/
public class RequestExecutor {
- private final DefaultHttpClient httpClient;
- private HttpUriRequest request;
+ private final Logger log = LoggerFactory.getLogger(getClass());
+
+ private final CloseableHttpClient httpClient;
+ private HttpRequestBase request;
private HttpResponse response;
private HttpEntity entity;
private String contentString;
@@ -75,34 +64,37 @@ public class RequestExecutor {
private ContentType contentType;
private Charset charset;
- /**
- * HttpRequestInterceptor for preemptive authentication, based on
httpclient
- * 4.0 example
- */
- private static class PreemptiveAuthInterceptor implements
HttpRequestInterceptor {
-
- public void process(HttpRequest request, HttpContext context) throws
HttpException, IOException {
+// /**
+// * HttpRequestInterceptor for preemptive authentication, based on
httpclient
+// * 4.0 example
+// */
+// private static class PreemptiveAuthInterceptor implements
HttpRequestInterceptor {
+//
+// public void process(HttpRequest request, HttpContext context) throws
HttpException, IOException {
+//
+// AuthState authState = (AuthState)
context.getAttribute(HttpClientContext.TARGET_AUTH_STATE);
+// CredentialsProvider credsProvider = (CredentialsProvider)
context.getAttribute(HttpClientContext.CREDS_PROVIDER);
+// HttpHost targetHost = (HttpHost)
context.getAttribute(HttpClientContext.HTTP_TARGET_HOST);
+//
+// // If not auth scheme has been initialized yet
+// if (authState.getAuthScheme() == null) {
+// AuthScope authScope = new
AuthScope(targetHost.getHostName(), targetHost.getPort());
+//
+// // Obtain credentials matching the target host
+// Credentials creds = credsProvider.getCredentials(authScope);
+//
+// // If found, generate BasicScheme preemptively
+// if (creds != null) {
+// authState.update(new BasicScheme(), creds);
+// }
+// }
+// }
+// }
- AuthState authState = (AuthState)
context.getAttribute(ClientContext.TARGET_AUTH_STATE);
- CredentialsProvider credsProvider = (CredentialsProvider)
context.getAttribute(ClientContext.CREDS_PROVIDER);
- HttpHost targetHost = (HttpHost)
context.getAttribute(ExecutionContext.HTTP_TARGET_HOST);
-
- // If not auth scheme has been initialized yet
- if (authState.getAuthScheme() == null) {
- AuthScope authScope = new AuthScope(targetHost.getHostName(),
targetHost.getPort());
-
- // Obtain credentials matching the target host
- Credentials creds = credsProvider.getCredentials(authScope);
-
- // If found, generate BasicScheme preemptively
- if (creds != null) {
- authState.update(new BasicScheme(), creds);
- }
- }
- }
+ public RequestExecutor(CloseableHttpClient client) {
+ httpClient = client;
}
-
- public RequestExecutor(DefaultHttpClient client) {
+ public RequestExecutor(CloseableHttpClient client, String username, String
password) {
httpClient = client;
}
@@ -124,21 +116,12 @@ public class RequestExecutor {
clear();
request = r.getRequest();
- // Optionally setup for basic authentication
- if (r.getUsername() != null) {
- httpClient.getCredentialsProvider().setCredentials(AuthScope.ANY,
- new UsernamePasswordCredentials(r.getUsername(),
r.getPassword()));
-
- // And add request interceptor to have preemptive authentication
- httpClient.addRequestInterceptor(new PreemptiveAuthInterceptor(),
0);
- } else {
-
//httpClient.getCredentialsProvider().setCredentials(AuthScope.ANY, null);
-
httpClient.removeRequestInterceptorByClass(PreemptiveAuthInterceptor.class);
- }
-
- // Setup redirects
-
httpClient.getParams().setBooleanParameter(ClientPNames.HANDLE_REDIRECTS,
r.getRedirects());
-
+ RequestConfig rc = RequestConfig.custom()
+ //.setConnectionRequestTimeout(TODO)
+ //.setConnectTimeout(TODO)
+ .setRedirectsEnabled(r.getRedirects())
+ .setRelativeRedirectsAllowed(true).build();
+ request.setConfig(rc);
// Execute request
response = httpClient.execute(request);
entity = response.getEntity();
@@ -332,4 +315,13 @@ public class RequestExecutor {
public final Charset getCharset() {
return charset;
}
+
+ public void close() {
+ clear();
+ try {
+ httpClient.close();
+ } catch (IOException e) {
+ log.error("Error while closing Http Client", e);
+ }
+ }
}
Modified: stanbol/branches/release-0.12/commons/testing/stanbol/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/testing/stanbol/pom.xml?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
--- stanbol/branches/release-0.12/commons/testing/stanbol/pom.xml (original)
+++ stanbol/branches/release-0.12/commons/testing/stanbol/pom.xml Wed May 20
12:41:56 2015
@@ -48,14 +48,12 @@
<dependency>
<groupId>org.apache.stanbol</groupId>
<artifactId>org.apache.stanbol.commons.testing.jarexec</artifactId>
- <version>0.12.0</version>
- <scope>compile</scope>
+ <version>0.12.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.stanbol</groupId>
<artifactId>org.apache.stanbol.commons.testing.http</artifactId>
- <version>0.12.0</version>
- <scope>compile</scope>
+ <version>0.12.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
@@ -65,13 +63,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <scope>compile</scope>
</dependency>
- <!-- dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <scope>compile</scope>
- </dependency -->
</dependencies>
</project>
Modified:
stanbol/branches/release-0.12/commons/testing/stanbol/src/main/java/org/apache/stanbol/commons/testing/stanbol/StanbolTestBase.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/testing/stanbol/src/main/java/org/apache/stanbol/commons/testing/stanbol/StanbolTestBase.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/commons/testing/stanbol/src/main/java/org/apache/stanbol/commons/testing/stanbol/StanbolTestBase.java
(original)
+++
stanbol/branches/release-0.12/commons/testing/stanbol/src/main/java/org/apache/stanbol/commons/testing/stanbol/StanbolTestBase.java
Wed May 20 12:41:56 2015
@@ -21,14 +21,21 @@ import java.util.List;
import java.util.TreeSet;
import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
+import org.apache.http.HttpHost;
+import org.apache.http.auth.AuthScope;
+import org.apache.http.auth.UsernamePasswordCredentials;
+import org.apache.http.client.CredentialsProvider;
+import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.conn.HttpHostConnectException;
-import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.impl.client.BasicCredentialsProvider;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.apache.stanbol.commons.testing.http.RequestBuilder;
import org.apache.stanbol.commons.testing.http.RequestExecutor;
import org.apache.stanbol.commons.testing.jarexec.JarExecutor;
+import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.slf4j.Logger;
@@ -52,9 +59,18 @@ public class StanbolTestBase {
protected boolean serverReady = false;
protected RequestBuilder builder;
- protected DefaultHttpClient httpClient = new DefaultHttpClient();
- protected RequestExecutor executor = new RequestExecutor(httpClient);
-
+ protected CloseableHttpClient httpClient = null;
+ protected RequestExecutor executor;
+
+ /**
+ * Overwrite to enable authentication for requests
+ * @return the <code>username:password</code> or <code>null</code> to
deactivate
+ * authentication (default)
+ */
+ protected String getCredentials(){
+ return null;
+ }
+
@BeforeClass
public static synchronized void startRunnableJar() throws Exception {
if (serverBaseUrl != null) {
@@ -87,7 +103,19 @@ public class StanbolTestBase {
public void waitForServerReady() throws Exception {
// initialize instance request builder and HTTP client
builder = new RequestBuilder(serverBaseUrl);
- httpClient = new DefaultHttpClient();
+ //TODO:user name and pwd
+ String credentials = getCredentials();
+ if(credentials != null && !credentials.isEmpty()){
+ CredentialsProvider credsProvider = new BasicCredentialsProvider();
+ credsProvider.setCredentials(
+ new AuthScope(HttpHost.create(serverBaseUrl)),
+ new UsernamePasswordCredentials(credentials));
+ httpClient = HttpClients.custom()
+ .setDefaultCredentialsProvider(credsProvider)
+ .build();
+ } else {
+ httpClient = HttpClients.createDefault();
+ }
executor = new RequestExecutor(httpClient);
if (serverReady) {
@@ -137,9 +165,10 @@ public class StanbolTestBase {
get.setHeader(s[i], s[i+1]);
}
}
+ CloseableHttpResponse response = null;
HttpEntity entity = null;
try {
- HttpResponse response = httpClient.execute(get);
+ response = httpClient.execute(get);
entity = response.getEntity();
final int status =
response.getStatusLine().getStatusCode();
if (status != 200) {
@@ -163,8 +192,9 @@ public class StanbolTestBase {
log.info("Got HttpHostConnectException at " + url + " -
will retry");
continue readyLoop;
} finally {
- if (entity != null) {
- entity.consumeContent();
+ EntityUtils.consumeQuietly(entity);
+ if(response != null){
+ response.close();
}
}
}
@@ -176,5 +206,10 @@ public class StanbolTestBase {
throw new Exception("Server not ready after " + timeoutSec + "
seconds");
}
}
+
+ @After
+ public void closeExecutor(){
+ executor.close();
+ }
}
Modified:
stanbol/branches/release-0.12/commons/web/home/src/main/java/org/apache/stanbol/commons/web/home/HomeWebFragment.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/web/home/src/main/java/org/apache/stanbol/commons/web/home/HomeWebFragment.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/commons/web/home/src/main/java/org/apache/stanbol/commons/web/home/HomeWebFragment.java
(original)
+++
stanbol/branches/release-0.12/commons/web/home/src/main/java/org/apache/stanbol/commons/web/home/HomeWebFragment.java
Wed May 20 12:41:56 2015
@@ -40,7 +40,7 @@ import freemarker.cache.TemplateLoader;
* Statically define the list of available resources and providers to be
contributed to the the Stanbol JAX-RS
* Endpoint.
*/
-@Component(immediate = true, metatype = true)
+@Component(immediate = true)
@Service
public class HomeWebFragment implements WebFragment {
Modified:
stanbol/branches/release-0.12/commons/web/sparql/src/main/java/org/apache/stanbol/commons/web/sparql/SparqlEndpointWebFragment.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/web/sparql/src/main/java/org/apache/stanbol/commons/web/sparql/SparqlEndpointWebFragment.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/commons/web/sparql/src/main/java/org/apache/stanbol/commons/web/sparql/SparqlEndpointWebFragment.java
(original)
+++
stanbol/branches/release-0.12/commons/web/sparql/src/main/java/org/apache/stanbol/commons/web/sparql/SparqlEndpointWebFragment.java
Wed May 20 12:41:56 2015
@@ -39,7 +39,7 @@ import org.osgi.service.component.Compon
* Statically define the list of available resources and providers to be
contributed to the the Stanbol JAX-RS
* Endpoint.
*/
-@Component(immediate = true, metatype = true)
+@Component(immediate = true)
@Service
@References({})
public class SparqlEndpointWebFragment implements WebFragment {
Modified: stanbol/branches/release-0.12/contenthub/search/related/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/contenthub/search/related/pom.xml?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
--- stanbol/branches/release-0.12/contenthub/search/related/pom.xml (original)
+++ stanbol/branches/release-0.12/contenthub/search/related/pom.xml Wed May 20
12:41:56 2015
@@ -35,13 +35,25 @@
<extensions>true</extensions>
<configuration>
<instructions>
+ <!-- NOTE: This needs to come with on old version of Jena to
support LARQ -->
<Import-Package>
org.apache.stanbol.contenthub.servicesapi.search.related;
provide:=true; version="[0.10,0.13)",
org.apache.stanbol.contenthub.servicesapi.search.featured;
provide:=true; version="[0.10,0.13)",
+ !com.hp.hpl.jena.*,
+ !org.apache.xml.resolver.*,!sun.*,
+ !com.sun.msv.*,
+ !com.sun.jdmk.*,
+ !javax.jms.*,
+ !org.relaxng.*,
+ !com.ibm.uvm.tools,
+ !javax.jmdns,
+ !org.apache.lucene,
+ !org.apache.solr,
*
</Import-Package>
<Export-Package>
</Export-Package>
+ <Embed-Dependency>jena, arq, xercesImpl,
lucene-core</Embed-Dependency>
<Private-Package>
org.apache.stanbol.contenthub.search.related,
org.apache.stanbol.contenthub.search.related.ontologyresource,
@@ -96,13 +108,70 @@
</dependency>
<!-- Jena dependencies -->
+ <!-- NOTE: THis can not use Apache Jena because it requires LARQ -->
<dependency>
<groupId>com.hp.hpl.jena</groupId>
<artifactId>jena</artifactId>
+ <version>2.6.3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xmlParserAPIs</artifactId>
+ <groupId>xerces</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xercesImpl</artifactId>
+ <groupId>xerces</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>com.hp.hpl.jena</groupId>
<artifactId>arq</artifactId>
+ <version>2.8.5</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xmlParserAPIs</artifactId>
+ <groupId>xerces</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xercesImpl</artifactId>
+ <groupId>xerces</groupId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.sun.jmx</groupId>
+ <artifactId>jmxri</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.jms</groupId>
+ <artifactId>jms</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.sun.jdmk</groupId>
+ <artifactId>jmxtools</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.9.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-core</artifactId>
+ <version>2.9.4</version>
</dependency>
</dependencies>
</project>
Modified:
stanbol/branches/release-0.12/contenthub/web/src/main/java/org/apache/stanbol/contenthub/web/fragment/ContenthubWebFragment.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/contenthub/web/src/main/java/org/apache/stanbol/contenthub/web/fragment/ContenthubWebFragment.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/contenthub/web/src/main/java/org/apache/stanbol/contenthub/web/fragment/ContenthubWebFragment.java
(original)
+++
stanbol/branches/release-0.12/contenthub/web/src/main/java/org/apache/stanbol/contenthub/web/fragment/ContenthubWebFragment.java
Wed May 20 12:41:56 2015
@@ -44,7 +44,7 @@ import org.osgi.service.component.Compon
* Statically define the list of available resources and providers to be
* contributed to the the Stanbol JAX-RS Endpoint.
*/
-@Component(immediate = true, metatype = true)
+@Component(immediate = true)
@Service
public class ContenthubWebFragment implements WebFragment {
Modified:
stanbol/branches/release-0.12/demos/webvie/src/main/java/org/apache/stanbol/commons/web/vie/fragment/EnhancerVieWebFragment.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/demos/webvie/src/main/java/org/apache/stanbol/commons/web/vie/fragment/EnhancerVieWebFragment.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/demos/webvie/src/main/java/org/apache/stanbol/commons/web/vie/fragment/EnhancerVieWebFragment.java
(original)
+++
stanbol/branches/release-0.12/demos/webvie/src/main/java/org/apache/stanbol/commons/web/vie/fragment/EnhancerVieWebFragment.java
Wed May 20 12:41:56 2015
@@ -40,7 +40,7 @@ import freemarker.cache.TemplateLoader;
* Statically define the list of available resources and providers to be
contributed to the the Stanbol JAX-RS
* Endpoint.
*/
-@Component(immediate = true, metatype = true)
+@Component(immediate = true)
@Service
public class EnhancerVieWebFragment implements WebFragment {
Modified:
stanbol/branches/release-0.12/enhancement-engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/testutils/MockComponentContext.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/enhancement-engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/testutils/MockComponentContext.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/enhancement-engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/testutils/MockComponentContext.java
(original)
+++
stanbol/branches/release-0.12/enhancement-engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/testutils/MockComponentContext.java
Wed May 20 12:41:56 2015
@@ -18,6 +18,7 @@ package org.apache.stanbol.enhancer.engi
import java.io.File;
import java.io.InputStream;
+import java.util.Collection;
import java.util.Dictionary;
import java.util.Hashtable;
@@ -157,49 +158,73 @@ public class MockComponentContext implem
}
@Override
- public ServiceRegistration registerService(String[] clazzes, Object
service, Dictionary properties) {
+ public ServiceReference[] getServiceReferences(String clazz, String
filter) throws InvalidSyntaxException {
throw new UnsupportedOperationException("Mock implementation");
}
@Override
- public ServiceRegistration registerService(String clazz, Object
service, Dictionary properties) {
+ public ServiceReference[] getAllServiceReferences(String clazz, String
filter) throws InvalidSyntaxException {
throw new UnsupportedOperationException("Mock implementation");
}
@Override
- public ServiceReference[] getServiceReferences(String clazz, String
filter) throws InvalidSyntaxException {
+ public ServiceReference getServiceReference(String clazz) {
throw new UnsupportedOperationException("Mock implementation");
}
@Override
- public ServiceReference[] getAllServiceReferences(String clazz, String
filter) throws InvalidSyntaxException {
+ public File getDataFile(String filename) {
throw new UnsupportedOperationException("Mock implementation");
}
@Override
- public ServiceReference getServiceReference(String clazz) {
+ public Filter createFilter(String filter) throws
InvalidSyntaxException {
throw new UnsupportedOperationException("Mock implementation");
}
@Override
- public Object getService(ServiceReference reference) {
+ public ServiceRegistration<?> registerService(String[] clazzes, Object
service,
+ Dictionary<String,?> properties) {
throw new UnsupportedOperationException("Mock implementation");
}
@Override
- public boolean ungetService(ServiceReference reference) {
+ public ServiceRegistration<?> registerService(String clazz, Object
service,
+ Dictionary<String,?> properties) {
throw new UnsupportedOperationException("Mock implementation");
- }
+ }
@Override
- public File getDataFile(String filename) {
+ public <S> ServiceRegistration<S> registerService(Class<S> clazz, S
service,
+ Dictionary<String,?> properties) {
throw new UnsupportedOperationException("Mock implementation");
}
@Override
- public Filter createFilter(String filter) throws
InvalidSyntaxException {
+ public <S> ServiceReference<S> getServiceReference(Class<S> clazz) {
+ throw new UnsupportedOperationException("Mock implementation");
+ }
+
+ @Override
+ public <S> Collection<ServiceReference<S>>
getServiceReferences(Class<S> clazz, String filter)
+ throws InvalidSyntaxException {
throw new UnsupportedOperationException("Mock implementation");
}
+
+ @Override
+ public <S> S getService(ServiceReference<S> reference) {
+ throw new UnsupportedOperationException("Mock implementation");
+ }
+
+ @Override
+ public boolean ungetService(ServiceReference<?> reference) {
+ throw new UnsupportedOperationException("Mock implementation");
+ }
+
+ @Override
+ public Bundle getBundle(String location) {
+ throw new UnsupportedOperationException("Mock implementation");
+ }
}
}
Modified:
stanbol/branches/release-0.12/enhancement-engines/entitylinking/labeltokenizer-lucene/src/test/java/org/apache/stanbol/enhancer/engines/entitylinking/labeltokenizer/lucene/MockComponentContext.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/enhancement-engines/entitylinking/labeltokenizer-lucene/src/test/java/org/apache/stanbol/enhancer/engines/entitylinking/labeltokenizer/lucene/MockComponentContext.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/enhancement-engines/entitylinking/labeltokenizer-lucene/src/test/java/org/apache/stanbol/enhancer/engines/entitylinking/labeltokenizer/lucene/MockComponentContext.java
(original)
+++
stanbol/branches/release-0.12/enhancement-engines/entitylinking/labeltokenizer-lucene/src/test/java/org/apache/stanbol/enhancer/engines/entitylinking/labeltokenizer/lucene/MockComponentContext.java
Wed May 20 12:41:56 2015
@@ -18,6 +18,7 @@ package org.apache.stanbol.enhancer.engi
import java.io.File;
import java.io.InputStream;
+import java.util.Collection;
import java.util.Dictionary;
import java.util.Hashtable;
@@ -56,11 +57,6 @@ public class MockComponentContext implem
return new BundleContext() {
@Override
- public boolean ungetService(ServiceReference reference) {
- return false;
- }
-
- @Override
public void removeServiceListener(ServiceListener listener) {
}
@@ -72,17 +68,6 @@ public class MockComponentContext implem
public void removeBundleListener(BundleListener listener) {
}
- @Override
- public ServiceRegistration registerService(String clazz,
- Object service, Dictionary properties) {
- return null;
- }
-
- @Override
- public ServiceRegistration registerService(String[] clazzes,
- Object service, Dictionary properties) {
- return null;
- }
@Override
public Bundle installBundle(String location, InputStream input)
@@ -107,11 +92,6 @@ public class MockComponentContext implem
}
@Override
- public Object getService(ServiceReference reference) {
- return null;
- }
-
- @Override
public String getProperty(String key) {
return null;
}
@@ -165,6 +145,50 @@ public class MockComponentContext implem
@Override
public void addBundleListener(BundleListener listener) {
}
+
+ @Override
+ public ServiceRegistration<?> registerService(String[] clazzes,
Object service,
+ Dictionary<String,?> properties) {
+ return null;
+ }
+
+ @Override
+ public ServiceRegistration<?> registerService(String clazz, Object
service,
+ Dictionary<String,?> properties) {
+ return null;
+ }
+
+ @Override
+ public <S> ServiceRegistration<S> registerService(Class<S> clazz,
S service,
+ Dictionary<String,?> properties) {
+ return null;
+ }
+
+ @Override
+ public <S> ServiceReference<S> getServiceReference(Class<S> clazz)
{
+ return null;
+ }
+
+ @Override
+ public <S> Collection<ServiceReference<S>>
getServiceReferences(Class<S> clazz, String filter)
+ throws InvalidSyntaxException {
+ return null;
+ }
+
+ @Override
+ public <S> S getService(ServiceReference<S> reference) {
+ return null;
+ }
+
+ @Override
+ public boolean ungetService(ServiceReference<?> reference) {
+ return false;
+ }
+
+ @Override
+ public Bundle getBundle(String location) {
+ return null;
+ }
};
}
Modified:
stanbol/branches/release-0.12/enhancement-engines/entitylinking/labeltokenizer-opennlp/src/test/java/org/apache/stanbol/enhancer/engines/entitylinking/labeltokenizer/opennlp/MockComponentContext.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/enhancement-engines/entitylinking/labeltokenizer-opennlp/src/test/java/org/apache/stanbol/enhancer/engines/entitylinking/labeltokenizer/opennlp/MockComponentContext.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/enhancement-engines/entitylinking/labeltokenizer-opennlp/src/test/java/org/apache/stanbol/enhancer/engines/entitylinking/labeltokenizer/opennlp/MockComponentContext.java
(original)
+++
stanbol/branches/release-0.12/enhancement-engines/entitylinking/labeltokenizer-opennlp/src/test/java/org/apache/stanbol/enhancer/engines/entitylinking/labeltokenizer/opennlp/MockComponentContext.java
Wed May 20 12:41:56 2015
@@ -18,6 +18,7 @@ package org.apache.stanbol.enhancer.engi
import java.io.File;
import java.io.InputStream;
+import java.util.Collection;
import java.util.Dictionary;
import java.util.Hashtable;
@@ -56,11 +57,6 @@ public class MockComponentContext implem
return new BundleContext() {
@Override
- public boolean ungetService(ServiceReference reference) {
- return false;
- }
-
- @Override
public void removeServiceListener(ServiceListener listener) {
}
@@ -73,18 +69,6 @@ public class MockComponentContext implem
}
@Override
- public ServiceRegistration registerService(String clazz,
- Object service, Dictionary properties) {
- return null;
- }
-
- @Override
- public ServiceRegistration registerService(String[] clazzes,
- Object service, Dictionary properties) {
- return null;
- }
-
- @Override
public Bundle installBundle(String location, InputStream input)
throws BundleException {
return null;
@@ -107,11 +91,6 @@ public class MockComponentContext implem
}
@Override
- public Object getService(ServiceReference reference) {
- return null;
- }
-
- @Override
public String getProperty(String key) {
return null;
}
@@ -165,6 +144,50 @@ public class MockComponentContext implem
@Override
public void addBundleListener(BundleListener listener) {
}
+
+ @Override
+ public ServiceRegistration<?> registerService(String[] clazzes,
Object service,
+ Dictionary<String,?> properties) {
+ return null;
+ }
+
+ @Override
+ public ServiceRegistration<?> registerService(String clazz, Object
service,
+ Dictionary<String,?> properties) {
+ return null;
+ }
+
+ @Override
+ public <S> ServiceRegistration<S> registerService(Class<S> clazz,
S service,
+ Dictionary<String,?> properties) {
+ return null;
+ }
+
+ @Override
+ public <S> ServiceReference<S> getServiceReference(Class<S> clazz)
{
+ return null;
+ }
+
+ @Override
+ public <S> Collection<ServiceReference<S>>
getServiceReferences(Class<S> clazz, String filter)
+ throws InvalidSyntaxException {
+ return null;
+ }
+
+ @Override
+ public <S> S getService(ServiceReference<S> reference) {
+ return null;
+ }
+
+ @Override
+ public boolean ungetService(ServiceReference<?> reference) {
+ return false;
+ }
+
+ @Override
+ public Bundle getBundle(String location) {
+ return null;
+ }
};
}
Modified:
stanbol/branches/release-0.12/enhancement-engines/keywordextraction/src/test/java/org/apache/stanbol/enhancer/engines/keywordextraction/impl/MockComponentContext.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/release-0.12/enhancement-engines/keywordextraction/src/test/java/org/apache/stanbol/enhancer/engines/keywordextraction/impl/MockComponentContext.java?rev=1680546&r1=1680545&r2=1680546&view=diff
==============================================================================
---
stanbol/branches/release-0.12/enhancement-engines/keywordextraction/src/test/java/org/apache/stanbol/enhancer/engines/keywordextraction/impl/MockComponentContext.java
(original)
+++
stanbol/branches/release-0.12/enhancement-engines/keywordextraction/src/test/java/org/apache/stanbol/enhancer/engines/keywordextraction/impl/MockComponentContext.java
Wed May 20 12:41:56 2015
@@ -18,6 +18,7 @@ package org.apache.stanbol.enhancer.engi
import java.io.File;
import java.io.InputStream;
+import java.util.Collection;
import java.util.Dictionary;
import java.util.Hashtable;
@@ -56,11 +57,6 @@ public class MockComponentContext implem
return new BundleContext() {
@Override
- public boolean ungetService(ServiceReference reference) {
- return false;
- }
-
- @Override
public void removeServiceListener(ServiceListener listener) {
}
@@ -73,18 +69,6 @@ public class MockComponentContext implem
}
@Override
- public ServiceRegistration registerService(String clazz,
- Object service, Dictionary properties) {
- return null;
- }
-
- @Override
- public ServiceRegistration registerService(String[] clazzes,
- Object service, Dictionary properties) {
- return null;
- }
-
- @Override
public Bundle installBundle(String location, InputStream input)
throws BundleException {
return null;
@@ -107,11 +91,6 @@ public class MockComponentContext implem
}
@Override
- public Object getService(ServiceReference reference) {
- return null;
- }
-
- @Override
public String getProperty(String key) {
return null;
}
@@ -165,6 +144,50 @@ public class MockComponentContext implem
@Override
public void addBundleListener(BundleListener listener) {
}
+
+ @Override
+ public ServiceRegistration<?> registerService(String[] clazzes,
Object service,
+ Dictionary<String,?> properties) {
+ return null;
+ }
+
+ @Override
+ public ServiceRegistration<?> registerService(String clazz, Object
service,
+ Dictionary<String,?> properties) {
+ return null;
+ }
+
+ @Override
+ public <S> ServiceRegistration<S> registerService(Class<S> clazz,
S service,
+ Dictionary<String,?> properties) {
+ return null;
+ }
+
+ @Override
+ public <S> ServiceReference<S> getServiceReference(Class<S> clazz)
{
+ return null;
+ }
+
+ @Override
+ public <S> Collection<ServiceReference<S>>
getServiceReferences(Class<S> clazz, String filter)
+ throws InvalidSyntaxException {
+ return null;
+ }
+
+ @Override
+ public <S> S getService(ServiceReference<S> reference) {
+ return null;
+ }
+
+ @Override
+ public boolean ungetService(ServiceReference<?> reference) {
+ return false;
+ }
+
+ @Override
+ public Bundle getBundle(String location) {
+ return null;
+ }
};
}