org.metawidget.inspector.xsd

Class XmlSchemaInspector

    • Method Detail

      • traverseFromTopLevelTypeToNamedChildren

        protected Element traverseFromTopLevelTypeToNamedChildren(Element topLevel)
        Overridden because, with XML Schema, the named children are often nested a couple of levels deep under the top-level element. For example xs:element/xs:complexType/xs:sequence.
        Overrides:
        traverseFromTopLevelTypeToNamedChildren in class BaseXmlInspector
        Returns:
        the element containing named children, or null if no such element
      • inspectTraits

        protected void inspectTraits(Element toInspect,
                         Element toAddTo)
        Description copied from class: BaseXmlInspector
        Inspect the toInspect for properties and actions.

        This method can be overridden by clients wishing to modify the inspection process. Most clients will find it easier to override one of the sub-methods, such as inspectTrait or inspectProperty.

        Overrides:
        inspectTraits in class BaseXmlInspector
      • inspectProperty

        protected Map<String,String> inspectProperty(Element toInspect)
        Description copied from class: BaseXmlInspector
        Inspect the given Element and return a Map of attributes if it is a property.

        It is this method's responsibility to decide whether the given Element does, in fact, qualify as a 'property' - based on its own rules. Does nothing by default.

        Overrides:
        inspectProperty in class BaseXmlInspector
        Parameters:
        toInspect - DOM element to inspect
        Returns:
        a Map of the property's attributes, or null if this Element is not a property

Copyright © 2015. All Rights Reserved.