src/core/net/sf/basedb/util/listable/SourceItemTransformer.java

Code
Comments
Other
Rev Date Author Line
6774 17 Mar 15 nicklas 1 /**
6774 17 Mar 15 nicklas 2   $Id$
6774 17 Mar 15 nicklas 3
6774 17 Mar 15 nicklas 4   Copyright (C) 2015 Nicklas Nordborg
6774 17 Mar 15 nicklas 5
6774 17 Mar 15 nicklas 6   This file is part of BASE - BioArray Software Environment.
6774 17 Mar 15 nicklas 7   Available at http://base.thep.lu.se/
6774 17 Mar 15 nicklas 8
6774 17 Mar 15 nicklas 9   BASE is free software; you can redistribute it and/or
6774 17 Mar 15 nicklas 10   modify it under the terms of the GNU General Public License
6774 17 Mar 15 nicklas 11   as published by the Free Software Foundation; either version 3
6774 17 Mar 15 nicklas 12   of the License, or (at your option) any later version.
6774 17 Mar 15 nicklas 13
6774 17 Mar 15 nicklas 14   BASE is distributed in the hope that it will be useful,
6774 17 Mar 15 nicklas 15   but WITHOUT ANY WARRANTY; without even the implied warranty of
6774 17 Mar 15 nicklas 16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6774 17 Mar 15 nicklas 17   GNU General Public License for more details.
6774 17 Mar 15 nicklas 18
6774 17 Mar 15 nicklas 19   You should have received a copy of the GNU General Public License
6774 17 Mar 15 nicklas 20   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 29   Implementations are responsible for transforming a set of source item
6774 17 Mar 15 nicklas 30   ID:s into a set of related target item ID:s. The rules for transforming
6774 17 Mar 15 nicklas 31   is up to each implementation.
6774 17 Mar 15 nicklas 32   
6774 17 Mar 15 nicklas 33   @author Nicklas
6774 17 Mar 15 nicklas 34   @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 40     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 46     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 51     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 }