src/core/net/sf/basedb/util/bfs/FilenameGenerator.java

Code
Comments
Other
Rev Date Author Line
5212 12 Jan 10 nicklas 1 /**
5212 12 Jan 10 nicklas 2   $Id$
5212 12 Jan 10 nicklas 3
5212 12 Jan 10 nicklas 4   Copyright (C) 2009 Nicklas Nordborg
5212 12 Jan 10 nicklas 5
5212 12 Jan 10 nicklas 6   This file is part of BASE - BioArray Software Environment.
5212 12 Jan 10 nicklas 7   Available at http://base.thep.lu.se/
5212 12 Jan 10 nicklas 8
5212 12 Jan 10 nicklas 9   BASE is free software; you can redistribute it and/or
5212 12 Jan 10 nicklas 10   modify it under the terms of the GNU General Public License
5212 12 Jan 10 nicklas 11   as published by the Free Software Foundation; either version 3
5212 12 Jan 10 nicklas 12   of the License, or (at your option) any later version.
5212 12 Jan 10 nicklas 13
5212 12 Jan 10 nicklas 14   BASE is distributed in the hope that it will be useful,
5212 12 Jan 10 nicklas 15   but WITHOUT ANY WARRANTY; without even the implied warranty of
5212 12 Jan 10 nicklas 16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5212 12 Jan 10 nicklas 17   GNU General Public License for more details.
5212 12 Jan 10 nicklas 18
5212 12 Jan 10 nicklas 19   You should have received a copy of the GNU General Public License
5212 12 Jan 10 nicklas 20   along with BASE. If not, see <http://www.gnu.org/licenses/>.
5212 12 Jan 10 nicklas 21 */
5212 12 Jan 10 nicklas 22 package net.sf.basedb.util.bfs;
5212 12 Jan 10 nicklas 23
5212 12 Jan 10 nicklas 24 /**
5212 12 Jan 10 nicklas 25   File name generators are used together with {@link DataWriterFactory}
5212 12 Jan 10 nicklas 26   implementations to generate file names for BFS data files.
5212 12 Jan 10 nicklas 27
5212 12 Jan 10 nicklas 28   @author Nicklas
5212 12 Jan 10 nicklas 29   @version 2.15
5212 12 Jan 10 nicklas 30   @base.modified $Date$
5212 12 Jan 10 nicklas 31 */
5212 12 Jan 10 nicklas 32 public interface FilenameGenerator<T>
5212 12 Jan 10 nicklas 33 {
5212 12 Jan 10 nicklas 34
5212 12 Jan 10 nicklas 35   /**
5212 12 Jan 10 nicklas 36     Get the next file name. This method should never return
5212 12 Jan 10 nicklas 37     the same file name more than one time (given a single
5212 12 Jan 10 nicklas 38     implementor instance). The generator implementation should not
5212 12 Jan 10 nicklas 39     concern itself with the underlying file system or if the file
5212 12 Jan 10 nicklas 40     already exists or not (this is a task for the {@link DataWriterFactory}
5212 12 Jan 10 nicklas 41     implementation). 
5212 12 Jan 10 nicklas 42     
5212 12 Jan 10 nicklas 43     @param owner The owner of the data in the file
5212 12 Jan 10 nicklas 44     @param suggestedFilename A default suggested file name (can be null)
5212 12 Jan 10 nicklas 45     @return A unique file name
5212 12 Jan 10 nicklas 46   */
5212 12 Jan 10 nicklas 47   public String getNextFilename(T owner, String suggestedFilename);
5212 12 Jan 10 nicklas 48
5212 12 Jan 10 nicklas 49 }