Hi 

Can someone please comment on this issue (maybe Felix). Or is it still not 
clear what I try to achieve?

Creating another metatype service implementation is not something I will do 
light-heartedly. That's the
reason why I try to find out if it makes sense to extend (fix) the existing 
metatype service implementation
of Apache Felix. Others might profit from this as well (if extra XML 
attributes) can be accessed.

Regards
Alex

--
finnova AG Bankware
Alexander Berger
Software Architect
Merkurstrasse 6
CH-5600 Lenzburg
Tel: +41 (0)62 886 48 07 (direkt)
Tel: +41 (0)62 886 47 47 (zentrale)
Fax: +41 (0)62 886 48 88 
mailto:[email protected]
http://www.finnova.ch

-----Ursprüngliche Nachricht-----
Von: Berger Alexander 
Gesendet: Freitag, 4. Januar 2013 18:29
An: '[email protected]'
Betreff: AW: Metatype Service - OptionalAttributes - extra XML attributes with 
namespace support

Hi

I want to add some extra attributes to the metadata (XML) which will then be 
used by a (special) administration console which knows about that extra 
attributes. These extra attributes will be used to allow a more concise 
representation of Configurations in the Graphical User Interface (GUI). For 
example to show a value from a certain configuration property instead of its 
PID in the GUI, as PIDs are quite meaningless to the average User.
 
Regards
Alex

--
finnova AG Bankware
Alexander Berger
Interface Development
Merkurstrasse 6
CH-5600 Lenzburg
Tel: +41 (0)62 886 48 07 (direkt)
Tel: +41 (0)62 886 47 47 (zentrale)
Fax: +41 (0)62 886 48 88
mailto:[email protected]
http://www.finnova.ch

-----Ursprüngliche Nachricht-----
Von: Felix Meschberger [mailto:[email protected]]
Gesendet: Freitag, 4. Januar 2013 14:41
An: [email protected]
Betreff: Re: Metatype Service - OptionalAttributes - extra XML attributes with 
namespace support

Hi,

Am 04.01.2013 um 08:23 schrieb <[email protected]> 
<[email protected]>:

> Hi
> 
> I intend to use extra (optional) XML attributes with the Metatype Service.

Before commenting in detail, I would be interested to know what exactly you 
want to achieve by using additional attributes on object class and attribute 
definitions.

Regards
Felix


> For this purpose I examined the
> Felix metatype service implementation and found the class 
> org.apache.felix.metatype.OptionalAttributes,
> which is extended by AD, OCD, ... . But unluckily this class is 
> neither inherited by LocalizedObjectClassDefinition nor by 
> LocalizedAttributeDefinition, which makes it quite useless for the moment.
> 
> Another Problem is that OptionalAttributes does not support XML namespaces 
> for the attribute names.
> The underlying Map should use something like javax.xml.namespace.QName 
> as key and not just the name of the attribute (String). Note, XML 
> namespace support is crucial as extra XML attribute have to be in a different 
> (##other) namespace (see "Metatype Service Specifiaction" (Version 1.2), 
> section 105.9 "XML Schema").
> 
> The above observations lead me to the following question:
> 
> 1.      Is it still a requirement for Felix subprojects to avoid dependencies 
> on packages like java.xml.** and rely on kxml2 instead?
> a.      If so, then I could try create a patch for metatype service which 
> will add support for extra XML attributes (including XML namespace support 
> but not using javax.xml.namespace.QName),
>            so that extra XML attributes could be retrieved from AD, OCD, ..., 
> LocalizedObjectClassDefinition and LocalizedAttributeDefinition instances.
> b.      If not, then I could try to create a similar patch as described above 
> (a) but using javax.xml.namespace.QName instead.
> 
> Note, the class javax.xml.namespace.QName is part of JavaSE since version 1.5 
> older versions as well as JavaME do not contain that class.
> 
> Alex
> 
> 

Reply via email to