ModeShape Distribution 3.0.0.Beta4

Class DocumentValidationMapper

  extended by org.infinispan.schematic.internal.DocumentValidationMapper
All Implemented Interfaces:
Serializable, org.infinispan.distexec.mapreduce.Mapper<String,SchematicEntry,String,SchemaLibrary.Results>

public class DocumentValidationMapper
extends Object
implements org.infinispan.distexec.mapreduce.Mapper<String,SchematicEntry,String,SchemaLibrary.Results>

A Mapper implementation that validates JSON Documents within Infinispan's Map-Reduce framework.

See Also:
Serialized Form

Constructor Summary
DocumentValidationMapper(DocumentLibrary schemaLibrary, String defaultSchemaUri)
          Create a new instance of the document validation Mapper.
Method Summary
 void map(String key, SchematicEntry value, org.infinispan.distexec.mapreduce.Collector<String,SchemaLibrary.Results> collector)
 SchemaLibrary.Results validate(String key, SchematicEntry value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public DocumentValidationMapper(DocumentLibrary schemaLibrary,
                                String defaultSchemaUri)
Create a new instance of the document validation Mapper.

schemaLibrary - the serializable document library containing all required/available JSON Schema documents; may not be null
defaultSchemaUri - 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 validated
Method Detail


public void map(String key,
                SchematicEntry value,
                org.infinispan.distexec.mapreduce.Collector<String,SchemaLibrary.Results> collector)
Specified by:
map in interface org.infinispan.distexec.mapreduce.Mapper<String,SchematicEntry,String,SchemaLibrary.Results>


public SchemaLibrary.Results validate(String key,
                                      SchematicEntry value)

ModeShape Distribution 3.0.0.Beta4

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.