Class ExportScheme

All Implemented Interfaces:
Serializable

public class ExportScheme
extends ExperimentObject
This class allows creating a standard output scheme.
Author:
Marc Vaudel
See Also:
Serialized Form
  • Constructor Details

    • ExportScheme

      public ExportScheme()
      Empty default constructor
    • ExportScheme

      public ExportScheme​(String name, boolean editable, HashMap<String,​ArrayList<ExportFeature>> exportFeatures, String separator, boolean indexes, boolean header, int separationLines, boolean includeSectionTitles, boolean validatedOnly, boolean includeDecoys, String mainTitle)
      Constructor. Here sections will appear in a random order.
      Parameters:
      name - the name of the scheme
      editable - a boolean indicating whether the scheme can be edited by the user
      exportFeatures - list of features to be included in the report
      separator - the column separator to be used
      indexes - indicates whether lines shall be indexed
      header - indicates whether column headers shall be included
      separationLines - the number of lines to use for section separation
      includeSectionTitles - indicates whether section titles shall be used
      mainTitle - the title of the report
      validatedOnly - Indicates whether only validated matches should be included
      includeDecoys - Indicates whether decoy matches should be included
    • ExportScheme

      public ExportScheme​(String name, boolean editable, ArrayList<String> sectionList, HashMap<String,​ArrayList<ExportFeature>> exportFeatures, String separator, boolean indexes, boolean header, int separationLines, boolean includeSectionTitles, boolean validatedOnly, boolean includeDecoys)
      Constructor. This report will not contain any title.
      Parameters:
      name - the name of the scheme
      editable - a boolean indicating whether the scheme can be edited by the user
      sectionList - ordered list of the sections included in the report
      exportFeatures - list of features to be included in the report
      separator - the column separator to be used
      indexes - indicates whether lines shall be indexed
      header - indicates whether column headers shall be included
      separationLines - the number of lines to use for section separation
      includeSectionTitles - indicates whether section titles shall be used
      validatedOnly - Indicates whether only validated matches should be included
      includeDecoys - Indicates whether decoy matches should be included
    • ExportScheme

      public ExportScheme​(String name, boolean editable, HashMap<String,​ArrayList<ExportFeature>> exportFeatures, String separator, boolean indexes, boolean header, int separationLines, boolean includeSectionTitles, boolean validatedOnly, boolean includeDecoys)
      Constructor. This report will not contain any title and sections will appear in a random order.
      Parameters:
      name - the name of the scheme
      editable - a boolean indicating whether the scheme can be edited by the user
      exportFeatures - list of features to be included in the report
      separator - the column separator to be used
      indexes - indicates whether lines shall be indexed
      header - indicates whether column headers shall be included
      separationLines - the number of lines to use for section separation
      includeSectionTitles - indicates whether section titles shall be used
      validatedOnly - Indicates whether only validated matches should be included
      includeDecoys - Indicates whether decoy matches should be included
  • Method Details

    • getSeparator

      public String getSeparator()
      Returns the column separator.
      Returns:
      the column separator
    • isIndexes

      public boolean isIndexes()
      Indicates whether lines shall be indexed.
      Returns:
      a boolean indicating whether lines shall be indexed
    • isHeader

      public boolean isHeader()
      Indicates whether column header shall be used.
      Returns:
      a boolean indicating whether column header shall be used
    • getSeparationLines

      public int getSeparationLines()
      Returns the number of lines to be used to separate the sections.
      Returns:
      the number of lines to be used to separate the sections
    • isIncludeSectionTitles

      public boolean isIncludeSectionTitles()
      Indicates whether section titles shall be used.
      Returns:
      a boolean indicating whether section titles shall be used
    • getSections

      public ArrayList<String> getSections()
      returns the list of sections to be included in the scheme.
      Returns:
      the list of sections to be included in the scheme
    • getExportFeatures

      public ArrayList<ExportFeature> getExportFeatures​(String section)
      Returns the export features to be included in the given section.
      Parameters:
      section - the section of interest
      Returns:
      the list of export features to export in this section
    • setExportFeatures

      public void setExportFeatures​(String section, ArrayList<ExportFeature> exportFeatures)
      Sets the export features of a given section. If a section already exists it will be silently overwritten.
      Parameters:
      section - the name of the section
      exportFeatures - the export features to include in that section
    • addExportFeature

      public void addExportFeature​(String section, ExportFeature exportFeature)
      Adds an export feature to the desired section. If the section does not exist it will be created.
      Parameters:
      section - the name of the section
      exportFeature - the export feature to add
    • removeSection

      public void removeSection​(String sectionName)
      Removes an entire section from the mapping.
      Parameters:
      sectionName - the section name
    • getMainTitle

      public String getMainTitle()
      Returns the main title of the report. Null if none.
      Returns:
      the main title of the report.
    • getName

      public String getName()
      Returns the name of the scheme.
      Returns:
      the name of the scheme
    • setName

      public void setName​(String name)
      Sets the name of the scheme.
      Parameters:
      name - the name of the scheme
    • isEditable

      public boolean isEditable()
      Indicates whether the scheme is editable.
      Returns:
      a boolean indicating whether the scheme is editable
    • setEditable

      public void setEditable​(boolean editable)
      Sets whether the scheme is editable.
      Parameters:
      editable - a boolean indicating whether the scheme shall be editable
    • isValidatedOnly

      public Boolean isValidatedOnly()
      Indicates whether only validated results should be exported.
      Returns:
      whether only validated results should be exported
    • setValidatedOnly

      public void setValidatedOnly​(Boolean validatedOnly)
      Sets whether only validated results should be exported.
      Parameters:
      validatedOnly - whether only validated results should be exported
    • isIncludeDecoy

      public Boolean isIncludeDecoy()
      Indicates whether decoy hits should be included.
      Returns:
      whether decoy hits should be included
    • setIncludeDecoy

      public void setIncludeDecoy​(Boolean includeDecoy)
      Sets whether decoy hits should be included.
      Parameters:
      includeDecoy - whether decoy hits should be included