Class SDOSchemaGenerator


  • public class SDOSchemaGenerator
    extends java.lang.Object

    Purpose SDOSchemaGenerator generates an XSD (returned as a String) from a list of SDO Type objects. Populates an org.eclipse.persistence.internal.oxm.schema.model.Schema object and makes use of org.eclipse.persistence.internal.oxm.schema.SchemaModelProject to marshal the Schema Object to XML.

    See Also:
    XSDHelper
    • Constructor Summary

      Constructors 
      Constructor Description
      SDOSchemaGenerator​(commonj.sdo.helper.HelperContext aContext)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String generate​(java.util.List types, java.util.Map aNamespaceToSchemaLocation)
      Method to generate an XSD.
      java.lang.String generate​(java.util.List types, SchemaLocationResolver aSchemaLocationResolver)
      Method to generate an XSD.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SDOSchemaGenerator

        public SDOSchemaGenerator​(commonj.sdo.helper.HelperContext aContext)
    • Method Detail

      • generate

        public java.lang.String generate​(java.util.List types,
                                         SchemaLocationResolver aSchemaLocationResolver)

        Method to generate an XSD. Note the following:

        • All types must have same URI
        • Referenced types in same URI will also be generated in schema
        • Includes will never be generated
        • Imports will be generated for referenced types in other URIs
        Parameters:
        types - The list of commonj.sdo.Type objects to generate the XSD from
        aSchemaLocationResolver - implementation of the org.eclipse.persistence.sdo.helper.SchemaLocationResolver interface used for getting the value of the schemaLocation attribute of generated imports and includes
        Returns:
        String The generated XSD.
      • generate

        public java.lang.String generate​(java.util.List types,
                                         java.util.Map aNamespaceToSchemaLocation)

        Method to generate an XSD. Note the following:

        • All types must have same URI
        • Referenced types in same URI will also be generated in schema
        • Includes will never be generated
        • Imports will be generated for referenced types in other URIs
        Parameters:
        types - The list of commonj.sdo.Type objects to generate the XSD from
        aNamespaceToSchemaLocation - map of namespaces to schemaLocations used for getting the value of the schemaLocation attribute of generated imports and includes
        Returns:
        String The generated XSD.