Package com.compomics.util.io.export
Class ExportScheme
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.io.export.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
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ExportScheme()
Empty default constructorExportScheme(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.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.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. -
Method Summary
Modifier and Type Method Description void
addExportFeature(String section, ExportFeature exportFeature)
Adds an export feature to the desired section.ArrayList<ExportFeature>
getExportFeatures(String section)
Returns the export features to be included in the given section.String
getMainTitle()
Returns the main title of the report.String
getName()
Returns the name of the scheme.ArrayList<String>
getSections()
returns the list of sections to be included in the scheme.int
getSeparationLines()
Returns the number of lines to be used to separate the sections.String
getSeparator()
Returns the column separator.boolean
isEditable()
Indicates whether the scheme is editable.boolean
isHeader()
Indicates whether column header shall be used.Boolean
isIncludeDecoy()
Indicates whether decoy hits should be included.boolean
isIncludeSectionTitles()
Indicates whether section titles shall be used.boolean
isIndexes()
Indicates whether lines shall be indexed.Boolean
isValidatedOnly()
Indicates whether only validated results should be exported.void
removeSection(String sectionName)
Removes an entire section from the mapping.void
setEditable(boolean editable)
Sets whether the scheme is editable.void
setExportFeatures(String section, ArrayList<ExportFeature> exportFeatures)
Sets the export features of a given section.void
setIncludeDecoy(Boolean includeDecoy)
Sets whether decoy hits should be included.void
setName(String name)
Sets the name of the scheme.void
setValidatedOnly(Boolean validatedOnly)
Sets whether only validated results should be exported.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
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 schemeeditable
- a boolean indicating whether the scheme can be edited by the userexportFeatures
- list of features to be included in the reportseparator
- the column separator to be usedindexes
- indicates whether lines shall be indexedheader
- indicates whether column headers shall be includedseparationLines
- the number of lines to use for section separationincludeSectionTitles
- indicates whether section titles shall be usedmainTitle
- the title of the reportvalidatedOnly
- Indicates whether only validated matches should be includedincludeDecoys
- 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 schemeeditable
- a boolean indicating whether the scheme can be edited by the usersectionList
- ordered list of the sections included in the reportexportFeatures
- list of features to be included in the reportseparator
- the column separator to be usedindexes
- indicates whether lines shall be indexedheader
- indicates whether column headers shall be includedseparationLines
- the number of lines to use for section separationincludeSectionTitles
- indicates whether section titles shall be usedvalidatedOnly
- Indicates whether only validated matches should be includedincludeDecoys
- 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 schemeeditable
- a boolean indicating whether the scheme can be edited by the userexportFeatures
- list of features to be included in the reportseparator
- the column separator to be usedindexes
- indicates whether lines shall be indexedheader
- indicates whether column headers shall be includedseparationLines
- the number of lines to use for section separationincludeSectionTitles
- indicates whether section titles shall be usedvalidatedOnly
- Indicates whether only validated matches should be includedincludeDecoys
- Indicates whether decoy matches should be included
-
-
Method Details
-
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
returns the list of sections to be included in the scheme.- Returns:
- the list of sections to be included in the scheme
-
getExportFeatures
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
Sets the export features of a given section. If a section already exists it will be silently overwritten.- Parameters:
section
- the name of the sectionexportFeatures
- the export features to include in that section
-
addExportFeature
Adds an export feature to the desired section. If the section does not exist it will be created.- Parameters:
section
- the name of the sectionexportFeature
- the export feature to add
-
removeSection
Removes an entire section from the mapping.- Parameters:
sectionName
- the section name
-
getMainTitle
Returns the main title of the report. Null if none.- Returns:
- the main title of the report.
-
getName
Returns the name of the scheme.- Returns:
- the name of the scheme
-
setName
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
Indicates whether only validated results should be exported.- Returns:
- whether only validated results should be exported
-
setValidatedOnly
Sets whether only validated results should be exported.- Parameters:
validatedOnly
- whether only validated results should be exported
-
isIncludeDecoy
Indicates whether decoy hits should be included.- Returns:
- whether decoy hits should be included
-
setIncludeDecoy
Sets whether decoy hits should be included.- Parameters:
includeDecoy
- whether decoy hits should be included
-