public class DocumentValidationMapper extends Object implements org.infinispan.distexec.mapreduce.Mapper<String,SchematicEntry,String,SchemaLibrary.Results>
Mapper
implementation that validates JSON Documents
within Infinispan's Map-Reduce
framework.Constructor and Description |
---|
DocumentValidationMapper(DocumentLibrary schemaLibrary,
String defaultSchemaUri)
Create a new instance of the document validation
Mapper . |
Modifier and Type | Method and Description |
---|---|
void |
map(String key,
SchematicEntry value,
org.infinispan.distexec.mapreduce.Collector<String,SchemaLibrary.Results> collector) |
SchemaLibrary.Results |
validate(String key,
SchematicEntry value) |
public DocumentValidationMapper(DocumentLibrary schemaLibrary, String defaultSchemaUri)
Mapper
.schemaLibrary
- the serializable document library containing all required/available JSON Schema documents; may not be
nulldefaultSchemaUri
- the URI of the JSON Schema that should be used for JSON documents that have not been associated with a
schema (via the "schemaUri
" field in the document's metadata); may be null
if JSON documents without a schema reference should be skipped and not validatedpublic void map(String key, SchematicEntry value, org.infinispan.distexec.mapreduce.Collector<String,SchemaLibrary.Results> collector)
map
in interface org.infinispan.distexec.mapreduce.Mapper<String,SchematicEntry,String,SchemaLibrary.Results>
public SchemaLibrary.Results validate(String key, SchematicEntry value)
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.