001    /*
002     *                    BioJava development code
003     *
004     * This code may be freely distributed and modified under the
005     * terms of the GNU Lesser General Public Licence.  This should
006     * be distributed with the code.  If you do not have a copy,
007     * see:
008     *
009     *      http://www.gnu.org/copyleft/lesser.html
010     *
011     * Copyright for this code is held jointly by the individual
012     * authors.  These should be listed in @author doc comments.
013     *
014     * For more information on the BioJava project and its aims,
015     * or to join the biojava-l mailing list, visit the home page
016     * at:
017     *
018     *      http://www.biojava.org/
019     *
020     * Created on DATE
021     *
022     */
023    package org.biojava3.core.sequence;
024    
025    /**
026     * A static class that provides optimization hints for memory or performance handling of sequence data.
027     * If you are working with genomic sequence data and the use case is sub sequence then the sequence proxy loader
028     * implementation may do file reads for each sub-sequence request instead of loading everything into memory.
029     * If a large collection of protein sequences is being loaded from a fasta file but only a few sequences will be selected
030     * then the file loader could create a sequence proxy loader that retains the offset in the file for each sequence
031     * and it is loaded when the sequence data is requested. This way you could load a pointer to all sequences but delay
032     * loading until the user actually needs the data. The sequence loader could also have an internal sequence management
033     * algorithm that goes through and returns sequence data freeing up memory where a future request for sequence data will
034     * then be reloaded.
035     *
036     * @author Scooter Willis
037     */
038    public class SequenceOptimizationHints {
039    
040        /**
041         * @return the sequenceUsage
042         */
043        public static SequenceUsage getSequenceUsage() {
044            return sequenceUsage;
045        }
046    
047        /**
048         * @param aSequenceUsage the sequenceUsage to set
049         */
050        public static void setSequenceUsage(SequenceUsage aSequenceUsage) {
051            sequenceUsage = aSequenceUsage;
052        }
053    
054        /**
055         * @return the sequenceColection
056         */
057        public static SequenceCollection getSequenceCollection() {
058            return sequenceCollection;
059        }
060    
061        /**
062         * @param aSequenceColection the sequenceColection to set
063         */
064        public static void setSequenceCollection(SequenceCollection aSequenceColection) {
065            sequenceCollection = aSequenceColection;
066        }
067    
068        public enum SequenceUsage {
069    
070            FULL_SEQUENCE_DATA, SUB_SEQUENCE_DATA, MINIMAL_SEQUENCE_DATA;
071        }
072    
073        public enum SequenceCollection {
074    
075            ALL_SEQUENCES, VARIABLE_SEQUENCES, MINIMINAL_SEQUENCES;
076        }
077    
078        static private SequenceUsage sequenceUsage = SequenceUsage.FULL_SEQUENCE_DATA;
079        static private SequenceCollection sequenceCollection = SequenceCollection.ALL_SEQUENCES;
080    
081    
082    
083        
084    
085    }