Uploaded image for project: 'Woden'
  1. Woden
  2. WODEN-178

DescriptionImpl methods addElementDeclaration and addTypeDefinition should not be public

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • M8
    • None
    • None

    Description

      These two methods are defined as public methods on DescriptionImpl but as we don't yet have an updatable Component API, they are not defined on the Description component interface. The component model is currently derived from the element model and these methods are only used by ComponentModelBuilder. As this is now in the same package as DescriptionImpl, these two methods should be made package private. We can make them public later if they are added to the Woden API.

      That's the easy part. There are also several testcases that call these methods as they 'hack together'' a WSDL model for their tests. These will need to be changed so that the ElementDeclarations and TypeDefinitions are derived from the Element model, rather than instantiated directly then explicitly added to the model by the test client. To do this, the test code will need to parse a <xs:schema> element as a XmlSchema object and access it via the normal Woden API.

      For an example, see the code in WSDLDocumentValidatorTest.testTestAssertionSchema1066(). It parse a string representation of an xs:schema and adds this to a TypesElement that has been created via the Woden programming model. The getElementDeclarations and getTypesDefinitions can then be called on DescriptionElement.toComponent().

      Attachments

        1. Woden-178.patch.txt
          25 kB
          Dan Harvey

        Activity

          People

            danharvey Dan Harvey
            jkaputin John Alan William Kaputin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: