public class SchemaUtils extends Object
Modifier and Type | Field and Description |
---|---|
static QName |
ELEMENT |
static QName |
ELFORMDEFAULT |
static QName |
IMPORT |
static QName |
INCLUDE |
protected static org.apache.logging.log4j.Logger |
LOG |
static QName |
NAME |
static QName |
NAMESPACE |
static QName |
REDEFINE |
static QName |
SCHEMA |
static QName |
SCHEMALOCATION |
static QName |
TNS |
static QName |
WSDL_SCHEMA |
static String |
XSD |
Constructor and Description |
---|
SchemaUtils() |
Modifier and Type | Method and Description |
---|---|
static Map<String,Set<IXSD>> |
getXsdsGroupedByNamespace(Set<IXSD> xsds,
boolean sort) |
static void |
mergeRootXsdsGroupedByNamespaceToSchemasWithIncludes(Map<String,Set<IXSD>> rootXsdsGroupedByNamespace,
XMLStreamWriter xmlStreamWriter) |
static Set<IXSD> |
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 a
IXSD into an XMLStreamWriter while parsing it. |
protected static final org.apache.logging.log4j.Logger LOG
public static final String XSD
public static final QName SCHEMA
public static final QName ELEMENT
public static final QName IMPORT
public static final QName INCLUDE
public static final QName REDEFINE
public static final QName TNS
public static final QName ELFORMDEFAULT
public static final QName SCHEMALOCATION
public static final QName NAMESPACE
public static final QName NAME
public static final QName WSDL_SCHEMA
public static Map<String,Set<IXSD>> getXsdsGroupedByNamespace(Set<IXSD> xsds, boolean sort)
public static void mergeRootXsdsGroupedByNamespaceToSchemasWithIncludes(Map<String,Set<IXSD>> rootXsdsGroupedByNamespace, XMLStreamWriter xmlStreamWriter) throws XMLStreamException
XMLStreamException
public static Set<IXSD> mergeXsdsGroupedByNamespaceToSchemasWithoutIncludes(IScopeProvider scopeProvider, Map<String,Set<IXSD>> xsdsGroupedByNamespace, XMLStreamWriter xmlStreamWriter) throws XMLStreamException, IOException, ConfigurationException
XMLStreamException
IOException
ConfigurationException
public static void xsdToXmlStreamWriter(IXSD xsd, XMLStreamWriter xmlStreamWriter) throws IOException, ConfigurationException
IOException
ConfigurationException
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
IXSD
into an XMLStreamWriter
while parsing it. It is parsed
(using a low level XMLEventReader
) so that certain things can be corrected on the fly.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.IOException
ConfigurationException
public static Reader toReader(javax.wsdl.Definition wsdlDefinition, javax.wsdl.extensions.schema.Schema wsdlSchema) throws javax.wsdl.WSDLException
javax.wsdl.WSDLException
public static String toString(javax.wsdl.Definition wsdlDefinition, javax.wsdl.extensions.schema.Schema wsdlSchema) throws javax.wsdl.WSDLException
javax.wsdl.WSDLException
public static void sortByDependencies(Set<IXSD> xsds, List<Schema> schemas) throws ConfigurationException
ConfigurationException
Copyright © 2023 Frank!Framework. All rights reserved.