4 // FORESTER -- software libraries and applications
5 // for evolutionary biology research and applications.
7 // Copyright (C) 2008-2009 Christian M. Zmasek
8 // Copyright (C) 2008-2009 Burnham Institute for Medical Research
11 // This library is free software; you can redistribute it and/or
12 // modify it under the terms of the GNU Lesser General Public
13 // License as published by the Free Software Foundation; either
14 // version 2.1 of the License, or (at your option) any later version.
16 // This library is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 // Lesser General Public License for more details.
21 // You should have received a copy of the GNU Lesser General Public
22 // License along with this library; if not, write to the Free Software
23 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25 // Contact: phylosoft @ gmail . com
26 // WWW: www.phylosoft.org
28 package org.forester.surfacing;
30 import java.util.ArrayList;
31 import java.util.List;
33 import org.forester.protein.BinaryDomainCombination;
34 import org.forester.species.Species;
36 public class AdjactantDirectedCombinableDomains extends BasicCombinableDomains {
38 public AdjactantDirectedCombinableDomains( final String n_terminal_key_domain, final Species species ) {
39 super( n_terminal_key_domain, species );
43 public List<BinaryDomainCombination> toBinaryDomainCombinations() {
44 final List<BinaryDomainCombination> binary_combinations = new ArrayList<BinaryDomainCombination>( getNumberOfCombinableDomains() );
45 for( final String domain : getCombiningDomains().keySet() ) {
46 // Precondition (!): key domain is most upstream domain.
47 //TODO ensure this is true.
48 binary_combinations.add( AdjactantDirectedBinaryDomainCombination.obtainInstance( getKeyDomain(), domain ) );
50 return binary_combinations;