Class MappingTSVWriterVisitor

java.lang.Object
org.incenp.obofoundry.sssom.slots.SlotVisitorBase<Mapping>
org.incenp.obofoundry.sssom.MappingTSVWriterVisitor
All Implemented Interfaces:
ISlotVisitor<Mapping>

public class MappingTSVWriterVisitor extends SlotVisitorBase<Mapping>
A visitor to to turn the slots of a Mapping object into a list of values that can be written to a TSV or CSV file.

This class is primarily intended to be used by TSVWriter, but it may be reused whenever mappings need to be serialised into TSV or CSV.

After the slots of a Mapping object have been visited, use the getValues() methods to obtain a list of string values ready to be written to a TSV/CSV files. The values will be in the same order as the order in which the slots have been visited.

  • Constructor Details

    • MappingTSVWriterVisitor

      public MappingTSVWriterVisitor(PrefixManager prefixManager, List<ExtensionDefinition> extraSlots, boolean isCSV)
      Creates a new instance.
      Parameters:
      prefixManager - The prefix manager to use to shorten entity references into their CURIE forms.
      extraSlots - The definitions for the extension slots; if null, any extension slot will be ignored.
      isCSV - If true, the values will be generated so that they can written to a CSV file. The default is to prepare values suitable for writing to a TSV file.
  • Method Details