Uploaded image for project: 'Stanbol (Retired)'
  1. Stanbol (Retired)
  2. STANBOL-312

Adding clerezza shell allowing to play with services interactively

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Bundlelists
    • None

    Description

      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

      Attachments

        1. STANBOL-312-launchers.patch
          5 kB
          Reto Gmür

        Activity

          People

            reto Reto Gmür
            reto Reto Gmür
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: