schema.xmlconfig.xsd Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commons-xmlbeans Show documentation
Show all versions of commons-xmlbeans Show documentation
The Apache Commons Codec package contains simple encoder and decoders for
various formats such as Base64 and Hexadecimal. In addition to these
widely used encoders and decoders, the codec package also maintains a
collection of phonetic encoding utilities.
The newest version!
The config element is the top-level element for an .xsdconfig file.
It contains configuration information that guides the xsd compiler
when it generates Java classes. You can specify package names to
be used for whole xml namespaces; you can specify class names
to use for individual schema types; and you can supply extension
interfaces and implementations to be extended by the generated
Java classes.
Specifies configuration for a namespace.
Specifies java mapping for a qname.
Specifies extensions for the generated types in the 'for' attribute.
Specifies a custom java type mapping for a derived simple type.
A static handler must be specified that converts between the
custom java type and the built-in simple type it derives from.
The package name to be used for types generated in this
namespace.
A prefix to be used to prepend to top-level Java type names
generated in this namespace. (The prefix is not used for
inner Java type definitions.)
A suffix to be used to append to top-level Java type names
generated in this namespace. (The suffix is not used for
inner Java type definitions.)
A list of any number of namespace URIs or ##local for the no-namespace,
or ##any for all namespaces.
A list of any number of namespace URIs.
Specified on what type of Schema component does the qname mapping apply:
- type - on global types with that QName and "local" types contained within attributes/elements
with the specified name
- document-type - on "document" types generated from global elements/attributes with
the specified name
- accessor-element - on getters/setters generated from elements with the specified name
- accessor-attribute - on getters/setters generated from attributes with the specified name
A list of namespace URIs.
A list of namespace URIs, with ##local for no-uri; or ##any for all URIs.
The name of the handler class for this user type.
The handler must contain public static methods for
translating the user type to and from the derived simple type.
Example:
- qname example:uuid restricts xs:string
- javaname is java.util.UUID
- handler interface must have signatures:
public void encodeUuid(UUID obj, SimpleValue target)
public UUID decodeUuid(SimpleValue obj)
The extension interface (it has to be on the classpath).
All the generated types in this domain will implement this interface,
the calls will be redirected to the handler.
The name of the handler class for this extension interface.
The handler must contain public static methods for each method
in the interface, and they have to have the following signature.
Example:
- method in the extension interface:
public String foo(String s)
- method in the handler:
public static String foo(XmlObject xo, String s)
The extension interface name (it has to be on the classpath).
preSet and postSet calls will get generated in the implementation classes. (Only for setter methods).
The name of the handler class for preSet and postSet methods.
The handler must contain the following public static methods.
public static boolean preSet(int opType, XmlObject xo, QName prop, boolean isAttr, int index)
{
...
return true; // true to execute store implementation code, false to skip it
}
public static void postSet(int opType, XmlObject xo, QName prop, boolean isAttr, int index)
{...}
'*' or a list of generated java types (interfaces) that reprezents this extension domain.
A list of generated java interface names or '*' for all interfaces.