Details

    • 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

        Hide
        Andy Glick added a comment -

        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 - 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
        Denis Cabasson added a comment - http://docs.codehaus.org/display/ACTIVEIO/Enumeration+Support
        Hide
        Trygve Laugstøl added a comment -

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

        Show
        Trygve Laugstøl added a comment - Please keep the discussions on either the dev list or in this issue.
        Hide
        Denis Cabasson added a comment -

        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 - 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?

          People

          • Assignee:
            Unassigned
            Reporter:
            Trygve Laugstøl
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: