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
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(org.apache.xerces.xs.XSParticle particle, Set<String> elementNames) voidendElement(String uri, String localName, String qName) protected org.apache.xerces.xs.XSElementDeclarationfindElementDeclarationForName(String namespace, String name) protected Set<org.apache.xerces.xs.XSElementDeclaration> findElementDeclarationsForName(String namespace, String name) findMultipleOccurringChildElements(org.apache.xerces.xs.XSParticle particle) List<org.apache.xerces.xs.XSAttributeUse> List<org.apache.xerces.xs.XSAttributeUse> getAttributeUses(org.apache.xerces.xs.XSTypeDefinition typeDefinition) org.apache.xerces.impl.dv.XSSimpleTypeprotected static List<org.apache.xerces.xs.XSModel> getSchemaInformation(URL schemaURL) org.apache.xerces.xs.XSTypeDefinitiongetTypeDefinition(org.apache.xerces.xs.PSVIProvider psviProvider) protected static ValidatorHandlergetValidatorHandler(URL schemaURL) voidhandleRecoverableError(String message, boolean ignoreFlag) booleanbooleanbooleanisNil(Attributes attributes) booleanisPresentInSet(Set<String> set, String name) voidnewLine()voidsetFeature(String feature, boolean value) voidvoidstartElement(String namespaceUri, String localName, String qName, Attributes attributes) static booleantypeContainsWildcard(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, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setParent, setProperty, skippedEntity, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.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(org.apache.xerces.xs.XSParticle particle) -
collectChildElements
-
findMultipleOccurringChildElements
-
getAttributeUses
-
getAttributeUses
@Nonnull public List<org.apache.xerces.xs.XSAttributeUse> getAttributeUses(org.apache.xerces.xs.XSTypeDefinition typeDefinition) -
getTypeDefinition
@Nullable public org.apache.xerces.xs.XSTypeDefinition getTypeDefinition(org.apache.xerces.xs.PSVIProvider psviProvider) -
getElementType
@Nullable public org.apache.xerces.impl.dv.XSSimpleType getElementType() -
setFeature
public void setFeature(String feature, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException - Specified by:
setFeaturein interfaceXMLReader- Overrides:
setFeaturein classXMLFilterImpl- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
getValidatorHandler
- Throws:
SAXException
-
getSchemaInformation
-
handleRecoverableError
- Throws:
SAXParseException
-
findElementDeclarationForName
@Nullable protected org.apache.xerces.xs.XSElementDeclaration findElementDeclarationForName(String namespace, String name) throws SAXException - Throws:
SAXException
-
findElementDeclarationsForName
-