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 2012/06/22 18:54:43 UTC

[jira] [Resolved] (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 resolved STANBOL-312.
----------------------------------------

    Resolution: Fixed
      Assignee: Reto Bachmann-Gmür

Fixed patch to use bundle-list and disabled console shell, so that the shell is only accessible via ssh
                
> 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
>            Assignee: 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira