You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by og...@apache.org on 2011/03/28 20:38:02 UTC
svn commit: r1086331 - in
/incubator/stanbol/branches/http-endpoint-refactoring: ./ commons/web/
commons/web/src/main/java/org/apache/stanbol/commons/web/
commons/web/src/main/java/org/apache/stanbol/commons/web/resource/
enhancer/jersey/ enhancer/jers...
Author: ogrisel
Date: Mon Mar 28 18:38:01 2011
New Revision: 1086331
URL: http://svn.apache.org/viewvc?rev=1086331&view=rev
Log:
STANBOL-120: started to refactor enhancer/jersey to use the new WebFragment incremental contribution system (step 1)
Added:
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/static/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/static/images/
- copied from r1086306, incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/META-INF/static/images/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/static/openlayers-2.9/
- copied from r1086306, incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/META-INF/static/openlayers-2.9/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/static/scripts/
- copied from r1086306, incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/META-INF/static/scripts/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/static/style/
- copied from r1086306, incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/META-INF/static/style/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/templates/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/templates/ajax/
- copied from r1086306, incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/META-INF/templates/ajax/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/templates/imports/
- copied from r1086306, incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/META-INF/templates/imports/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/templates/org/
- copied from r1086306, incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/META-INF/templates/org/
Removed:
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/src/main/java/org/apache/stanbol/commons/web/JettyServer.java
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/META-INF/static/images/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/META-INF/static/openlayers-2.9/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/META-INF/static/scripts/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/META-INF/static/style/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/META-INF/templates/ajax/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/META-INF/templates/imports/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/META-INF/templates/org/
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/test/java/
Modified:
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/pom.xml
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/src/main/java/org/apache/stanbol/commons/web/JerseyEndpointApplication.java
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/src/main/java/org/apache/stanbol/commons/web/resource/NavigationMixin.java
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/pom.xml
incubator/stanbol/branches/http-endpoint-refactoring/parent/pom.xml
incubator/stanbol/branches/http-endpoint-refactoring/pom.xml
Modified: incubator/stanbol/branches/http-endpoint-refactoring/commons/web/pom.xml
URL: http://svn.apache.org/viewvc/incubator/stanbol/branches/http-endpoint-refactoring/commons/web/pom.xml?rev=1086331&r1=1086330&r2=1086331&view=diff
==============================================================================
--- incubator/stanbol/branches/http-endpoint-refactoring/commons/web/pom.xml (original)
+++ incubator/stanbol/branches/http-endpoint-refactoring/commons/web/pom.xml Mon Mar 28 18:38:01 2011
@@ -41,7 +41,7 @@
<configuration>
<instructions>
<Export-Package>
- org.apache.stanbol.commons.web.*
+ org.apache.stanbol.commons.web.*,freemarker.cache.*
</Export-Package>
<Embed-Dependency>*;scope=compile|runtime;inline=false;artifactId=jersey-json|jettison|jackson-core-asl</Embed-Dependency>
<Embed-Dependency>freemarker</Embed-Dependency>
Modified: incubator/stanbol/branches/http-endpoint-refactoring/commons/web/src/main/java/org/apache/stanbol/commons/web/JerseyEndpointApplication.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/branches/http-endpoint-refactoring/commons/web/src/main/java/org/apache/stanbol/commons/web/JerseyEndpointApplication.java?rev=1086331&r1=1086330&r2=1086331&view=diff
==============================================================================
--- incubator/stanbol/branches/http-endpoint-refactoring/commons/web/src/main/java/org/apache/stanbol/commons/web/JerseyEndpointApplication.java (original)
+++ incubator/stanbol/branches/http-endpoint-refactoring/commons/web/src/main/java/org/apache/stanbol/commons/web/JerseyEndpointApplication.java Mon Mar 28 18:38:01 2011
@@ -8,6 +8,7 @@ import java.util.Set;
import javax.ws.rs.core.Application;
import org.apache.stanbol.commons.web.processor.FreemarkerViewProcessor;
+import org.apache.stanbol.commons.web.resource.StanbolRootResource;
import org.apache.stanbol.commons.web.writers.GraphWriter;
import org.apache.stanbol.commons.web.writers.ResultSetWriter;
import org.slf4j.Logger;
@@ -33,7 +34,11 @@ public class JerseyEndpointApplication e
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> classes = new HashSet<Class<?>>();
+ // hardcoded root resource class for now (to be externalize into a stanbol.commons.web.home package
+ // for instance)
+ classes.add(StanbolRootResource.class);
+ // resources contributed buy other bundles
classes.addAll(contributedClasses);
// message body writers, hard-coded for now
@@ -47,7 +52,8 @@ public class JerseyEndpointApplication e
Set<Object> singletons = new HashSet<Object>();
singletons.addAll(contributedSingletons);
- MultiTemplateLoader templateLoader = new MultiTemplateLoader((TemplateLoader[]) templateLoaders.toArray());
+ TemplateLoader[] loadersArray = templateLoaders.toArray(new TemplateLoader[templateLoaders.size()]);
+ MultiTemplateLoader templateLoader = new MultiTemplateLoader(loadersArray);
singletons.add(new FreemarkerViewProcessor(templateLoader));
return singletons;
}
Modified: incubator/stanbol/branches/http-endpoint-refactoring/commons/web/src/main/java/org/apache/stanbol/commons/web/resource/NavigationMixin.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/branches/http-endpoint-refactoring/commons/web/src/main/java/org/apache/stanbol/commons/web/resource/NavigationMixin.java?rev=1086331&r1=1086330&r2=1086331&view=diff
==============================================================================
--- incubator/stanbol/branches/http-endpoint-refactoring/commons/web/src/main/java/org/apache/stanbol/commons/web/resource/NavigationMixin.java (original)
+++ incubator/stanbol/branches/http-endpoint-refactoring/commons/web/src/main/java/org/apache/stanbol/commons/web/resource/NavigationMixin.java Mon Mar 28 18:38:01 2011
@@ -7,6 +7,11 @@ import java.util.List;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.UriInfo;
+/**
+ * Mixin class to provide the controller method for the navigation template.
+ *
+ * TODO: make the list of menu items dynamically contributed by WebFragments from the OSGi runtime.
+ */
public class NavigationMixin {
@Context
@@ -17,10 +22,8 @@ public class NavigationMixin {
}
public List<MenuItem> getMainMenuItems() {
- return Arrays.asList(
- new MenuItem("/engines", "/engines", uriInfo),
- new MenuItem("/store", "/store", uriInfo),
- new MenuItem("/sparql", "/sparql", uriInfo));
+ return Arrays.asList(new MenuItem("/engines", "/engines", uriInfo), new MenuItem("/store", "/store",
+ uriInfo), new MenuItem("/sparql", "/sparql", uriInfo));
}
public static class MenuItem {
@@ -33,9 +36,9 @@ public class NavigationMixin {
protected final String label;
- protected final String link;
+ protected final String link;
- protected final String cssClass;
+ protected final String cssClass;
public String getLabel() {
return label;
Modified: incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/pom.xml
URL: http://svn.apache.org/viewvc/incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/pom.xml?rev=1086331&r1=1086330&r2=1086331&view=diff
==============================================================================
--- incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/pom.xml (original)
+++ incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/pom.xml Mon Mar 28 18:38:01 2011
@@ -44,7 +44,6 @@
org.apache.stanbol.enhancer.jersey.*
</Export-Package>
<Embed-Dependency>*;scope=compile|runtime;inline=false;artifactId=jersey-json|jettison|jackson-core-asl</Embed-Dependency>
- <Embed-Dependency>freemarker</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>
<Import-Package>
!javax.servlet.jsp.*,
@@ -81,7 +80,10 @@
<groupId>org.apache.stanbol</groupId>
<artifactId>org.apache.stanbol.jsonld</artifactId>
</dependency>
-
+ <dependency>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.commons.web</artifactId>
+ </dependency>
<!-- Clerezza dependencies -->
<dependency>
<groupId>org.apache.clerezza</groupId>
Modified: incubator/stanbol/branches/http-endpoint-refactoring/parent/pom.xml
URL: http://svn.apache.org/viewvc/incubator/stanbol/branches/http-endpoint-refactoring/parent/pom.xml?rev=1086331&r1=1086330&r2=1086331&view=diff
==============================================================================
--- incubator/stanbol/branches/http-endpoint-refactoring/parent/pom.xml (original)
+++ incubator/stanbol/branches/http-endpoint-refactoring/parent/pom.xml Mon Mar 28 18:38:01 2011
@@ -237,11 +237,16 @@
<version>${stanbol-version}</version>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.apache.stanbol</groupId>
- <artifactId>org.apache.stanbol.commons.stanboltools.offline</artifactId>
- <version>${stanbol-version}</version>
- </dependency>
+ <dependency>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.commons.stanboltools.offline</artifactId>
+ <version>${stanbol-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.commons.web</artifactId>
+ <version>${stanbol-version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.stanbol</groupId>
<artifactId>org.apache.stanbol.defaultdata</artifactId>
Modified: incubator/stanbol/branches/http-endpoint-refactoring/pom.xml
URL: http://svn.apache.org/viewvc/incubator/stanbol/branches/http-endpoint-refactoring/pom.xml?rev=1086331&r1=1086330&r2=1086331&view=diff
==============================================================================
--- incubator/stanbol/branches/http-endpoint-refactoring/pom.xml (original)
+++ incubator/stanbol/branches/http-endpoint-refactoring/pom.xml Mon Mar 28 18:38:01 2011
@@ -48,6 +48,7 @@
<module>entityhub</module>
<module>enhancer</module>
<module>commons</module>
+ <module>launchers/mini</module>
</modules>
<profiles>