Date: 2004-04-29T08:55:01
   Editor: DanielFeist <[EMAIL PROTECTED]>
   Wiki: Jakarta HiveMind Wiki
   Page: HiveMindElementImprovementProposal
   URL: 
http://wiki.apache.org/jakarta-hivemind/HiveMindElementImprovementProposal

   no comment

New Page:

= Problem Statement =

(Apr 29 2004, 1.0-alpha-4 just released )

!HiveMind gives the developer three options to process configuration point 
contributions and convert them into a list of objects.

  1. Use the {{{<conversion>}}} element in the {{{<configuration-point>}}} 
definition.
  2. Use {{{<rules>}}} in the {{{>configuration-point>}}} definition.
  3. Not use {{{<conversion>}}} or {{{<rules>}}} elements in the 
{{{<configuration-point>}}} definition and obtain raw elements for manual 
processing of contributions outside of !HiveMind.


'''This proposal applies to the third of above three options.'''  When choosing 
to use the third option a list ''org.apache.hivemind.Element'' 's are returned 
by the HiveMindRegistry when the conbributions of a {{{configutation-point}}} 
are obtained.  These xml elements are then used directly or are parsed 
externally to !HiveMind.  For those who have looked at the architecture of the 
eclipse platform, this is the only option available as {{{<conversion>}}} and 
{{{<rules>}}} elements do not exist in eclipse's plugin descriptors.


When a developer chooses this option they obviously have to deal with 
''org.apache.hivemind.Element'' objects as !HiveMind uses its own ''Element'' 
and ''Attribute'' objects and so no other xml processing library understands 
them.  At the moment the ''org.apache.hivemind.Element'' object has no 
compatability methods enabling conversion to a ''org.w3c.Element'' or to string 
representation of the XML element.  This means that working with 
''org.apache.hivemind.Element'' objects requires an additional utility method 
to convert the Element to a string to enable it to be used with other xml 
libraries that the developer may be using.


= Solution =

Inlcude within the '''org.apache.hivemind.Element''' object a minimal number of 
utility methods that allow the developer who chooses to recieve raw elements 
instead of using one of !Hivemind's {{{<conversion>}}} or {{{<rules>}}} 
xml->obeject methods can do so more easily.

I would suggest minimaly a {{{String asXML()}}} method with returns a 
''String'' representation of the Element.  Other methods could be included 
obvoulsy although care should be taken to respect the ["YAGNI"] principal.


= Comments =

Please add comments, ideas and suggestions..


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to