5238 |
09 Feb 10 |
nicklas |
1 |
/** |
5238 |
09 Feb 10 |
nicklas |
$Id$ |
5238 |
09 Feb 10 |
nicklas |
3 |
|
5238 |
09 Feb 10 |
nicklas |
Copyright (C) 2010 Nicklas Nordborg |
5238 |
09 Feb 10 |
nicklas |
5 |
|
5238 |
09 Feb 10 |
nicklas |
This file is part of BASE - BioArray Software Environment. |
5238 |
09 Feb 10 |
nicklas |
Available at http://base.thep.lu.se/ |
5238 |
09 Feb 10 |
nicklas |
8 |
|
5238 |
09 Feb 10 |
nicklas |
BASE is free software; you can redistribute it and/or |
5238 |
09 Feb 10 |
nicklas |
modify it under the terms of the GNU General Public License |
5238 |
09 Feb 10 |
nicklas |
as published by the Free Software Foundation; either version 3 |
5238 |
09 Feb 10 |
nicklas |
of the License, or (at your option) any later version. |
5238 |
09 Feb 10 |
nicklas |
13 |
|
5238 |
09 Feb 10 |
nicklas |
BASE is distributed in the hope that it will be useful, |
5238 |
09 Feb 10 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
5238 |
09 Feb 10 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5238 |
09 Feb 10 |
nicklas |
GNU General Public License for more details. |
5238 |
09 Feb 10 |
nicklas |
18 |
|
5238 |
09 Feb 10 |
nicklas |
You should have received a copy of the GNU General Public License |
5238 |
09 Feb 10 |
nicklas |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
5238 |
09 Feb 10 |
nicklas |
21 |
*/ |
5238 |
09 Feb 10 |
nicklas |
22 |
package net.sf.basedb.util.bfs; |
5238 |
09 Feb 10 |
nicklas |
23 |
|
5238 |
09 Feb 10 |
nicklas |
24 |
import java.io.IOException; |
5238 |
09 Feb 10 |
nicklas |
25 |
|
5238 |
09 Feb 10 |
nicklas |
26 |
import net.sf.basedb.core.File; |
5238 |
09 Feb 10 |
nicklas |
27 |
import net.sf.basedb.util.importer.spotdata.BfsImporter; |
5238 |
09 Feb 10 |
nicklas |
28 |
|
5238 |
09 Feb 10 |
nicklas |
29 |
/** |
5238 |
09 Feb 10 |
nicklas |
Implementors are responsible for importing extra files specified in |
5238 |
09 Feb 10 |
nicklas |
the BFS metadata file into the BASE file system. |
5238 |
09 Feb 10 |
nicklas |
32 |
|
5238 |
09 Feb 10 |
nicklas |
@author Nicklas |
5238 |
09 Feb 10 |
nicklas |
@since 2.15 |
5238 |
09 Feb 10 |
nicklas |
@base.modified $Date$ |
5238 |
09 Feb 10 |
nicklas |
36 |
*/ |
5238 |
09 Feb 10 |
nicklas |
37 |
public interface ExtraFileImporter |
5238 |
09 Feb 10 |
nicklas |
38 |
{ |
5238 |
09 Feb 10 |
nicklas |
39 |
/** |
5238 |
09 Feb 10 |
nicklas |
Import the file data into a file in the BASE file system. The |
5238 |
09 Feb 10 |
nicklas |
{@link BfsImporter} will call this method once for each extra |
5238 |
09 Feb 10 |
nicklas |
file (entries starting with 'x-') in the metadata file. |
5238 |
09 Feb 10 |
nicklas |
The implementation is supposed to create a file in the BASE file |
5238 |
09 Feb 10 |
nicklas |
system or link to an existing file. The returned file will be |
5238 |
09 Feb 10 |
nicklas |
automatically linked with the child bioassay set. |
5238 |
09 Feb 10 |
nicklas |
46 |
|
5238 |
09 Feb 10 |
nicklas |
@param filename The filename of the file that is being imported |
5238 |
09 Feb 10 |
nicklas |
@param locator A locator implementation that should be used to |
5238 |
09 Feb 10 |
nicklas |
find the file data if needed |
5238 |
09 Feb 10 |
nicklas |
@return The file in the BASE file system or null if no file was created |
5238 |
09 Feb 10 |
nicklas |
@throws IOException If there is a problem reading the file data |
5238 |
09 Feb 10 |
nicklas |
52 |
*/ |
5238 |
09 Feb 10 |
nicklas |
53 |
public File importExtraFile(String filename, InputStreamLocator locator) |
5238 |
09 Feb 10 |
nicklas |
54 |
throws IOException; |
5238 |
09 Feb 10 |
nicklas |
55 |
} |