6774 |
17 Mar 15 |
nicklas |
1 |
/** |
6774 |
17 Mar 15 |
nicklas |
$Id$ |
6774 |
17 Mar 15 |
nicklas |
3 |
|
6774 |
17 Mar 15 |
nicklas |
Copyright (C) 2015 Nicklas Nordborg |
6774 |
17 Mar 15 |
nicklas |
5 |
|
6774 |
17 Mar 15 |
nicklas |
This file is part of BASE - BioArray Software Environment. |
6774 |
17 Mar 15 |
nicklas |
Available at http://base.thep.lu.se/ |
6774 |
17 Mar 15 |
nicklas |
8 |
|
6774 |
17 Mar 15 |
nicklas |
BASE is free software; you can redistribute it and/or |
6774 |
17 Mar 15 |
nicklas |
modify it under the terms of the GNU General Public License |
6774 |
17 Mar 15 |
nicklas |
as published by the Free Software Foundation; either version 3 |
6774 |
17 Mar 15 |
nicklas |
of the License, or (at your option) any later version. |
6774 |
17 Mar 15 |
nicklas |
13 |
|
6774 |
17 Mar 15 |
nicklas |
BASE is distributed in the hope that it will be useful, |
6774 |
17 Mar 15 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
6774 |
17 Mar 15 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
6774 |
17 Mar 15 |
nicklas |
GNU General Public License for more details. |
6774 |
17 Mar 15 |
nicklas |
18 |
|
6774 |
17 Mar 15 |
nicklas |
You should have received a copy of the GNU General Public License |
6774 |
17 Mar 15 |
nicklas |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
6774 |
17 Mar 15 |
nicklas |
21 |
*/ |
6774 |
17 Mar 15 |
nicklas |
22 |
package net.sf.basedb.util.listable; |
6774 |
17 Mar 15 |
nicklas |
23 |
|
6774 |
17 Mar 15 |
nicklas |
24 |
import java.util.Set; |
6774 |
17 Mar 15 |
nicklas |
25 |
|
6774 |
17 Mar 15 |
nicklas |
26 |
import net.sf.basedb.core.Item; |
6774 |
17 Mar 15 |
nicklas |
27 |
|
6774 |
17 Mar 15 |
nicklas |
28 |
/** |
6774 |
17 Mar 15 |
nicklas |
Implementations are responsible for transforming a set of source item |
6774 |
17 Mar 15 |
nicklas |
ID:s into a set of related target item ID:s. The rules for transforming |
6774 |
17 Mar 15 |
nicklas |
is up to each implementation. |
6774 |
17 Mar 15 |
nicklas |
32 |
|
6774 |
17 Mar 15 |
nicklas |
@author Nicklas |
6774 |
17 Mar 15 |
nicklas |
@since 3.5 |
6774 |
17 Mar 15 |
nicklas |
35 |
*/ |
6774 |
17 Mar 15 |
nicklas |
36 |
public interface SourceItemTransformer |
6774 |
17 Mar 15 |
nicklas |
37 |
{ |
6774 |
17 Mar 15 |
nicklas |
38 |
|
6774 |
17 Mar 15 |
nicklas |
39 |
/** |
6774 |
17 Mar 15 |
nicklas |
Get the item type of the source items. |
6774 |
17 Mar 15 |
nicklas |
41 |
*/ |
6774 |
17 Mar 15 |
nicklas |
42 |
public Item getSourceItemType(); |
6774 |
17 Mar 15 |
nicklas |
43 |
|
6774 |
17 Mar 15 |
nicklas |
44 |
|
6774 |
17 Mar 15 |
nicklas |
45 |
/** |
6774 |
17 Mar 15 |
nicklas |
Get the item type of the target items. |
6774 |
17 Mar 15 |
nicklas |
47 |
*/ |
6774 |
17 Mar 15 |
nicklas |
48 |
public Item getTargetItemType(); |
6774 |
17 Mar 15 |
nicklas |
49 |
|
6774 |
17 Mar 15 |
nicklas |
50 |
/** |
6774 |
17 Mar 15 |
nicklas |
Transform the given set of source item ID:s into a set of target item ID:s |
6774 |
17 Mar 15 |
nicklas |
52 |
*/ |
6774 |
17 Mar 15 |
nicklas |
53 |
public Set<Integer> transform(TransformContext context, Set<Integer> source); |
6774 |
17 Mar 15 |
nicklas |
54 |
|
6774 |
17 Mar 15 |
nicklas |
55 |
} |