Package org.frankframework.align
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:
Json2Xml
XMLFilter with option to get schema information about child elements to be parsed.
- Author:
- Gerrit van Brakel
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
protected org.apache.logging.log4j.Logger
protected ValidatorHandler
static final String
static final String
-
Constructor Summary
ConstructorDescriptionXmlAligner
(ValidatorHandler psviProvidingValidatorHandler) XmlAligner
(ValidatorHandler validatorHandler, List<org.apache.xerces.xs.XSModel> schemaInformation) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
collectChildElements
(org.apache.xerces.xs.XSParticle particle, Set<String> elementNames) void
endElement
(String uri, String localName, String qName) protected org.apache.xerces.xs.XSElementDeclaration
findElementDeclarationForName
(String namespace, String name) protected Set<org.apache.xerces.xs.XSElementDeclaration>
findElementDeclarationsForName
(String namespace, String name) findMultipleOccurringChildElements
(org.apache.xerces.xs.XSParticle particle) org.apache.xerces.xs.XSObjectList
org.apache.xerces.xs.XSObjectList
getAttributeUses
(org.apache.xerces.xs.XSTypeDefinition typeDefinition) org.apache.xerces.impl.dv.XSSimpleType
List<org.apache.xerces.xs.XSModel>
protected static List<org.apache.xerces.xs.XSModel>
getSchemaInformation
(URL schemaURL) org.apache.xerces.xs.XSTypeDefinition
org.apache.xerces.xs.XSTypeDefinition
getTypeDefinition
(org.apache.xerces.xs.PSVIProvider psviProvider) protected static ValidatorHandler
getValidatorHandler
(URL schemaURL) void
handleRecoverableError
(String message, boolean ignoreFlag) boolean
boolean
boolean
boolean
isNil
(Attributes attributes) boolean
boolean
isPresentInSet
(Set<String> set, String name) boolean
void
newLine()
void
setDocumentLocator
(Locator documentLocator) void
setFeature
(String feature, boolean value) void
setIgnoreUndeclaredElements
(boolean ignoreUndeclaredElements) void
setPsviProvider
(org.apache.xerces.xs.PSVIProvider psviProvider) void
setSchemaInformation
(List<org.apache.xerces.xs.XSModel> schemaInformation) void
void
startElement
(String namespaceUri, String localName, String qName, Attributes attributes) static boolean
typeContainsWildcard
(org.apache.xerces.xs.XSParticle particle) Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
characters, endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setParent, setProperty, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
log
protected org.apache.logging.log4j.Logger log -
FEATURE_NAMESPACES
- See Also:
-
FEATURE_NAMESPACE_PREFIXES
- See Also:
-
validatorHandler
-
XML_SCHEMA_INSTANCE_NAMESPACE
- See Also:
-
XML_SCHEMA_NIL_ATTRIBUTE
- See Also:
-
-
Constructor Details
-
XmlAligner
-
XmlAligner
public XmlAligner(ValidatorHandler validatorHandler, List<org.apache.xerces.xs.XSModel> schemaInformation)
-
-
Method Details
-
newLine
- Throws:
SAXException
-
isNil
-
startDocument
- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classXMLFilterImpl
- Throws:
SAXException
-
startElement
public void startElement(String namespaceUri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classXMLFilterImpl
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classXMLFilterImpl
- Throws:
SAXException
-
isPresentInSet
-
isMultipleOccurringChildInParentElement
-
isMultipleOccurringChildElement
-
typeContainsWildcard
public static boolean typeContainsWildcard(org.apache.xerces.xs.XSParticle particle) -
collectChildElements
-
findMultipleOccurringChildElements
-
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 interfaceXMLReader
- Overrides:
setFeature
in classXMLFilterImpl
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
-
getValidatorHandler
- Throws:
SAXException
-
getSchemaInformation
-
handleRecoverableError
- Throws:
SAXParseException
-
findElementDeclarationForName
protected org.apache.xerces.xs.XSElementDeclaration findElementDeclarationForName(String namespace, String name) throws SAXException - Throws:
SAXException
-
findElementDeclarationsForName
-
setPsviProvider
public void setPsviProvider(org.apache.xerces.xs.PSVIProvider psviProvider) -
isIgnoreUndeclaredElements
public boolean isIgnoreUndeclaredElements() -
setIgnoreUndeclaredElements
public void setIgnoreUndeclaredElements(boolean ignoreUndeclaredElements) -
getSchemaInformation
-
setSchemaInformation
-
getContext
-
getTypeDefinition
public org.apache.xerces.xs.XSTypeDefinition getTypeDefinition() -
getDocumentLocator
-
setDocumentLocator
- Specified by:
setDocumentLocator
in interfaceContentHandler
- Overrides:
setDocumentLocator
in classXMLFilterImpl
-
getMultipleOccurringChildElements
-
isParentOfSingleMultipleOccurringChildElement
public boolean isParentOfSingleMultipleOccurringChildElement() -
isTypeContainsWildcard
public boolean isTypeContainsWildcard()
-