001/*
002 * To change this template, choose Tools | Templates
003 * and open the template in the editor.
004 */
005
006package org.biojavax.bio.seq.io;
007
008/**
009 * This class is used by <code>FastaFormat</code> to determine which fields are in the 
010 * fasta header. By default they all are except for the sequence name. This is for
011 * compliance with fasta files that come from Genbank where the name is derived
012 * from the accession number so need not be repeated.
013 * The class can be used to customise
014 * what appears. Eg if you only want the accession set everything else false.
015 * Note that if fields in the <code>RichSequence</code> being parsed by the 
016 * <code>FastaFormat</code> object then they may not be in the header even if
017 * they are specified in this class. 
018 * @author Mark Schreiber
019 * @since 1.6
020 */
021public class FastaHeader {
022    private boolean showIdentifier = true;
023    private boolean showNamespace = true;
024    private boolean showAccession = true;
025    private boolean showVersion = true;
026    private boolean showName = false;
027    private boolean showDescription = true;
028
029    public boolean isShowIdentifier() {
030        return showIdentifier;
031    }
032
033    public void setShowIdentifier(boolean showIdentifier) {
034        this.showIdentifier = showIdentifier;
035    }
036
037    public boolean isShowNamespace() {
038        return showNamespace;
039    }
040
041    public void setShowNamespace(boolean showNamespace) {
042        this.showNamespace = showNamespace;
043    }
044
045    public boolean isShowAccession() {
046        return showAccession;
047    }
048
049    public void setShowAccession(boolean showAccession) {
050        this.showAccession = showAccession;
051    }
052
053    public boolean isShowVersion() {
054        return showVersion;
055    }
056
057    /**
058     * Determines if the version number of a sequence should be displayed. If
059     * there is no accession this may not make much sense.
060     * @param showVersion
061     */
062    public void setShowVersion(boolean showVersion) {
063        this.showVersion = showVersion;
064    }
065
066    public boolean isShowName() {
067        return showName;
068    }
069
070    public void setShowName(boolean showName) {
071        this.showName = showName;
072    }
073
074    public boolean isShowDescription() {
075        return showDescription;
076    }
077
078    public void setShowDescription(boolean showDescription) {
079        this.showDescription = showDescription;
080    }
081}