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

Code
Comments
Other
Rev Date Author Line
5238 09 Feb 10 nicklas 1 /**
5238 09 Feb 10 nicklas 2   $Id$
5238 09 Feb 10 nicklas 3
5238 09 Feb 10 nicklas 4   Copyright (C) 2010 Nicklas Nordborg
5238 09 Feb 10 nicklas 5
5238 09 Feb 10 nicklas 6   This file is part of BASE - BioArray Software Environment.
5238 09 Feb 10 nicklas 7   Available at http://base.thep.lu.se/
5238 09 Feb 10 nicklas 8
5238 09 Feb 10 nicklas 9   BASE is free software; you can redistribute it and/or
5238 09 Feb 10 nicklas 10   modify it under the terms of the GNU General Public License
5238 09 Feb 10 nicklas 11   as published by the Free Software Foundation; either version 3
5238 09 Feb 10 nicklas 12   of the License, or (at your option) any later version.
5238 09 Feb 10 nicklas 13
5238 09 Feb 10 nicklas 14   BASE is distributed in the hope that it will be useful,
5238 09 Feb 10 nicklas 15   but WITHOUT ANY WARRANTY; without even the implied warranty of
5238 09 Feb 10 nicklas 16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5238 09 Feb 10 nicklas 17   GNU General Public License for more details.
5238 09 Feb 10 nicklas 18
5238 09 Feb 10 nicklas 19   You should have received a copy of the GNU General Public License
5238 09 Feb 10 nicklas 20   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 30   Implementors are responsible for importing extra files specified in
5238 09 Feb 10 nicklas 31   the BFS metadata file into the BASE file system.
5238 09 Feb 10 nicklas 32
5238 09 Feb 10 nicklas 33   @author Nicklas
5238 09 Feb 10 nicklas 34   @since 2.15
5238 09 Feb 10 nicklas 35   @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 40     Import the file data into a file in the BASE file system. The 
5238 09 Feb 10 nicklas 41     {@link BfsImporter} will call this method once for each extra 
5238 09 Feb 10 nicklas 42     file (entries starting with 'x-') in the metadata file.
5238 09 Feb 10 nicklas 43     The implementation is supposed to create a file in the BASE file
5238 09 Feb 10 nicklas 44     system or link to an existing file. The returned file will be 
5238 09 Feb 10 nicklas 45     automatically linked with the child bioassay set.
5238 09 Feb 10 nicklas 46     
5238 09 Feb 10 nicklas 47     @param filename The filename of the file that is being imported
5238 09 Feb 10 nicklas 48     @param locator A locator implementation that should be used to
5238 09 Feb 10 nicklas 49       find the file data if needed
5238 09 Feb 10 nicklas 50     @return The file in the BASE file system or null if no file was created
5238 09 Feb 10 nicklas 51     @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 }