public final class MetaSchema extends Object
This class centralizes all elements necessary to define a working metaschema. Its elements are:
$schema
;This is the base for all metaschema customizations you might want to do,
such as adding custom keywords and format attributes. You can either build
a completely new metaschema (using builder()
or base yourself on an
already existing metaschema (using basedOn(BuiltinSchemas)
).
Modifier and Type | Class and Description |
---|---|
static class |
MetaSchema.Builder |
Modifier and Type | Method and Description |
---|---|
static MetaSchema.Builder |
basedOn(BuiltinSchemas builtin)
Return a new builder based on an existing, builtin metaschema
|
static MetaSchema.Builder |
builder()
Return a new builder for a totally empty metaschema
|
static MetaSchema |
copyOf(BuiltinSchemas builtin)
Return a complete copy of a builtin metaschema
|
JsonRef |
getDollarSchema()
Return the URI of that metaschema
|
Map<String,FormatAttribute> |
getFormatAttributes()
Return the list of format attributes for that metaschema
|
Map<String,SyntaxChecker> |
getSyntaxCheckers()
Return the list of syntax checkers for that metaschema
|
Map<String,Class<? extends KeywordValidator>> |
getValidators()
Return the list of keyword validators for that metaschema
|
public static MetaSchema.Builder builder()
MetaSchema.Builder
public static MetaSchema.Builder basedOn(BuiltinSchemas builtin)
builtin
- the builtin metaschema used as a baseMetaSchema.Builder
public static MetaSchema copyOf(BuiltinSchemas builtin)
builtin
- the builtin metaschemapublic JsonRef getDollarSchema()
JsonRef
public Map<String,Class<? extends KeywordValidator>> getValidators()
public Map<String,SyntaxChecker> getSyntaxCheckers()
public Map<String,FormatAttribute> getFormatAttributes()
Copyright © 2013. All Rights Reserved.