Class JsonSchemaGenerator
- java.lang.Object
-
- gov.nist.secauto.metaschema.schemagen.AbstractSchemaGenerator<com.fasterxml.jackson.core.JsonGenerator,gov.nist.secauto.metaschema.schemagen.json.datatype.JsonDatatypeManager,gov.nist.secauto.metaschema.schemagen.json.impl.JsonGenerationState>
-
- gov.nist.secauto.metaschema.schemagen.json.JsonSchemaGenerator
-
- All Implemented Interfaces:
ISchemaGenerator
public class JsonSchemaGenerator extends AbstractSchemaGenerator<com.fasterxml.jackson.core.JsonGenerator,gov.nist.secauto.metaschema.schemagen.json.datatype.JsonDatatypeManager,gov.nist.secauto.metaschema.schemagen.json.impl.JsonGenerationState>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface gov.nist.secauto.metaschema.schemagen.ISchemaGenerator
ISchemaGenerator.SchemaFormat
-
-
Constructor Summary
Constructors Constructor Description JsonSchemaGenerator()JsonSchemaGenerator(com.fasterxml.jackson.core.JsonFactory jsonFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidgenerateSchema(gov.nist.secauto.metaschema.schemagen.json.impl.JsonGenerationState state)Called to generate the actual schema content.com.fasterxml.jackson.core.JsonFactorygetJsonFactory()protected gov.nist.secauto.metaschema.schemagen.json.impl.JsonGenerationStatenewGenerationState(IModule module, com.fasterxml.jackson.core.JsonGenerator schemaWriter, IConfiguration<SchemaGenerationFeature<?>> configuration)Create a new schema generation state object.protected com.fasterxml.jackson.core.JsonGeneratornewWriter(Writer out)Create a new writer to use to write the schema.-
Methods inherited from class gov.nist.secauto.metaschema.schemagen.AbstractSchemaGenerator
analyzeDefinitions, generateFromModule
-
-
-
-
Constructor Detail
-
JsonSchemaGenerator
public JsonSchemaGenerator()
-
JsonSchemaGenerator
public JsonSchemaGenerator(@NonNull com.fasterxml.jackson.core.JsonFactory jsonFactory)
-
-
Method Detail
-
getJsonFactory
@NonNull public com.fasterxml.jackson.core.JsonFactory getJsonFactory()
-
newWriter
protected com.fasterxml.jackson.core.JsonGenerator newWriter(Writer out)
Description copied from class:AbstractSchemaGeneratorCreate a new writer to use to write the schema.- Specified by:
newWriterin classAbstractSchemaGenerator<com.fasterxml.jackson.core.JsonGenerator,gov.nist.secauto.metaschema.schemagen.json.datatype.JsonDatatypeManager,gov.nist.secauto.metaschema.schemagen.json.impl.JsonGenerationState>- Parameters:
out- theWriterto write the schema content to- Returns:
- the schema writer
-
newGenerationState
protected gov.nist.secauto.metaschema.schemagen.json.impl.JsonGenerationState newGenerationState(IModule module, com.fasterxml.jackson.core.JsonGenerator schemaWriter, IConfiguration<SchemaGenerationFeature<?>> configuration)
Description copied from class:AbstractSchemaGeneratorCreate a new schema generation state object.- Specified by:
newGenerationStatein classAbstractSchemaGenerator<com.fasterxml.jackson.core.JsonGenerator,gov.nist.secauto.metaschema.schemagen.json.datatype.JsonDatatypeManager,gov.nist.secauto.metaschema.schemagen.json.impl.JsonGenerationState>- Parameters:
module- the Metaschema module to generate the schema forschemaWriter- the writer to use to write the schemaconfiguration- the generation configuration- Returns:
- the schema generation state used for context and writing
-
generateSchema
protected void generateSchema(gov.nist.secauto.metaschema.schemagen.json.impl.JsonGenerationState state)
Description copied from class:AbstractSchemaGeneratorCalled to generate the actual schema content.- Specified by:
generateSchemain classAbstractSchemaGenerator<com.fasterxml.jackson.core.JsonGenerator,gov.nist.secauto.metaschema.schemagen.json.datatype.JsonDatatypeManager,gov.nist.secauto.metaschema.schemagen.json.impl.JsonGenerationState>- Parameters:
state- the generation state object
-
-