Class XmlAligner

java.lang.Object
org.xml.sax.helpers.XMLFilterImpl
org.frankframework.align.XmlAligner
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler, XMLFilter, XMLReader
Direct Known Subclasses:
ToXml

public class XmlAligner extends XMLFilterImpl
XMLFilter with option to get schema information about child elements to be parsed.
Author:
Gerrit van Brakel
  • Field Details

    • log

      protected org.apache.logging.log4j.Logger log
    • FEATURE_NAMESPACES

      public static final String FEATURE_NAMESPACES
      See Also:
    • FEATURE_NAMESPACE_PREFIXES

      public static final String FEATURE_NAMESPACE_PREFIXES
      See Also:
    • validatorHandler

      protected ValidatorHandler validatorHandler
    • XML_SCHEMA_INSTANCE_NAMESPACE

      public String XML_SCHEMA_INSTANCE_NAMESPACE
    • XML_SCHEMA_NIL_ATTRIBUTE

      public String XML_SCHEMA_NIL_ATTRIBUTE
  • Constructor Details

    • XmlAligner

      public XmlAligner(ValidatorHandler psviProvidingValidatorHandler)
    • XmlAligner

      public XmlAligner(ValidatorHandler validatorHandler, List<org.apache.xerces.xs.XSModel> schemaInformation)
  • Method Details

    • newLine

      public void newLine() throws SAXException
      Throws:
      SAXException
    • newLine

      public void newLine(int offset) throws SAXException
      Throws:
      SAXException
    • isNil

      public boolean isNil(Attributes attributes)
    • startDocument

      public void startDocument() throws SAXException
      Specified by:
      startDocument in interface ContentHandler
      Overrides:
      startDocument in class XMLFilterImpl
      Throws:
      SAXException
    • startElement

      public void startElement(String namespaceUri, String localName, String qName, Attributes attributes) throws SAXException
      Specified by:
      startElement in interface ContentHandler
      Overrides:
      startElement in class XMLFilterImpl
      Throws:
      SAXException
    • endElement

      public void endElement(String uri, String localName, String qName) throws SAXException
      Specified by:
      endElement in interface ContentHandler
      Overrides:
      endElement in class XMLFilterImpl
      Throws:
      SAXException
    • isPresentInSet

      public boolean isPresentInSet(Set<String> set, String name)
    • isMultipleOccurringChildInParentElement

      public boolean isMultipleOccurringChildInParentElement(String name)
    • isMultipleOccurringChildElement

      public boolean isMultipleOccurringChildElement(String name)
    • determineIsParentOfSingleMultipleOccurringChildElement

      protected org.frankframework.align.XmlAligner.ChildOccurrence determineIsParentOfSingleMultipleOccurringChildElement(org.apache.xerces.xs.XSParticle particle)
    • typeContainsWildcard

      public static boolean typeContainsWildcard(org.apache.xerces.xs.XSParticle particle)
    • collectChildElements

      protected void collectChildElements(org.apache.xerces.xs.XSParticle particle, Set<String> elementNames)
    • findMultipleOccurringChildElements

      protected Set<String> findMultipleOccurringChildElements(org.apache.xerces.xs.XSParticle particle)
    • getAttributeUses

      public org.apache.xerces.xs.XSObjectList getAttributeUses()
    • getAttributeUses

      public org.apache.xerces.xs.XSObjectList getAttributeUses(org.apache.xerces.xs.XSTypeDefinition typeDefinition)
    • getTypeDefinition

      public org.apache.xerces.xs.XSTypeDefinition getTypeDefinition(org.apache.xerces.xs.PSVIProvider psviProvider)
    • getElementType

      public org.apache.xerces.impl.dv.XSSimpleType getElementType()
    • setFeature

      public void setFeature(String feature, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException
      Specified by:
      setFeature in interface XMLReader
      Overrides:
      setFeature in class XMLFilterImpl
      Throws:
      SAXNotRecognizedException
      SAXNotSupportedException
    • getValidatorHandler

      protected static ValidatorHandler getValidatorHandler(URL schemaURL) throws SAXException
      Throws:
      SAXException
    • getSchemaInformation

      protected static List<org.apache.xerces.xs.XSModel> getSchemaInformation(URL schemaURL)
    • handleRecoverableError

      public void handleRecoverableError(String message, boolean ignoreFlag) throws SAXParseException
      Throws:
      SAXParseException
    • findElementDeclarationForName

      protected org.apache.xerces.xs.XSElementDeclaration findElementDeclarationForName(String namespace, String name) throws SAXException
      Throws:
      SAXException
    • findElementDeclarationsForName

      protected Set<org.apache.xerces.xs.XSElementDeclaration> findElementDeclarationsForName(String namespace, String name)
    • setPsviProvider

      public void setPsviProvider(org.apache.xerces.xs.PSVIProvider psviProvider)
    • isIgnoreUndeclaredElements

      public boolean isIgnoreUndeclaredElements()
    • setIgnoreUndeclaredElements

      public void setIgnoreUndeclaredElements(boolean ignoreUndeclaredElements)
    • getSchemaInformation

      public List<org.apache.xerces.xs.XSModel> getSchemaInformation()
    • setSchemaInformation

      public void setSchemaInformation(List<org.apache.xerces.xs.XSModel> schemaInformation)
    • getContext

      public AlignmentContext getContext()
    • getTypeDefinition

      public org.apache.xerces.xs.XSTypeDefinition getTypeDefinition()
    • getDocumentLocator

      public Locator getDocumentLocator()
    • setDocumentLocator

      public void setDocumentLocator(Locator documentLocator)
      Specified by:
      setDocumentLocator in interface ContentHandler
      Overrides:
      setDocumentLocator in class XMLFilterImpl
    • getMultipleOccurringChildElements

      public Set<String> getMultipleOccurringChildElements()
    • isParentOfSingleMultipleOccurringChildElement

      public boolean isParentOfSingleMultipleOccurringChildElement()
    • isTypeContainsWildcard

      public boolean isTypeContainsWildcard()