incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tommaso Teofili <tommaso.teof...@gmail.com>
Subject Re: Stanbol components in clerezza, check it out
Date Thu, 20 Dec 2012 08:58:49 GMT
that's cool, thanks Reto :-)

Tommaso


2012/12/20 Reto Bachmann-Gmür <reto@apache.org>

> If you want to play with more popular stanbol components than the facstore,
> copy and paste the following to your shell:
>
> import java.net._
> import org.osgi.framework.Bundle
> def loadBundleList(uriString: String) {
> val url = new URL(uriString)
> val conn = url.openConnection
> import xml._
> val doc = XML.load(conn.getInputStream)
> (for (b <- doc\"startLevel"\"bundle";
> groupId = (b\"groupId").text;
> artifactId = (b\"artifactId").text.replace("\n","").replace(" ","");
> version = (b\"version").text;
> mvnUri = "mvn:"+groupId+"/"+artifactId+"/"+version;
> if (!groupId.startsWith("com.sun.jersey") &&
> !artifactId.contains("base.jersey"))) yield {
> println("start(\""+mvnUri+"\")");
> try {
> bundleContext.installBundle(mvnUri)
> } catch {
> case ex => out.println("Exception installing bundle", ex);
> null.asInstanceOf[Bundle];
> }
> }).withFilter(_ != null).foreach(_.start)
> }
>
> loadBundleList("
>
> https://svn.apache.org/repos/asf/stanbol/trunk/launchers/bundlelists/stanbolcommons/src/main/bundles/list.xml
> ")
> loadBundleList("
>
> https://svn.apache.org/repos/asf/stanbol/trunk/launchers/bundlelists/entityhub/src/main/bundles/list.xml
> ")
> loadBundleList("
>
> https://svn.apache.org/repos/asf/stanbol/trunk/launchers/bundlelists/enhancer/src/main/bundles/list.xml
> ")
>
> With that you should have a resource ast http://localhost:8080/enhancerand
> one at http://localhost:8080/entityhub
>
> Cheers,
> Reto
>
>
> On Wed, Dec 19, 2012 at 6:12 PM, Reto Bachmann-Gmür <reto@apache.org>
> wrote:
>
> > Hello
> >
> > I've just resolved CLEREZZA-722 meaning that stanbol web fragments can
> now
> > be run inside clerezza. The main difficulties was that many STANBOL
> > components do not use the OSGi service infrastructure but communicate to
> > each other via the ServletContext.
> >
> > Give it a try. To launch the Stanbol Factore in clerezza enter (copy and
> > paste) the following to the clerezza console:
> >
> >
> >
> start("mvn:org.apache.stanbol/org.apache.stanbol.commons.web.home/0.10.0-SNAPSHOT")
> > import java.net._
> > val url = new URL("
> >
> https://svn.apache.org/repos/asf/stanbol/trunk/launchers/bundlelists/factstore/src/main/bundles/list.xml
> > ")
> > val conn = url.openConnection
> > import xml._
> > val doc = XML.load(conn.getInputStream)
> > for (b <- doc\"startLevel"\"bundle") {
> > val groupId = (b\"groupId").text;
> > val artifactId = (b\"artifactId").text;
> > val version = (b\"version").text
> > val mvnUri = "mvn:"+groupId+"/"+artifactId+"/"+version;
> > println(mvnUri);
> > try {
> > val bundle = bundleContext.installBundle(mvnUri)
> > bundle.start()
> > } catch {
> > case ex => out.println("Exception installing bundle", ex)
> > }
> >
> >
> > You should now see the factstore on http://localhost:8080/factstore.
> >
> > Cheers,
> > Reto
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message