Interface ValidationSuggestionGenerator


  • public interface ValidationSuggestionGenerator
    An interface for objects that can produce suggestions for a given results graph.
    Author:
    Holger Knublauch
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int addSuggestions​(org.apache.jena.rdf.model.Model results, int maxCount, Function<org.apache.jena.rdf.model.RDFNode,​String> labelFunction)
      Adds dash:suggestion triples for all result resource in the given results Model.
      int addSuggestions​(org.apache.jena.rdf.model.Resource result, int maxCount, Function<org.apache.jena.rdf.model.RDFNode,​String> labelFunction)
      Adds dash:suggestion triples for a given result resource.
      boolean canHandle​(org.apache.jena.rdf.model.Resource result)
      Checks if this is (in principle) capable of adding suggestions for a given result.
    • Method Detail

      • addSuggestions

        int addSuggestions​(org.apache.jena.rdf.model.Model results,
                           int maxCount,
                           Function<org.apache.jena.rdf.model.RDFNode,​String> labelFunction)
        Adds dash:suggestion triples for all result resource in the given results Model.
        Parameters:
        results - the results Model
        maxCount - the maximum number of suggestions to produce per result
        labelFunction - an optional function producing labels of nodes
        Returns:
        the number of suggestions that were created
      • addSuggestions

        int addSuggestions​(org.apache.jena.rdf.model.Resource result,
                           int maxCount,
                           Function<org.apache.jena.rdf.model.RDFNode,​String> labelFunction)
        Adds dash:suggestion triples for a given result resource.
        Parameters:
        result - the sh:ValidationResult to add the suggestions to
        maxCount - the maximum number of suggestions to produce
        labelFunction - an optional function producing labels of nodes
        Returns:
        the number of suggestions that were created
      • canHandle

        boolean canHandle​(org.apache.jena.rdf.model.Resource result)
        Checks if this is (in principle) capable of adding suggestions for a given result.
        Parameters:
        result - the validation result
        Returns:
        true if this can