Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Component/s: None
    • Labels:
      None

      Description

      The schemas I deal with make heavy use of xsd:key on what are intended as sequences of uniquely identifiable entries; a.k.a, maps. Take for example:

      <xsd:key name="ejb-name-key">
      <xsd:annotation>
      <xsd:documentation>
      The ejb-name element contains the name of an enterprise
      bean. The name must be unique within the ejb-jar file.
      </xsd:documentation>
      </xsd:annotation>
      <xsd:selector xpath="javaee:enterprise-beans/*"/>
      <xsd:field xpath="javaee:ejb-name"/>
      </xsd:key>

      The attached patch allows someone to flag a field of the java class as being a key and allows that object to be added to a map using that key value. Such as:

      xstream.addImplicitKey(EnterpriseBean.class, "ejbName");

      I've taken some time and split the patches in two as it may be easier to deal with the addition in logical parts.

      1. ImplicitKeySupport-good.patch
        22 kB
        David Blevins
      2. ReadField.patch
        5 kB
        David Blevins

        Issue Links

          People

          • Assignee:
            Unassigned
            Reporter:
            David Blevins
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: