5212 |
12 Jan 10 |
nicklas |
1 |
/** |
5212 |
12 Jan 10 |
nicklas |
$Id$ |
5212 |
12 Jan 10 |
nicklas |
3 |
|
5212 |
12 Jan 10 |
nicklas |
Copyright (C) 2009 Nicklas Nordborg |
5212 |
12 Jan 10 |
nicklas |
5 |
|
5212 |
12 Jan 10 |
nicklas |
This file is part of BASE - BioArray Software Environment. |
5212 |
12 Jan 10 |
nicklas |
Available at http://base.thep.lu.se/ |
5212 |
12 Jan 10 |
nicklas |
8 |
|
5212 |
12 Jan 10 |
nicklas |
BASE is free software; you can redistribute it and/or |
5212 |
12 Jan 10 |
nicklas |
modify it under the terms of the GNU General Public License |
5212 |
12 Jan 10 |
nicklas |
as published by the Free Software Foundation; either version 3 |
5212 |
12 Jan 10 |
nicklas |
of the License, or (at your option) any later version. |
5212 |
12 Jan 10 |
nicklas |
13 |
|
5212 |
12 Jan 10 |
nicklas |
BASE is distributed in the hope that it will be useful, |
5212 |
12 Jan 10 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
5212 |
12 Jan 10 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5212 |
12 Jan 10 |
nicklas |
GNU General Public License for more details. |
5212 |
12 Jan 10 |
nicklas |
18 |
|
5212 |
12 Jan 10 |
nicklas |
You should have received a copy of the GNU General Public License |
5212 |
12 Jan 10 |
nicklas |
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 |
File name generators are used together with {@link DataWriterFactory} |
5212 |
12 Jan 10 |
nicklas |
implementations to generate file names for BFS data files. |
5212 |
12 Jan 10 |
nicklas |
27 |
|
5212 |
12 Jan 10 |
nicklas |
@author Nicklas |
5212 |
12 Jan 10 |
nicklas |
@version 2.15 |
5212 |
12 Jan 10 |
nicklas |
@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 |
Get the next file name. This method should never return |
5212 |
12 Jan 10 |
nicklas |
the same file name more than one time (given a single |
5212 |
12 Jan 10 |
nicklas |
implementor instance). The generator implementation should not |
5212 |
12 Jan 10 |
nicklas |
concern itself with the underlying file system or if the file |
5212 |
12 Jan 10 |
nicklas |
already exists or not (this is a task for the {@link DataWriterFactory} |
5212 |
12 Jan 10 |
nicklas |
implementation). |
5212 |
12 Jan 10 |
nicklas |
42 |
|
5212 |
12 Jan 10 |
nicklas |
@param owner The owner of the data in the file |
5212 |
12 Jan 10 |
nicklas |
@param suggestedFilename A default suggested file name (can be null) |
5212 |
12 Jan 10 |
nicklas |
@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 |
} |