Package org.frankframework.align
Class DomTreeAligner
java.lang.Object
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
,XMLFilter
,XMLReader
-
Field Summary
Fields inherited from class org.frankframework.align.ToXml
MSG_CANNOT_NOT_FIND_ELEMENT_DECLARATION, MSG_EXPECTED_ELEMENT, MSG_INVALID_CONTENT, XSI_PREFIX_MAPPING
Fields inherited from class org.frankframework.align.XmlAligner
FEATURE_NAMESPACE_PREFIXES, FEATURE_NAMESPACES, log, validatorHandler, XML_SCHEMA_INSTANCE_NAMESPACE, XML_SCHEMA_NIL_ATTRIBUTE
-
Constructor Summary
ConstructorDescriptionDomTreeAligner
(ValidatorHandler validatorHandler, List<org.apache.xerces.xs.XSModel> schemaInformation) -
Method Summary
Modifier and TypeMethodDescriptiongetAllNodeChildNames
(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, Node node) getAttributes
(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, Node node) getNodeChildrenByName
(Node node, org.apache.xerces.xs.XSElementDeclaration childElementDeclaration) getNodeName
(Node node) getNodeNamespaceURI
(Node node) return namespace of node, if known.getNodeText
(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, Node node) getRootNode
(Document dom) boolean
boolean
void
startParse
(Document dom) Align the XML according to the schema.static String
Methods inherited from class org.frankframework.align.Tree2Xml
getChildrenByName, getOverride, getSubstitutedChild, getSubstitutionProvider, getText, getUnprocessedChildElementNames, setOverrideValues, setSubstitutionProvider
Methods inherited from class org.frankframework.align.ToXml
asSource, findNamespaceForName, getBestChildElementPath, getBestMatchingElementPath, getNamespacePrefix, getQName, getRootElement, getTargetNamespace, handleComplexTypedElement, handleElement, handleElementContents, handleError, handleError, handleRootNode, handleSimpleTypedElement, isDeepSearch, isFailOnWildcards, parse, processChildElement, sendString, setDeepSearch, setFailOnWildcards, setRootElement, setTargetNamespace, translate, translate
Methods inherited from class org.frankframework.align.XmlAligner
collectChildElements, determineIsParentOfSingleMultipleOccurringChildElement, endElement, findElementDeclarationForName, findElementDeclarationsForName, findMultipleOccurringChildElements, getAttributeUses, getAttributeUses, getContext, getDocumentLocator, getElementType, getMultipleOccurringChildElements, getSchemaInformation, getSchemaInformation, getTypeDefinition, getTypeDefinition, getValidatorHandler, handleRecoverableError, isIgnoreUndeclaredElements, isMultipleOccurringChildElement, isMultipleOccurringChildInParentElement, isNil, isParentOfSingleMultipleOccurringChildElement, isPresentInSet, isTypeContainsWildcard, newLine, newLine, setDocumentLocator, setFeature, setIgnoreUndeclaredElements, setPsviProvider, setSchemaInformation, startDocument, startElement, typeContainsWildcard
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
characters, endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, 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
-
Constructor Details
-
DomTreeAligner
public DomTreeAligner(ValidatorHandler validatorHandler, List<org.apache.xerces.xs.XSModel> schemaInformation)
-
-
Method Details
-
startParse
Description copied from class:ToXml
Align the XML according to the schema.- Overrides:
startParse
in classToXml<Document,
Node> - Throws:
SAXException
-
getRootNode
- Specified by:
getRootNode
in classToXml<Document,
Node>
-
getNodeNamespaceURI
Description copied from class:ToXml
return namespace of node, if known. If not, it will be determined from the schema.- Overrides:
getNodeNamespaceURI
in classToXml<Document,
Node>
-
getNodeName
-
getNodeText
- Specified by:
getNodeText
in classTree2Xml<Document,
Node>
-
hasChild
public boolean hasChild(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, Node node, String childName) throws SAXException - Overrides:
hasChild
in classTree2Xml<Document,
Node> - Throws:
SAXException
-
getAllNodeChildNames
public Set<String> getAllNodeChildNames(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, Node node) throws SAXException - Specified by:
getAllNodeChildNames
in classTree2Xml<Document,
Node> - Throws:
SAXException
-
getNodeChildrenByName
public Iterable<Node> getNodeChildrenByName(Node node, org.apache.xerces.xs.XSElementDeclaration childElementDeclaration) throws SAXException - Specified by:
getNodeChildrenByName
in classTree2Xml<Document,
Node> - Throws:
SAXException
-
isNil
-
getAttributes
public Map<String,String> getAttributes(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, Node node) - Specified by:
getAttributes
in classToXml<Document,
Node>
-
translate
public static String translate(Document xmlIn, URL schemaURL, boolean ignoreUndeclaredElements) throws SAXException - Throws:
SAXException
-