avoid multiple same dcs
[jalview.git] / forester / java / src / org / forester / surfacing / SimpleDomain.java
1 // $Id:
2 //
3 // FORESTER -- software libraries and applications
4 // for evolutionary biology research and applications.
5 //
6 // Copyright (C) 2008-2009 Christian M. Zmasek
7 // Copyright (C) 2008-2009 Burnham Institute for Medical Research
8 // All rights reserved
9 //
10 // This library is free software; you can redistribute it and/or
11 // modify it under the terms of the GNU Lesser General Public
12 // License as published by the Free Software Foundation; either
13 // version 2.1 of the License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 //
24 // Contact: phylosoft @ gmail . com
25 // WWW: www.phylosoft.org/forester
26
27 package org.forester.surfacing;
28
29 import org.forester.go.GoId;
30 import org.forester.util.ForesterUtil;
31
32 /*
33  * A limited implementation of Domain. Its intended use is for when only a
34  * domain identifier is needed. Note intended for general use.
35  */
36 public class SimpleDomain implements Domain {
37
38     final private DomainId _id;
39
40     public SimpleDomain( final String id_str ) {
41         if ( ForesterUtil.isEmpty( id_str ) ) {
42             throw new IllegalArgumentException( "attempt to create protein domain with null or empty id" );
43         }
44         _id = new DomainId( id_str );
45     }
46
47     @Override
48     public void addGoId( final GoId go_id ) {
49         throw new RuntimeException( "method not implemented" );
50     }
51
52     @Override
53     public int compareTo( final Domain domain ) {
54         if ( this == domain ) {
55             return 0;
56         }
57         return getDomainId().compareTo( domain.getDomainId() );
58     }
59
60     @Override
61     public DomainId getDomainId() {
62         return _id;
63     }
64
65     @Override
66     public int getFrom() {
67         throw new RuntimeException( "method not implemented" );
68     }
69
70     @Override
71     public GoId getGoId( final int i ) {
72         throw new RuntimeException( "method not implemented" );
73     }
74
75     public int getLength() {
76         throw new RuntimeException( "method not implemented" );
77     }
78
79     @Override
80     public short getNumber() {
81         throw new RuntimeException( "method not implemented" );
82     }
83
84     @Override
85     public int getNumberOfGoIds() {
86         throw new RuntimeException( "method not implemented" );
87     }
88
89     @Override
90     public double getPerDomainEvalue() {
91         throw new RuntimeException( "method not implemented" );
92     }
93
94     @Override
95     public double getPerDomainScore() {
96         throw new RuntimeException( "method not implemented" );
97     }
98
99     @Override
100     public double getPerSequenceEvalue() {
101         throw new RuntimeException( "method not implemented" );
102     }
103
104     @Override
105     public double getPerSequenceScore() {
106         throw new RuntimeException( "method not implemented" );
107     }
108
109     public String getSearchParameter() {
110         throw new RuntimeException( "method not implemented" );
111     }
112
113     @Override
114     public int getTo() {
115         throw new RuntimeException( "method not implemented" );
116     }
117
118     @Override
119     public short getTotalCount() {
120         throw new RuntimeException( "method not implemented" );
121     }
122
123     public boolean isCompleteQueryMatch() {
124         throw new RuntimeException( "method not implemented" );
125     }
126
127     public boolean isCompleteTargetMatch() {
128         throw new RuntimeException( "method not implemented" );
129     }
130 }