You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Oscar Picasso <os...@yahoo.com> on 2005/11/22 22:04:12 UTC

Simple maps and lists in a configuration

Hi,
 
 The examples that I have read show how to contribute to a configuration with objects (like Datum) that can be retrieved from a List<Datum> or a Map<WhateverKeyClass, Datum>.
 
 But what if I want to contribute something like List<String> or Map<String,String>? That is, I don't want to use a special object to hold the configuration values.
 
 Thanks.
 
 Oscar.
		
---------------------------------
 Yahoo! FareChase - Search multiple travel sites in one click.  

Re: Simple maps and lists in a configuration

Posted by Knut Wannheden <kn...@gmail.com>.
On 11/23/05, Oscar Picasso <os...@yahoo.com> wrote:
> Thanks. I needed to add the invoke-parent to your example to make it work:
>  ...
>  <push-attribute attribute="bar"/>
>  <!-- Added element -->
>  <invoke-parent method="addElement"/>
>  ...
>

Good catch! Sorry about that!

--knut

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Simple maps and lists in a configuration

Posted by Oscar Picasso <os...@yahoo.com>.
Thanks. I needed to add the invoke-parent to your example to make it work:
 ...
 <push-attribute attribute="bar"/>
 <!-- Added element -->
 <invoke-parent method="addElement"/>
 ...

Knut Wannheden <kn...@gmail.com> wrote: Oscar,

You don't have to do anything special at all. You just don't specify a
translator for the attribute or element content you'd like to have in
your List / Map. Then instead of a  element you use the
 element in conjunction with a 
 or

 rule.

So something like:


 
  
  
   

  

 


HTH,

--knut

On 11/22/05, Oscar Picasso  wrote:
> Hi,
>
>  The examples that I have read show how to contribute to a configuration
> with objects (like Datum) that can be retrieved from a List or a
> Map.
>
>  But what if I want to contribute something like List or
> Map? That is, I don't want to use a special object to hold
> the configuration values.
>
>  Thanks.
>
>  Oscar.
>
>  ________________________________
>  Yahoo! FareChase - Search multiple travel sites in one click.

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org






		
---------------------------------
 Yahoo! FareChase - Search multiple travel sites in one click.  

Re: Simple maps and lists in a configuration

Posted by Knut Wannheden <kn...@gmail.com>.
Oscar,

You don't have to do anything special at all. You just don't specify a
translator for the attribute or element content you'd like to have in
your List / Map. Then instead of a <conversion> element you use the
<rules> element in conjunction with a <push-attribute> or
<push-content> rule.

So something like:

<schema>
 <element name="foo">
  <attribute name="bar"/>
  <rules>
   <push-attribute attribute="bar"/>
  </rules>
 </element>
</schema>

HTH,

--knut

On 11/22/05, Oscar Picasso <os...@yahoo.com> wrote:
> Hi,
>
>  The examples that I have read show how to contribute to a configuration
> with objects (like Datum) that can be retrieved from a List<Datum> or a
> Map<WhateverKeyClass, Datum>.
>
>  But what if I want to contribute something like List<String> or
> Map<String,String>? That is, I don't want to use a special object to hold
> the configuration values.
>
>  Thanks.
>
>  Oscar.
>
>  ________________________________
>  Yahoo! FareChase - Search multiple travel sites in one click.

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Simple maps and lists in a configuration

Posted by Oscar Picasso <os...@yahoo.com>.
Thanks.
 
 That was exactly what I was looking for.
 
 I think the documentation should have more examples like the ones in your site. Maybe they could be included in the official documentation.
 
 
Shing Hing Man <ma...@yahoo.com> wrote: I have an exmaple for a contribution of List of
string. 
The source code is at 

http://137.132.69.134/hiveMind/welcome

The above also have an exmaple on contribution of a
Map. But I do not
know whether it meets your needs. 
HTH
Shing

--- Oscar Picasso  wrote:

> Hi,
>  
>  The examples that I have read show how to
> contribute to a configuration with objects (like
> Datum) that can be retrieved from a List or a
> Map.
>  
>  But what if I want to contribute something like
> List or Map? That is, I don't
> want to use a special object to hold the
> configuration values.
>  
>  Thanks.
>  
>  Oscar.
>   
> ---------------------------------
>  Yahoo! FareChase - Search multiple travel sites in
> one click.  

Home page :
  http://uk.geocities.com/matmsh/index.html


 
 
  
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Simple maps and lists in a configuration

Posted by Shing Hing Man <ma...@yahoo.com>.
I have an exmaple for a contribution of List of
string. 
The source code is at 

http://137.132.69.134/hiveMind/welcome

The above also have an exmaple on contribution of a
Map. But I do not
know whether it meets your needs. 
HTH
Shing

--- Oscar Picasso <os...@yahoo.com> wrote:

> Hi,
>  
>  The examples that I have read show how to
> contribute to a configuration with objects (like
> Datum) that can be retrieved from a List<Datum> or a
> Map<WhateverKeyClass, Datum>.
>  
>  But what if I want to contribute something like
> List<String> or Map<String,String>? That is, I don't
> want to use a special object to hold the
> configuration values.
>  
>  Thanks.
>  
>  Oscar.
> 		
> ---------------------------------
>  Yahoo! FareChase - Search multiple travel sites in
> one click.  

Home page :
  http://uk.geocities.com/matmsh/index.html


	
	
		
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org