Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.infinispan.schematic.internal
Class DocumentValidationMapper

    java.lang.Object
      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.

Since:
  5.1
Author:
  Randall Hauch (C) 2011 Red Hat Inc.
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

### DocumentValidationMapper

    public DocumentValidationMapper(DocumentLibrary schemaLibrary,
                                    String defaultSchemaUri)

  Create a new instance of the document validation `Mapper`.

  Parameters:
    `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

### map

    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>`

### validate

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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