Package org.frankframework.align
Class Tree2Xml<C,N>
java.lang.Object
org.xml.sax.helpers.XMLFilterImpl
org.frankframework.align.XmlAligner
org.frankframework.align.ToXml<C,N>
org.frankframework.align.Tree2Xml<C,N>
- Type Parameters:
C
- Container of the root of the treeN
- The tree node type
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
,XMLFilter
,XMLReader
- Direct Known Subclasses:
DomTreeAligner
,Json2Xml
Base class for XML Schema guided Tree to XML conversion;
- Author:
- Gerrit van Brakel
-
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
ConstructorDescriptionTree2Xml
(ValidatorHandler validatorHandler, List<org.apache.xerces.xs.XSModel> schemaInformation) -
Method Summary
Modifier and TypeMethodDescriptiongetAllNodeChildNames
(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, N node) getChildrenByName
(N node, org.apache.xerces.xs.XSElementDeclaration childElementDeclaration) getNodeChildrenByName
(N node, org.apache.xerces.xs.XSElementDeclaration childElementDeclaration) abstract String
getNodeText
(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, N node) protected String
getOverride
(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, N node) protected N
getSubstitutedChild
(N node, String childName) Allows subclasses to provide a special way of substituting.final String
getUnprocessedChildElementNames
(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, N node, Set<String> processedChildren) boolean
void
setOverrideValues
(Map<String, Object> overrideValues) void
setSubstitutionProvider
(SubstitutionProvider<?> substitutions) Methods inherited from class org.frankframework.align.ToXml
asSource, findNamespaceForName, getAttributes, getBestChildElementPath, getBestMatchingElementPath, getNamespacePrefix, getNodeNamespaceURI, getQName, getRootElement, getRootNode, getTargetNamespace, handleComplexTypedElement, handleElement, handleElementContents, handleError, handleError, handleRootNode, handleSimpleTypedElement, isDeepSearch, isFailOnWildcards, isNil, parse, processChildElement, sendString, setDeepSearch, setFailOnWildcards, setRootElement, setTargetNamespace, startParse, 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
-
Tree2Xml
public Tree2Xml(ValidatorHandler validatorHandler, List<org.apache.xerces.xs.XSModel> schemaInformation)
-
-
Method Details
-
getAllNodeChildNames
public abstract Set<String> getAllNodeChildNames(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, N node) throws SAXException - Throws:
SAXException
-
getNodeChildrenByName
public abstract Iterable<N> getNodeChildrenByName(N node, org.apache.xerces.xs.XSElementDeclaration childElementDeclaration) throws SAXException - Throws:
SAXException
-
getNodeText
-
hasChild
public boolean hasChild(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, N node, String childName) throws SAXException - Specified by:
hasChild
in classToXml<C,
N> - Throws:
SAXException
-
getSubstitutedChild
Allows subclasses to provide a special way of substituting. This is used by Json2Xml to insert a List of values as a JsonArray. -
getOverride
-
getChildrenByName
public final Iterable<N> getChildrenByName(N node, org.apache.xerces.xs.XSElementDeclaration childElementDeclaration) throws SAXException - Specified by:
getChildrenByName
in classToXml<C,
N> - Throws:
SAXException
-
getText
-
getUnprocessedChildElementNames
protected Set<String> getUnprocessedChildElementNames(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, N node, Set<String> processedChildren) throws SAXException - Overrides:
getUnprocessedChildElementNames
in classToXml<C,
N> - Throws:
SAXException
-
getSubstitutionProvider
-
setSubstitutionProvider
-
setOverrideValues
-