public final class XmlSchemaGenerator<T,C,F,M> extends Object
A client must invoke methods in the following order:
XmlSchemaGenerator
add(com.sun.xml.bind.v2.model.core.ClassInfo<T, C>) methods, multiple times if necessary.
write(javax.xml.bind.SchemaOutputResolver, com.sun.xml.bind.api.ErrorListener)
XmlSchemaGenerator.
| Constructor and Description |
|---|
XmlSchemaGenerator(Navigator<T,C,F,M> navigator,
TypeInfoSet<T,C,F,M> types) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(ArrayInfo<T,C> a) |
void |
add(ClassInfo<T,C> clazz)
Adds a new class to the list of classes to be written.
|
void |
add(ElementInfo<T,C> elem)
Adds a new element to the list of elements to be written.
|
void |
add(EnumLeafInfo<T,C> envm) |
void |
add(QName tagName,
boolean isNillable,
NonElement<T,C> type)
Adds an additional element declaration.
|
protected static String |
relativize(String uri,
String baseUri)
Relativizes a URI by using another URI (base URI.)
|
String |
toString()
Debug information of what's in this
XmlSchemaGenerator. |
void |
write(SchemaOutputResolver resolver,
ErrorListener errorListener)
Write out the schema documents.
|
void |
writeEpisodeFile(com.sun.xml.txw2.output.XmlSerializer out)
Writes out the episode file.
|
public void add(ElementInfo<T,C> elem)
public void add(EnumLeafInfo<T,C> envm)
public void add(QName tagName, boolean isNillable, NonElement<T,C> type)
tagName - The name of the element declaration to be added.type - The type this element refers to.
Can be null, in which case the element refers to an empty anonymous complex type.public void writeEpisodeFile(com.sun.xml.txw2.output.XmlSerializer out)
public void write(SchemaOutputResolver resolver, ErrorListener errorListener) throws IOException
IOExceptionpublic String toString()
XmlSchemaGenerator.protected static String relativize(String uri, String baseUri)
For example, relative("http://www.sun.com/abc/def","http://www.sun.com/pqr/stu") => "../abc/def"
This method only works on hierarchical URI's, not opaque URI's (refer to the java.net.URI javadoc for complete definitions of these terms.
This method will not normalize the relative URI.
Copyright © 2018 JBoss by Red Hat. All rights reserved.