Class ResultSetMappingManager

java.lang.Object
cz.cvut.kbss.jopa.query.ResultSetMappingManager

public class ResultSetMappingManager extends Object
Manages result set mappers, which are used to transform query result sets to output based on SparqlResultSetMapping.
  • Constructor Details

    • ResultSetMappingManager

      public ResultSetMappingManager()
  • Method Details

    • addMapper

      public void addMapper(String mappingName, SparqlResultMapper mapper)
      Adds the specified mapper to this manager, so that it can be used later.
      Parameters:
      mappingName - Named of the mapping for which the mapper is added
      mapper - The mapper to register
      Throws:
      IllegalArgumentException - If a mapping with the same name already exists
    • getMapper

      public SparqlResultMapper getMapper(String mappingName)
      Gets mapper for the specified mapping name.
      Parameters:
      mappingName - Name of the mapping
      Returns:
      Matching mapper
      Throws:
      IllegalArgumentException - If there is no mapper for such mapping