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/24 15:55:38 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=13090226#comment-13090226 ] 

Reto Bachmann-Gmür commented on STANBOL-312:
--------------------------------------------

it might be possible to adapt the framework fragment to make sun.misc available to the scala compiler (thus not requiring the newer version of the sling launchpad). 

> 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