Class XsdModelConverter

  • All Implemented Interfaces:
    org.apache.ws.commons.schema.walker.XmlSchemaVisitor

    public class XsdModelConverter
    extends NoopXmlSchemaVisitor
    Used to convert a XSD to a structure of ConfigItems. It usually uses with JaxbXmlConverter together.
    See Also:
    JaxbXmlConverter
    • Constructor Detail

      • XsdModelConverter

        public XsdModelConverter​(String xsdStr)
    • Method Detail

      • getCollection

        public org.apache.ws.commons.schema.XmlSchemaCollection getCollection()
      • getElementNameToValueNameMap

        public Map<String,​String> getElementNameToValueNameMap()
      • onEnterElement

        public void onEnterElement​(org.apache.ws.commons.schema.XmlSchemaElement xmlSchemaElement,
                                   org.apache.ws.commons.schema.walker.XmlSchemaTypeInfo xmlSchemaTypeInfo,
                                   boolean b)
        Specified by:
        onEnterElement in interface org.apache.ws.commons.schema.walker.XmlSchemaVisitor
        Overrides:
        onEnterElement in class NoopXmlSchemaVisitor
      • onExitElement

        public void onExitElement​(org.apache.ws.commons.schema.XmlSchemaElement xmlSchemaElement,
                                  org.apache.ws.commons.schema.walker.XmlSchemaTypeInfo xmlSchemaTypeInfo,
                                  boolean b)
        Specified by:
        onExitElement in interface org.apache.ws.commons.schema.walker.XmlSchemaVisitor
        Overrides:
        onExitElement in class NoopXmlSchemaVisitor
      • onVisitAttribute

        public void onVisitAttribute​(org.apache.ws.commons.schema.XmlSchemaElement xmlSchemaElement,
                                     org.apache.ws.commons.schema.walker.XmlSchemaAttrInfo xmlSchemaAttrInfo)
        Specified by:
        onVisitAttribute in interface org.apache.ws.commons.schema.walker.XmlSchemaVisitor
        Overrides:
        onVisitAttribute in class NoopXmlSchemaVisitor
      • getDocumentation

        public String getDocumentation​(org.apache.ws.commons.schema.XmlSchemaAnnotation xmlSchemaAnnotation)
        Reading documentation from xsd annotation
        Parameters:
        xmlSchemaAnnotation -
        Returns:
      • getConfigItemForAttribute

        public ConfigItem getConfigItemForAttribute​(org.apache.ws.commons.schema.walker.XmlSchemaAttrInfo xmlSchemaAttrInfo)
        Convert xsd attribute into ConfigItem
        Parameters:
        xmlSchemaAttrInfo -
        Returns:
      • getTypeForAttribute

        public ConfigItem.Type getTypeForAttribute​(org.apache.ws.commons.schema.walker.XmlSchemaAttrInfo xmlSchemaAttrInfo)
        Handle xsd type
        Parameters:
        xmlSchemaAttrInfo -
        Returns: