Package org.frankframework.validation
Class SchemaUtils
java.lang.Object
org.frankframework.validation.SchemaUtils
- Author:
- Michiel Meeuwissen, Jaco de Groot
-
Field Summary
Modifier and TypeFieldDescriptionstatic final QName
static final QName
static final QName
static final QName
protected static final org.apache.logging.log4j.Logger
static final QName
static final QName
static final QName
static final QName
static final QName
static final QName
static final QName
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetXsdsGroupedByNamespace
(Set<IXSD> xsds, boolean sort) static void
mergeRootXsdsGroupedByNamespaceToSchemasWithIncludes
(Map<String, Set<IXSD>> rootXsdsGroupedByNamespace, XMLStreamWriter xmlStreamWriter) mergeXsdsGroupedByNamespaceToSchemasWithoutIncludes
(IScopeProvider scopeProvider, Map<String, Set<IXSD>> xsdsGroupedByNamespace, XMLStreamWriter xmlStreamWriter) Returns XSDs when xmlStreamWriter is null, otherwise write to xmlStreamWriter.static void
sortByDependencies
(Set<IXSD> xsds, List<Schema> schemas) static Reader
toReader
(javax.wsdl.Definition wsdlDefinition, javax.wsdl.extensions.schema.Schema wsdlSchema) static String
toString
(javax.wsdl.Definition wsdlDefinition, javax.wsdl.extensions.schema.Schema wsdlSchema) static void
xsdToXmlStreamWriter
(IXSD xsd, XMLStreamWriter xmlStreamWriter) static void
xsdToXmlStreamWriter
(IXSD xsd, XMLStreamWriter xmlStreamWriter, boolean standalone, boolean stripSchemaLocationFromImport, boolean skipRootStartElement, boolean skipRootEndElement, List<Attribute> rootAttributes, List<Namespace> rootNamespaceAttributes, List<XMLEvent> imports, boolean noOutput) Including aIXSD
into anXMLStreamWriter
while parsing it.
-
Field Details
-
LOG
protected static final org.apache.logging.log4j.Logger LOG -
XSD
- See Also:
-
SCHEMA
-
ELEMENT
-
IMPORT
-
INCLUDE
-
REDEFINE
-
TNS
-
ELFORMDEFAULT
-
SCHEMALOCATION
-
NAMESPACE
-
NAME
-
WSDL_SCHEMA
-
-
Constructor Details
-
SchemaUtils
public SchemaUtils()
-
-
Method Details
-
getXsdsGroupedByNamespace
-
mergeRootXsdsGroupedByNamespaceToSchemasWithIncludes
public static void mergeRootXsdsGroupedByNamespaceToSchemasWithIncludes(Map<String, Set<IXSD>> rootXsdsGroupedByNamespace, XMLStreamWriter xmlStreamWriter) throws XMLStreamException- Throws:
XMLStreamException
-
mergeXsdsGroupedByNamespaceToSchemasWithoutIncludes
public static Set<IXSD> mergeXsdsGroupedByNamespaceToSchemasWithoutIncludes(IScopeProvider scopeProvider, Map<String, Set<IXSD>> xsdsGroupedByNamespace, XMLStreamWriter xmlStreamWriter) throws XMLStreamException, IOException, ConfigurationExceptionReturns XSDs when xmlStreamWriter is null, otherwise write to xmlStreamWriter.- Returns:
- XSDs when xmlStreamWriter is null, otherwise write to xmlStreamWriter
- Throws:
XMLStreamException
IOException
ConfigurationException
-
xsdToXmlStreamWriter
public static void xsdToXmlStreamWriter(IXSD xsd, XMLStreamWriter xmlStreamWriter) throws IOException, ConfigurationException - Throws:
IOException
ConfigurationException
-
xsdToXmlStreamWriter
public static void xsdToXmlStreamWriter(IXSD xsd, XMLStreamWriter xmlStreamWriter, boolean standalone, boolean stripSchemaLocationFromImport, boolean skipRootStartElement, boolean skipRootEndElement, List<Attribute> rootAttributes, List<Namespace> rootNamespaceAttributes, List<XMLEvent> imports, boolean noOutput) throws IOException, ConfigurationException Including aIXSD
into anXMLStreamWriter
while parsing it. It is parsed (using a low levelXMLEventReader
) so that certain things can be corrected on the fly.- Parameters:
xsd
-xmlStreamWriter
-standalone
- When standalone the start and end document contants are ignored, hence the xml declaration is ignored.stripSchemaLocationFromImport
- Useful when generating a WSDL which should contain all XSD's inline (without includes or imports). The XSD might have an import with schemaLocation to make it valid on it's own, when stripSchemaLocationFromImport is true it will be removed.- Throws:
IOException
ConfigurationException
-
toReader
public static Reader toReader(javax.wsdl.Definition wsdlDefinition, javax.wsdl.extensions.schema.Schema wsdlSchema) throws javax.wsdl.WSDLException - Throws:
javax.wsdl.WSDLException
-
toString
public static String toString(javax.wsdl.Definition wsdlDefinition, javax.wsdl.extensions.schema.Schema wsdlSchema) throws javax.wsdl.WSDLException - Throws:
javax.wsdl.WSDLException
-
sortByDependencies
public static void sortByDependencies(Set<IXSD> xsds, List<Schema> schemas) throws ConfigurationException - Throws:
ConfigurationException
-