You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stanbol.apache.org by Alessandro Adamou <ad...@cs.unibo.it> on 2012/10/10 12:16:02 UTC
Sling Adapter API with Ontology Manager
Hi,
as per https://issues.apache.org/jira/browse/STANBOL-710
I would like to move all adapters of Ontology Manager objects to
dedicated bundles.
Say I have the Scope implementation in ontologymanager.core and it has
an export(Class<T> returnType) method that I implement for exporting the
Scope to a clerezza.TripleCollection or owlapi.OWLOntology. I would like
to delegate the implementations to a Clerezza adapter and an OWL API
adapter and whatnot, each in its own bundle. I don't want stuff like
ClerezzaScopeImpl and OwlApiScopeImpl around, just one generic
implementation and then the adapters elsewhere.
I thought the Sling Adapter API could be nice to reuse. I found some
docs here:
http://sling.apache.org/site/adapters.html
but it seems we never included the org.apache.sling:org.apache.sling.api
artifact in the Stanbol parent, nor in any bundle loaded in our
launchers (version 2.2.0+). So there's no adapter manager, no factory,
no class definitions.
Do you think this API should be used or I should make an in-house
adapter API like we did with Rules? Is it a good idea at all?
Thanks
Alessandro
--
M.Sc. Alessandro Adamou
Alma Mater Studiorum - Università di Bologna
Department of Computer Science
Mura Anteo Zamboni 7, 40127 Bologna - Italy
Semantic Technology Laboratory (STLab)
Institute for Cognitive Science and Technology (ISTC)
National Research Council (CNR)
Via Nomentana 56, 00161 Rome - Italy
"I will give you everything, just don't demand anything."
(Ettore Petrolini, 1917)
Not sent from my iSnobTechDevice
Re: Sling Adapter API with Ontology Manager
Posted by Fabian Christ <ch...@googlemail.com>.
Hi Alessandro,
even if I do not fully understand, what you are trying to approach,
but the use of such an adapter pattern sounds reasonable to me. And if
there is an already existing implementation for that, then I would
suggest to use it. Why re-invent the wheel? ;)
Best,
- Fabian
2012/10/10 Alessandro Adamou <ad...@cs.unibo.it>:
> Hi,
>
> as per https://issues.apache.org/jira/browse/STANBOL-710
>
> I would like to move all adapters of Ontology Manager objects to dedicated
> bundles.
>
> Say I have the Scope implementation in ontologymanager.core and it has an
> export(Class<T> returnType) method that I implement for exporting the Scope
> to a clerezza.TripleCollection or owlapi.OWLOntology. I would like to
> delegate the implementations to a Clerezza adapter and an OWL API adapter
> and whatnot, each in its own bundle. I don't want stuff like
> ClerezzaScopeImpl and OwlApiScopeImpl around, just one generic
> implementation and then the adapters elsewhere.
>
> I thought the Sling Adapter API could be nice to reuse. I found some docs
> here:
>
> http://sling.apache.org/site/adapters.html
>
> but it seems we never included the org.apache.sling:org.apache.sling.api
> artifact in the Stanbol parent, nor in any bundle loaded in our launchers
> (version 2.2.0+). So there's no adapter manager, no factory, no class
> definitions.
>
> Do you think this API should be used or I should make an in-house adapter
> API like we did with Rules? Is it a good idea at all?
>
> Thanks
>
> Alessandro
>
> --
> M.Sc. Alessandro Adamou
>
> Alma Mater Studiorum - Università di Bologna
> Department of Computer Science
> Mura Anteo Zamboni 7, 40127 Bologna - Italy
>
> Semantic Technology Laboratory (STLab)
> Institute for Cognitive Science and Technology (ISTC)
> National Research Council (CNR)
> Via Nomentana 56, 00161 Rome - Italy
>
>
> "I will give you everything, just don't demand anything."
> (Ettore Petrolini, 1917)
>
> Not sent from my iSnobTechDevice
>
--
Fabian
http://twitter.com/fctwitt
Re: Sling Adapter API with Ontology Manager
Posted by Alessandro Adamou <ad...@cs.unibo.it>.
Hi Bertrand, Fabian,
Thanks for the Help! i have posted the use case as a comment to
https://issues.apache.org/jira/browse/STANBOL-710
It would be great if the Sling adapter API could be useful for
implementing it. If so, is the API already available as an OSGi bundle?
Alessandro
On 10/12/12 9:24 AM, Bertrand Delacretaz wrote:
> Hi,
>
> On Wed, Oct 10, 2012 at 12:16 PM, Alessandro Adamou <ad...@cs.unibo.it> wrote:
>> ...as per https://issues.apache.org/jira/browse/STANBOL-710...
>> ...I thought the Sling Adapter API could be nice to reuse...
> I don't understand your use case, could you show a simple example?
>
> -Bertrand
>
--
M.Sc. Alessandro Adamou
Alma Mater Studiorum - Università di Bologna
Department of Computer Science
Mura Anteo Zamboni 7, 40127 Bologna - Italy
Semantic Technology Laboratory (STLab)
Institute for Cognitive Science and Technology (ISTC)
National Research Council (CNR)
Via Nomentana 56, 00161 Rome - Italy
"I will give you everything, just don't demand anything."
(Ettore Petrolini, 1917)
Not sent from my iSnobTechDevice
Re: Sling Adapter API with Ontology Manager
Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,
On Wed, Oct 10, 2012 at 12:16 PM, Alessandro Adamou <ad...@cs.unibo.it> wrote:
> ...as per https://issues.apache.org/jira/browse/STANBOL-710...
> ...I thought the Sling Adapter API could be nice to reuse...
I don't understand your use case, could you show a simple example?
-Bertrand