All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentripplanner.netex.index.api.HMapValidationRule Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
package org.opentripplanner.netex.index.api;

import org.opentripplanner.graph_builder.DataImportIssue;

/**
 * This interface is used to make validation rules which can be passed to a hierarchical map. The
 * rule is applied to all local elements. Depending on the validation status on of 3 actions is
 * performed for each element in the map:
 * 
    *
  1. * OK - nothing is done *
  2. *
  3. * WARN - A warning message is passed on to the log message consumer. *
  4. *
  5. * DISCARD - The key/value pair is removed from the local map, and a waring is passed on to * the log message consumer. *
  6. *
*/ public interface HMapValidationRule { /** * Validate and return status, the caller will take the appropriate acction according to the * retuned status. */ Status validate(V value); /** * The rule should provide a log message to use if the validation fails. */ DataImportIssue logMessage(K key, V value); enum Status { /** Element is OK. */ OK, /** Log warning */ WARN, /** Log warning and remove element from HierarchicalMap. */ DISCARD, } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy