You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Reto Bachmann-Gmür (JIRA)" <ji...@apache.org> on 2011/08/19 13:12:27 UTC

[jira] [Updated] (STANBOL-312) Adding clerezza shell allowing to play with services interactively

     [ https://issues.apache.org/jira/browse/STANBOL-312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Reto Bachmann-Gmür updated STANBOL-312:
---------------------------------------

    Attachment: STANBOL-312-launchers.patch

This patch adds console and ssh shell. Becase of CLEREZZA-623 some platform bundles required for authentication had to be added. As Stanbol has no own authenticator yet this is not an issue at the moment. For the jvm not complaining about not enough PermGen space I had to launch it with the -XX:MaxPermSize=128m  option

> Adding clerezza shell allowing to play with services interactively
> ------------------------------------------------------------------
>
>                 Key: STANBOL-312
>                 URL: https://issues.apache.org/jira/browse/STANBOL-312
>             Project: Stanbol
>          Issue Type: New Feature
>            Reporter: Reto Bachmann-Gmür
>         Attachments: STANBOL-312-launchers.patch
>
>
> For discovering the api it is very handy to able to use OSGi services interactively, for this the ssh-accessible clerezza shell should be added to the full launcher (adding it to other launchers if found useful is left to other issues).
> Interaction like the following should be possible by default:
> reto@reto-laptop:~/projects/apache/stanbol$ ssh -p 8022 admin@localhost
> admin@localhost's password: 
> Welcome to the Apache Clerezza Console
> Console is based on Scala version (unknown) (Java HotSpot(TM) Server VM, Java 1.6.0_26).
> Type in expressions to have them evaluated.
> Hint: To execute a Felix-Shell command prepend ":f "
> Type :help for more information.
> zz>:silent
> Switched off result printing.
> zz>import org.apache.stanbol.enhancer.servicesapi._
> zz>val jm = $[EnhancementJobManager]
> zz>import org.apache.stanbol.enhancer.servicesapi.helper._
> zz>val contentUri = "http://example.org/".uri
> zz>val c = new InMemoryContentItem(contentUri.getUnicodeString, "hello".getBytes,"text/plain")
> zz>jm.enhanceContent(c)
> zz>val metaData = new EzMGraph(c.getMetadata)
> zz>import metaData._
> zz>val enhancement = contentUri/-"http://fise.iks-project.eu/ontology/extracted-from".uri
> zz>out println enhancement/DCTERMS.language
> "nl"
> zz>
> ... so you may have learned that "hello" is dutch and something about the api

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira