java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_data.TestCase

public class TestCase extends Object
A TestCase is an individual matching task that may be a component of a Track.
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • name

      private final String name
      This is the identifier for the test case
    • track

      private Track track
      A test case always belongs to a track.
    • source

      private final URI source
      URI pointing to the source file for matching.
    • target

      private final URI target
      URI pointing to the target file for matching.
    • reference

      private final URI reference
      URI pointing to the reference file.
    • parsedReference

      private Alignment parsedReference
      The parsed reference which is initialized lazily.
    • inputAlignment

      private URI inputAlignment
      Input alignment for the matcher. It is null in case there is no inputAlignment.
    • parsedInputAlignment

      private Alignment parsedInputAlignment
      The parsed input alignment which is initialized lazily.
    • evaluationExclusionAlignment

      private URI evaluationExclusionAlignment
      Alignment of correspondences which should be removed from the matcher during evaluation. This could be used to create a test case with a sampled reference alignment and complete mapping which does not evaluate correspondences which are sampled to be in the input alignment.
    • parsedEvaluationExclusionAlignment

      private Alignment parsedEvaluationExclusionAlignment
      The parsed version of the alignment of correspondences which should be removed from the matcher during evaluation. This could be used to create a test case with a sampled reference alignment and complete mapping which does not evaluate correspondences which are sampled to be in the input alignment.
    • goldStandardCompleteness

      private GoldStandardCompleteness goldStandardCompleteness
      How complete is the gold standard for this test case.
    • parameters

      private URI parameters
      URI pointing to the parameter file. Can be null (which means no parameters at all). The format can currently be JSON and YAML. The available keys are listed in ParameterConfigKeys
  • Constructor Details

    • TestCase

      public TestCase(String name, URI source, URI target, URI reference, Track track, URI inputAlignment, GoldStandardCompleteness goldStandardCompleteness, URI parameters, URI evaluationExclusionAlignment)
      Constructor
      Parameters:
      name - Name of the test case.
      source - URI to the source ontology.
      target - URI to the target ontology.
      reference - URI to the alignment reference file.
      track - The track to which the test case belongs.
      inputAlignment - The input alignment for the matcher.
      goldStandardCompleteness - How complete is the gold standard for this test case.
      parameters - the parameters which the matcher get.
      evaluationExclusionAlignment - the alignment which should be removed from system alignment during eval.
    • TestCase

      public TestCase(String name, URI source, URI target, URI reference, Track track)
      Constructor with a complete gold standard and no input alignment.
      Parameters:
      name - Name of the test case.
      source - URI to the source ontology.
      target - URI to the target ontology.
      reference - URI to the alignment reference file.
      track - The track to which the test case belongs.
  • Method Details

    • setTrack

      void setTrack(Track track)
    • getName

      public String getName()
    • getTrack

      public Track getTrack()
    • getSource

      public URI getSource()
    • getTarget

      public URI getTarget()
    • getReference

      public URI getReference()
    • getInputAlignment

      public URI getInputAlignment()
    • getGoldStandardCompleteness

      public GoldStandardCompleteness getGoldStandardCompleteness()
    • getParameters

      public URI getParameters()
    • getEvaluationExclusionAlignment

      public URI getEvaluationExclusionAlignment()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getSourceOntology

      public <T> T getSourceOntology(Class<T> clazz)
      Get the source ontology.
      Type Parameters:
      T - Type of the ontology class e.g. OntModel
      Parameters:
      clazz - The result type that is expected.
      Returns:
      Source ontology in the specified format.
    • getSourceOntology

      public <T> T getSourceOntology(Class<T> clazz, Properties parameters)
      Get the source ontology.
      Type Parameters:
      T - Type of the ontology class e.g. OntModel
      Parameters:
      clazz - The result type that is expected.
      parameters - parameters for the transformation of URL to corresponding model type.
      Returns:
      Source ontology in the specified format.
    • getTargetOntology

      public <T> T getTargetOntology(Class<T> clazz)
      Get the target ontology.
      Type Parameters:
      T - Type of the ontology class e.g. OntModel
      Parameters:
      clazz - The result type that is expected.
      Returns:
      Target ontology in the specified format.
    • getTargetOntology

      public <T> T getTargetOntology(Class<T> clazz, Properties parameters)
      Get the target ontology.
      Type Parameters:
      T - Type of the ontology class e.g. OntModel
      Parameters:
      clazz - The result type that is expected.
      parameters - parameters for the transformation of URL to corresponding model type.
      Returns:
      Target ontology in the specified format.
    • getParsedReferenceAlignment

      public Alignment getParsedReferenceAlignment()
      This method parses the reference alignment and returns it. If called again, a cached parsed instance will be returned.
      Returns:
      Parsed reference Alignment.
    • getParsedInputAlignment

      public Alignment getParsedInputAlignment()
      This method parses the input alignment and returns it. If called again, a cached parsed instance will be returned.
      Returns:
      Parsed input Alignment (this is not null - but maybe an empty alignment).
    • getParsedEvaluationExclusionAlignment

      public Alignment getParsedEvaluationExclusionAlignment()
      Returns the parsed version of the alignment of correspondences which should be removed from the matcher during evaluation.
      Returns:
      the alignment which should be removed from system during eval (this is not null - but maybe an empty alignment).
    • getParsedParameters

      public <T> T getParsedParameters(Class<T> type)
      This method parses the parameters and returns it in the given class type. If no parameters are given, then a new instance of the required class is returned (if possible).
      Type Parameters:
      T - the type of parameter class
      Parameters:
      type - the requested type
      Returns:
      Parsed parameters.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object