Class MapSchemaMapper

java.lang.Object
com.networknt.schema.resource.MapSchemaMapper
All Implemented Interfaces:
SchemaMapper

public class MapSchemaMapper extends Object implements SchemaMapper
Map implementation of SchemaMapper.
  • Field Details

  • Constructor Details

    • MapSchemaMapper

      public MapSchemaMapper(Map<String,String> mappings)
    • MapSchemaMapper

      public MapSchemaMapper(Function<String,String> mappings)
    • MapSchemaMapper

      public MapSchemaMapper(Predicate<String> test, Function<String,String> mappings)
      Apply the mapping function if the predicate is true.
      Parameters:
      test - the predicate
      mappings - the mapping
  • Method Details

    • map

      public AbsoluteIri map(AbsoluteIri absoluteIRI)
      Description copied from interface: SchemaMapper
      Maps an ID indicated by an absolute IRI to a retrieval IRI.
      Specified by:
      map in interface SchemaMapper
      Parameters:
      absoluteIRI - the ID
      Returns:
      the retrieval IRI or null if this mapper doesn't support the mapping