You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by David Bosschaert <da...@gmail.com> on 2011/11/18 18:16:31 UTC

OSGi 4.3 capability parser

Hi all,

Does Aries contain a utility class yet to parse OSGi 4.3
Provide-Capability/Require-Capability headers yet? Like for instance
to parse this one (from core 4.3 spec section 3.3.4):

  Provide-Capability: «
  com.acme.dictionary; from:String=nl; to=de; version:Version=3.4, «
  com.acme.dictionary; from:String=de; to=nl; version:Version=4.1, «
  com.acme.ip2location;country:List<String>="nl,be,fr,uk";version:Version=1.3,«
  com.acme.seps; tokens:List<String>="\\,,;,\\\""

Note the comma's inside the list value and the separators in the
tokens attribute...

If not I'll start something and put it in util...

Cheers,

David

Re: OSGi 4.3 capability parser

Posted by David Bosschaert <da...@gmail.com>.
I've enhanced the ManifestHeaderProcessor accordingly in r1204471.

Cheers,

David

On 19 November 2011 20:14, David Bosschaert <da...@gmail.com> wrote:
> Ah yes, that one looks like a good starting point. If I'm not mistaken
> Provide-Capability and Require-Capability have the same format (a
> namespace followed by one or more directives or attributes). The
> syntax is also enhanced in that it supports various data types for
> attributes (String, Version, Long, Double and lists of these). Since
> I'll be using this in Aries (in the SPI Fly component) I'll try to
> enhance ManifestHeaderProcessor for use with generic capabilities and
> requirements. Failing that I'll look at the one in Felix. Thanks for
> the help!
>
> David
>
> On 18 November 2011 22:37, Timothy Ward <ti...@apache.org> wrote:
>>
>> Hi David,
>>
>> Have you tried the ManifestHeaderProcessor? Provide-Capabiliity should behave like an export, Require-Capability like an import. I don't think anything new should need to be added to cope with them specifically.
>>
>> Regards,
>>
>> Tim Ward
>> -------------------
>> Apache Aries PMC member & Enterprise OSGi advocate
>> Enterprise OSGi in Action (http://www.manning.com/cummins)
>> -------------------
>>
>>
>>> Date: Fri, 18 Nov 2011 20:50:27 +0000
>>> Subject: Re: OSGi 4.3 capability parser
>>> From: emijiang6@googlemail.com
>>> To: dev@aries.apache.org
>>>
>>> I don't think it is in Aries utils as yet:).
>>> Thanks
>>> Emily
>>>
>>> On Fri, Nov 18, 2011 at 6:37 PM, Felix Meschberger <fm...@adobe.com>wrote:
>>>
>>> > Hi,
>>> >
>>> > Yo might want to look into the Felix Framework code ...
>>> >
>>> > Regards
>>> > Felix
>>> >
>>> > Am 18.11.2011 um 18:16 schrieb David Bosschaert:
>>> >
>>> > > Hi all,
>>> > >
>>> > > Does Aries contain a utility class yet to parse OSGi 4.3
>>> > > Provide-Capability/Require-Capability headers yet? Like for instance
>>> > > to parse this one (from core 4.3 spec section 3.3.4):
>>> > >
>>> > >  Provide-Capability: «
>>> > >  com.acme.dictionary; from:String=nl; to=de; version:Version=3.4, «
>>> > >  com.acme.dictionary; from:String=de; to=nl; version:Version=4.1, «
>>> > >
>>> >  com.acme.ip2location;country:List<String>="nl,be,fr,uk";version:Version=1.3,«
>>> > >  com.acme.seps; tokens:List<String>="\\,,;,\\\""
>>> > >
>>> > > Note the comma's inside the list value and the separators in the
>>> > > tokens attribute...
>>> > >
>>> > > If not I'll start something and put it in util...
>>> > >
>>> > > Cheers,
>>> > >
>>> > > David
>>> >
>>> >
>>>
>>>
>>> --
>>> Thanks
>>> Emily
>>> =================
>>> Emily Jiang
>>> ejiang@apache.org
>>
>

Re: OSGi 4.3 capability parser

Posted by David Bosschaert <da...@gmail.com>.
Ah yes, that one looks like a good starting point. If I'm not mistaken
Provide-Capability and Require-Capability have the same format (a
namespace followed by one or more directives or attributes). The
syntax is also enhanced in that it supports various data types for
attributes (String, Version, Long, Double and lists of these). Since
I'll be using this in Aries (in the SPI Fly component) I'll try to
enhance ManifestHeaderProcessor for use with generic capabilities and
requirements. Failing that I'll look at the one in Felix. Thanks for
the help!

David

On 18 November 2011 22:37, Timothy Ward <ti...@apache.org> wrote:
>
> Hi David,
>
> Have you tried the ManifestHeaderProcessor? Provide-Capabiliity should behave like an export, Require-Capability like an import. I don't think anything new should need to be added to cope with them specifically.
>
> Regards,
>
> Tim Ward
> -------------------
> Apache Aries PMC member & Enterprise OSGi advocate
> Enterprise OSGi in Action (http://www.manning.com/cummins)
> -------------------
>
>
>> Date: Fri, 18 Nov 2011 20:50:27 +0000
>> Subject: Re: OSGi 4.3 capability parser
>> From: emijiang6@googlemail.com
>> To: dev@aries.apache.org
>>
>> I don't think it is in Aries utils as yet:).
>> Thanks
>> Emily
>>
>> On Fri, Nov 18, 2011 at 6:37 PM, Felix Meschberger <fm...@adobe.com>wrote:
>>
>> > Hi,
>> >
>> > Yo might want to look into the Felix Framework code ...
>> >
>> > Regards
>> > Felix
>> >
>> > Am 18.11.2011 um 18:16 schrieb David Bosschaert:
>> >
>> > > Hi all,
>> > >
>> > > Does Aries contain a utility class yet to parse OSGi 4.3
>> > > Provide-Capability/Require-Capability headers yet? Like for instance
>> > > to parse this one (from core 4.3 spec section 3.3.4):
>> > >
>> > >  Provide-Capability: «
>> > >  com.acme.dictionary; from:String=nl; to=de; version:Version=3.4, «
>> > >  com.acme.dictionary; from:String=de; to=nl; version:Version=4.1, «
>> > >
>> >  com.acme.ip2location;country:List<String>="nl,be,fr,uk";version:Version=1.3,«
>> > >  com.acme.seps; tokens:List<String>="\\,,;,\\\""
>> > >
>> > > Note the comma's inside the list value and the separators in the
>> > > tokens attribute...
>> > >
>> > > If not I'll start something and put it in util...
>> > >
>> > > Cheers,
>> > >
>> > > David
>> >
>> >
>>
>>
>> --
>> Thanks
>> Emily
>> =================
>> Emily Jiang
>> ejiang@apache.org
>

RE: OSGi 4.3 capability parser

Posted by Timothy Ward <ti...@apache.org>.
Hi David,

Have you tried the ManifestHeaderProcessor? Provide-Capabiliity should behave like an export, Require-Capability like an import. I don't think anything new should need to be added to cope with them specifically.

Regards,

Tim Ward
-------------------
Apache Aries PMC member & Enterprise OSGi advocate
Enterprise OSGi in Action (http://www.manning.com/cummins)
-------------------


> Date: Fri, 18 Nov 2011 20:50:27 +0000
> Subject: Re: OSGi 4.3 capability parser
> From: emijiang6@googlemail.com
> To: dev@aries.apache.org
> 
> I don't think it is in Aries utils as yet:).
> Thanks
> Emily
> 
> On Fri, Nov 18, 2011 at 6:37 PM, Felix Meschberger <fm...@adobe.com>wrote:
> 
> > Hi,
> >
> > Yo might want to look into the Felix Framework code ...
> >
> > Regards
> > Felix
> >
> > Am 18.11.2011 um 18:16 schrieb David Bosschaert:
> >
> > > Hi all,
> > >
> > > Does Aries contain a utility class yet to parse OSGi 4.3
> > > Provide-Capability/Require-Capability headers yet? Like for instance
> > > to parse this one (from core 4.3 spec section 3.3.4):
> > >
> > >  Provide-Capability: «
> > >  com.acme.dictionary; from:String=nl; to=de; version:Version=3.4, «
> > >  com.acme.dictionary; from:String=de; to=nl; version:Version=4.1, «
> > >
> >  com.acme.ip2location;country:List<String>="nl,be,fr,uk";version:Version=1.3,«
> > >  com.acme.seps; tokens:List<String>="\\,,;,\\\""
> > >
> > > Note the comma's inside the list value and the separators in the
> > > tokens attribute...
> > >
> > > If not I'll start something and put it in util...
> > >
> > > Cheers,
> > >
> > > David
> >
> >
> 
> 
> -- 
> Thanks
> Emily
> =================
> Emily Jiang
> ejiang@apache.org
 		 	   		  

Re: OSGi 4.3 capability parser

Posted by Emily Jiang <em...@googlemail.com>.
I don't think it is in Aries utils as yet:).
Thanks
Emily

On Fri, Nov 18, 2011 at 6:37 PM, Felix Meschberger <fm...@adobe.com>wrote:

> Hi,
>
> Yo might want to look into the Felix Framework code ...
>
> Regards
> Felix
>
> Am 18.11.2011 um 18:16 schrieb David Bosschaert:
>
> > Hi all,
> >
> > Does Aries contain a utility class yet to parse OSGi 4.3
> > Provide-Capability/Require-Capability headers yet? Like for instance
> > to parse this one (from core 4.3 spec section 3.3.4):
> >
> >  Provide-Capability: «
> >  com.acme.dictionary; from:String=nl; to=de; version:Version=3.4, «
> >  com.acme.dictionary; from:String=de; to=nl; version:Version=4.1, «
> >
>  com.acme.ip2location;country:List<String>="nl,be,fr,uk";version:Version=1.3,«
> >  com.acme.seps; tokens:List<String>="\\,,;,\\\""
> >
> > Note the comma's inside the list value and the separators in the
> > tokens attribute...
> >
> > If not I'll start something and put it in util...
> >
> > Cheers,
> >
> > David
>
>


-- 
Thanks
Emily
=================
Emily Jiang
ejiang@apache.org

Re: OSGi 4.3 capability parser

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

Yo might want to look into the Felix Framework code ...

Regards
Felix

Am 18.11.2011 um 18:16 schrieb David Bosschaert:

> Hi all,
> 
> Does Aries contain a utility class yet to parse OSGi 4.3
> Provide-Capability/Require-Capability headers yet? Like for instance
> to parse this one (from core 4.3 spec section 3.3.4):
> 
>  Provide-Capability: «
>  com.acme.dictionary; from:String=nl; to=de; version:Version=3.4, «
>  com.acme.dictionary; from:String=de; to=nl; version:Version=4.1, «
>  com.acme.ip2location;country:List<String>="nl,be,fr,uk";version:Version=1.3,«
>  com.acme.seps; tokens:List<String>="\\,,;,\\\""
> 
> Note the comma's inside the list value and the separators in the
> tokens attribute...
> 
> If not I'll start something and put it in util...
> 
> Cheers,
> 
> David