Package org.frankframework.align
Class Properties2Xml
java.lang.Object
org.xml.sax.helpers.XMLFilterImpl
org.frankframework.align.XmlAligner
org.frankframework.align.ToXml<M,N>
org.frankframework.align.Map2Xml<String,String,Properties2Xml.PropertyNode,Map<String,String>>
org.frankframework.align.Properties2Xml
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
,XMLFilter
,XMLReader
public class Properties2Xml
extends Map2Xml<String,String,Properties2Xml.PropertyNode,Map<String,String>>
XML Schema guided JSON to XML converter;
- Author:
- Gerrit van Brakel
-
Nested Class Summary
-
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
ConstructorDescriptionProperties2Xml
(ValidatorHandler validatorHandler, List<org.apache.xerces.xs.XSModel> schemaInformation, String rootElement) -
Method Summary
Modifier and TypeMethodDescriptiongetAttributes
(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, Properties2Xml.PropertyNode node) getChildrenByName
(Properties2Xml.PropertyNode node, org.apache.xerces.xs.XSElementDeclaration childElementDeclaration) getRootNode
(Map<String, String> container) getText
(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, Properties2Xml.PropertyNode node) boolean
hasChild
(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, Properties2Xml.PropertyNode node, String childName) void
startParse
(Map<String, String> root) Align the XML according to the schema.static String
Methods inherited from class org.frankframework.align.ToXml
asSource, findNamespaceForName, getBestChildElementPath, getBestMatchingElementPath, getNamespacePrefix, getNodeNamespaceURI, getQName, getRootElement, getTargetNamespace, getUnprocessedChildElementNames, 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
-
Properties2Xml
public Properties2Xml(ValidatorHandler validatorHandler, List<org.apache.xerces.xs.XSModel> schemaInformation, String rootElement)
-
-
Method Details
-
startParse
Description copied from class:ToXml
Align the XML according to the schema.- Overrides:
startParse
in classToXml<Map<String,
String>, Properties2Xml.PropertyNode> - Throws:
SAXException
-
hasChild
public boolean hasChild(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, Properties2Xml.PropertyNode node, String childName) -
getAttributes
public Map<String,String> getAttributes(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, Properties2Xml.PropertyNode node) throws SAXException - Overrides:
getAttributes
in classMap2Xml<String,
String, Properties2Xml.PropertyNode, Map<String, String>> - Throws:
SAXException
-
getChildrenByName
public Iterable<Properties2Xml.PropertyNode> getChildrenByName(Properties2Xml.PropertyNode node, org.apache.xerces.xs.XSElementDeclaration childElementDeclaration) - Specified by:
getChildrenByName
in classToXml<Map<String,
String>, Properties2Xml.PropertyNode>
-
getText
public String getText(org.apache.xerces.xs.XSElementDeclaration elementDeclaration, Properties2Xml.PropertyNode node) -
getRootNode
- Overrides:
getRootNode
in classMap2Xml<String,
String, Properties2Xml.PropertyNode, Map<String, String>>
-
translate
public static String translate(Map<String, String> data, URL schemaURL, String rootElement, String targetNamespace) throws SAXException- Throws:
SAXException
-