public class SchemaReader extends Object
| Constructor and Description |
|---|
SchemaReader() |
| Modifier and Type | Method and Description |
|---|---|
static SchemaReader |
getInstance()
Creates an instance if not yet present
|
Schema |
getSchema(String id)
Gets the schema from the cache
|
Schema |
getSchemaByResourceType(String resourceType) |
Map<String,Object> |
validate(Schema schema,
Map<String,Object> map,
boolean checkRequired)
Validates
|
public static SchemaReader getInstance()
public Schema getSchema(String id)
id - the id of the schemapublic Map<String,Object> validate(Schema schema, Map<String,Object> map, boolean checkRequired) throws SchemaException
schema - the schema to validatemap - the map to be validatedcheckRequired - boolean indicating if the required attributes have to be checkedSchemaException - exception containing the errorsCopyright © 2019–2020 mogo. All rights reserved.