Class SchemaDomSerializer
java.lang.Object
com.evolveum.midpoint.prism.impl.schema.SchemaDomSerializer
Takes a midPoint Schema definition and produces a XSD schema (in a DOM form).
Great pains were taken to make sure that the output XML is "nice" and human readable.
E.g. the namespace prefixes are unified using the definitions in
SchemaRegistry
.
Please do not ruin this if you would update this class.
Single use class. Not thread safe. Create new instance for each run.
TODO continue with cleanup of this class (using DefinitionFeatures
) eventually- Author:
- lazyman, Radovan Semancik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAnnotation
(QName qname, Boolean value, Element parent) void
addAnnotation
(QName qname, String value, Element parent) Add generic annotation element.void
addEmptyAnnotation
(QName qname, Element parent) void
addTrueAnnotation
(QName qname, boolean value, Element parent) @NotNull Document
Main entry point.
-
Constructor Details
-
SchemaDomSerializer
- Throws:
SchemaException
-
-
Method Details
-
serializeSchema
Main entry point.- Returns:
- XSD schema in DOM form
- Throws:
SchemaException
- error parsing the midPoint schema or converting values
-
addAnnotation
Add generic annotation element.- Parameters:
qname
- QName of the elementvalue
- string value of the elementparent
- element under which the definition will be added
-
addTrueAnnotation
-
addAnnotation
-
addEmptyAnnotation
-