Class AbstractSchemaGenerator<T extends AutoCloseable,​D extends gov.nist.secauto.metaschema.schemagen.datatype.IDatatypeManager,​S extends AbstractGenerationState<T,​D>>

    • Method Detail

      • newWriter

        @NonNull
        protected abstract T newWriter​(@NonNull
                                       Writer out)
        Create a new writer to use to write the schema.
        Parameters:
        out - the Writer to write the schema content to
        Returns:
        the schema writer
        Throws:
        SchemaGenerationException - if an error occurred while creating the writer
      • newGenerationState

        @NonNull
        protected abstract S newGenerationState​(@NonNull
                                                IModule module,
                                                @NonNull
                                                T schemaWriter,
                                                @NonNull
                                                IConfiguration<SchemaGenerationFeature<?>> configuration)
        Create a new schema generation state object.
        Parameters:
        module - the Metaschema module to generate the schema for
        schemaWriter - the writer to use to write the schema
        configuration - the generation configuration
        Returns:
        the schema generation state used for context and writing
        Throws:
        SchemaGenerationException - if an error occurred while creating the generation state object
      • generateSchema

        protected abstract void generateSchema​(@NonNull
                                               S generationState)
        Called to generate the actual schema content.
        Parameters:
        generationState - the generation state object