Class SchemaDomSerializer

java.lang.Object
com.evolveum.midpoint.prism.impl.schema.SchemaDomSerializer

public class SchemaDomSerializer extends Object
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 Details

  • Method Details

    • serializeSchema

      @NotNull public @NotNull Document serializeSchema() throws SchemaException
      Main entry point.
      Returns:
      XSD schema in DOM form
      Throws:
      SchemaException - error parsing the midPoint schema or converting values
    • addAnnotation

      public void addAnnotation(QName qname, String value, Element parent)
      Add generic annotation element.
      Parameters:
      qname - QName of the element
      value - string value of the element
      parent - element under which the definition will be added
    • addTrueAnnotation

      public void addTrueAnnotation(QName qname, boolean value, Element parent)
    • addAnnotation

      public void addAnnotation(QName qname, Boolean value, Element parent)
    • addEmptyAnnotation

      public void addEmptyAnnotation(QName qname, Element parent)