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
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringprotected ValidatorHandlerstatic final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionXmlAligner(ValidatorHandler psviProvidingValidatorHandler) XmlAligner(ValidatorHandler validatorHandler, List<org.apache.xerces.xs.XSModel> schemaInformation) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcollectChildElements(@Nullable org.apache.xerces.xs.XSParticle particle, @NonNull Set<String> elementNames) voidendElement(String uri, String localName, String qName) protected @Nullable org.apache.xerces.xs.XSElementDeclarationfindElementDeclarationForName(@Nullable String namespace, @Nullable String name) protected @NonNull Set<org.apache.xerces.xs.XSElementDeclaration> findElementDeclarationsForName(@Nullable String namespace, @Nullable String name) findMultipleOccurringChildElements(@Nullable org.apache.xerces.xs.XSParticle particle) @NonNull List<org.apache.xerces.xs.XSAttributeUse> @NonNull List<org.apache.xerces.xs.XSAttributeUse> getAttributeUses(@Nullable org.apache.xerces.xs.XSTypeDefinition typeDefinition) @Nullable org.apache.xerces.impl.dv.XSSimpleTypeprotected static @NonNull List<org.apache.xerces.xs.XSModel> getSchemaInformation(@NonNull URL schemaURL) @Nullable org.apache.xerces.xs.XSTypeDefinitiongetTypeDefinition(@NonNull org.apache.xerces.xs.PSVIProvider psviProvider) protected static @NonNull ValidatorHandlergetValidatorHandler(@NonNull URL schemaURL) voidhandleRecoverableError(@NonNull String message, boolean ignoreFlag) booleanbooleanbooleanisNil(Attributes attributes) booleanisPresentInSet(Set<String> set, String name) voidnewLine()voidsetFeature(@NonNull String feature, boolean value) voidvoidstartElement(String namespaceUri, String localName, String qName, Attributes attributes) static booleantypeContainsWildcard(@Nullable org.apache.xerces.xs.XSParticle particle) Methods inherited from class XMLFilterImpl
characters, endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setParent, setProperty, skippedEntity, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContentHandler
declaration
-
Field Details
-
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:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classXMLFilterImpl- Throws:
SAXException
-
startElement
public void startElement(String namespaceUri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classXMLFilterImpl- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classXMLFilterImpl- Throws:
SAXException
-
isPresentInSet
-
isMultipleOccurringChildInParentElement
-
isMultipleOccurringChildElement
-
typeContainsWildcard
public static boolean typeContainsWildcard(@Nullable org.apache.xerces.xs.XSParticle particle) -
collectChildElements
-
findMultipleOccurringChildElements
-
getAttributeUses
-
getAttributeUses
public @NonNull List<org.apache.xerces.xs.XSAttributeUse> getAttributeUses(@Nullable org.apache.xerces.xs.XSTypeDefinition typeDefinition) -
getTypeDefinition
public @Nullable org.apache.xerces.xs.XSTypeDefinition getTypeDefinition(@NonNull org.apache.xerces.xs.PSVIProvider psviProvider) -
getElementType
public @Nullable org.apache.xerces.impl.dv.XSSimpleType getElementType() -
setFeature
public void setFeature(@NonNull String feature, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException - Specified by:
setFeaturein interfaceXMLReader- Overrides:
setFeaturein classXMLFilterImpl- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
getValidatorHandler
protected static @NonNull ValidatorHandler getValidatorHandler(@NonNull URL schemaURL) throws SAXException - Throws:
SAXException
-
getSchemaInformation
-
handleRecoverableError
public void handleRecoverableError(@NonNull String message, boolean ignoreFlag) throws SAXParseException - Throws:
SAXParseException
-
findElementDeclarationForName
protected @Nullable org.apache.xerces.xs.XSElementDeclaration findElementDeclarationForName(@Nullable String namespace, @Nullable String name) throws SAXException - Throws:
SAXException
-
findElementDeclarationsForName
-