jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Modello
  • Modello
  • MODELLO-26

Handle enumerations

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: modello-core, modello-plugin-java, modello-plugin-xdoc, modello-plugin-xml, modello-plugin-xpp3, modello-plugin-xsd
  • Labels:
    None
  • Number of attachments :
    0

Description

Modello should be able to generate and handle enumerations.

[model]: Add reading of <enumeration> tags. Be able to create integer and string type enumerations.

Integer style enumerations look like this:

public final static FOO = 1;
public final static BAR = 2;

String style enumerations look like this:

public final static FOO = "foo";
public final static BAR = "bar";

[java]: Enumeration classes like [1] should be generated. The model should only return instances of the generated enumeration class.

[xpp3]: When reading and writing enumeration fields serialize and deserialize the enumeration.

[jpox]: Same as for [xpp3].

[xml-schema]: I'm pretty sure xml-schema can handle something like this.

[xdoc]: Add documentation support for the different enumeration elements.

http://svn.apache.org/viewcvs.cgi/maven/continuum/trunk/continuum-model/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java?rev=170005&view=log

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Andy Glick added a comment - 24/Oct/05 9:19 PM

XML-Schema does handle enumerations - some example syntax is:

<simpleType name="size">
<restriction base="xs:string">
<enumeration value="S"/>
<enumeration value="M"/>
<enumeration value="L"/>
<enumeration value="XL"/>
</restriction>
</simpleType>

Show
Andy Glick added a comment - 24/Oct/05 9:19 PM XML-Schema does handle enumerations - some example syntax is: <simpleType name="size"> <restriction base="xs:string"> <enumeration value="S"/> <enumeration value="M"/> <enumeration value="L"/> <enumeration value="XL"/> </restriction> </simpleType>
Hide
Permalink
Denis Cabasson added a comment - 08/Aug/06 4:39 AM

http://docs.codehaus.org/display/ACTIVEIO/Enumeration+Support

Show
Denis Cabasson added a comment - 08/Aug/06 4:39 AM http://docs.codehaus.org/display/ACTIVEIO/Enumeration+Support
Hide
Permalink
Trygve Laugstøl added a comment - 09/Aug/06 12:45 PM

Please keep the discussions on either the dev list or in this issue.

Show
Trygve Laugstøl added a comment - 09/Aug/06 12:45 PM Please keep the discussions on either the dev list or in this issue.
Hide
Permalink
Denis Cabasson added a comment - 10/Aug/06 3:10 AM

Modello dev list isn'y much of a list.

This discussion is fine with me, but I felt there was a lot to say about this subject. I felt confluence was a better place to create the blueprints of this new feature.

Well fell free to give you opinion anywhere, and I'll try to keep this blueprint up-to-date.

If you fell like continuing the discussion, here, I would say the most important point is to decide if, in the xml file, following our model, we should accept

<tag>key</tag>

or

<tag>value</tag>

or both.

In a String enumeration case, I suppose we should support the value one, and in the integer enumeration, I'm more in favour of the key one (as the integer value isn't relevant in itself).

Maybe we could provide support for both, and limit usage using some meta-information.
Say:

  • xml.enumeration="value"
  • xml.enumeration="key"
  • xml.enumeration="both"

Any thoughts?

Show
Denis Cabasson added a comment - 10/Aug/06 3:10 AM Modello dev list isn'y much of a list. This discussion is fine with me, but I felt there was a lot to say about this subject. I felt confluence was a better place to create the blueprints of this new feature. Well fell free to give you opinion anywhere, and I'll try to keep this blueprint up-to-date. If you fell like continuing the discussion, here, I would say the most important point is to decide if, in the xml file, following our model, we should accept <tag> key </tag> or <tag> value </tag> or both. In a String enumeration case, I suppose we should support the value one, and in the integer enumeration, I'm more in favour of the key one (as the integer value isn't relevant in itself). Maybe we could provide support for both, and limit usage using some meta-information. Say: xml.enumeration="value" xml.enumeration="key" xml.enumeration="both" Any thoughts?
Herve Boutemy made changes - 16/Jan/09 3:54 PM
Field Original Value New Value
Component/s modello-plugin-jpox [ 11470 ]
Herve Boutemy made changes - 25/Jan/09 12:48 PM
Fix Version/s 1.1 [ 14908 ]
Herve Boutemy made changes - 16/Aug/09 4:17 PM
Fix Version/s 1.1 [ 14908 ]

People

  • Assignee:
    Unassigned
    Reporter:
    Trygve Laugstøl
Vote (0)
Watch (3)

Dates

  • Created:
    18/May/05 8:43 AM
    Updated:
    16/Aug/09 4:17 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.