Hi Ghufran,
Stanbol is an OSGi platform, so if you wish to use it programmatically
via the Java APIs, the natural way to do so is that you package your
code into a JAR file that is also an OSGi bundle [1], install it on a
running Stanbol launcher using its OSGi console and activate it.
Of course, at development time you will need access to the Java APIs of
the Stanbol components. Most of the time, these are made available as
distinct packages called org.apache.stanbol.{component-name}.servicesapi
(example: org.apache.stanbol.enhancer.servicesapi). When developing in
Eclipse or NetBeans etc. you will then include the JAR file of this
servicesapi in your classpath.
To do unit testing, you will most likely also need the reference
implementations of these serviceapis, which come as separate packages.
At runtime, instead of using these implementations directly, you can
refer to the servicesapi interfaces using the OSGi Service Reference
mechanism [2], and let the embedded Apache Felix do the job of matching
API and implementation.
I hope this somehow gets you started.
Alessandro
[1] http://www.osgi.org/Specifications
[2]
http://felix.apache.org/documentation/subprojects/apache-felix-maven-scr-plugin/scr-annotations.html
On 26/09/2014 16:17, Mohammad Ghufran wrote:
Hello,
Is there a way to use stanbol through Java or some third party API like
this one: https://github.com/zaizi/apache-stanbol-client has to be used?
In case there is a way, could someone point me to some documentation and
maybe some examples? In the latter case, which is the recommended API
wrapper?
Best Regards,
Ghufran
-- The Open University is incorporated by Royal Charter (RC 000391), an exempt
charity in England & Wales and a charity registered in Scotland (SC 038302).
The Open University is authorised and regulated by the Financial Conduct Authority.