X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fsurfacing%2FSimpleDomain.java;h=782ce20691ae0ff63e4aad6f33fa1f00cfb7d1fb;hb=665e671efec73fcb36a9aac45f119330f290fa81;hp=76d73bf9bb381f76a0316a3d3add3aa1f48c2bd8;hpb=48f7a89be9d34f1930a1f863e608235cc27184c5;p=jalview.git diff --git a/forester/java/src/org/forester/surfacing/SimpleDomain.java b/forester/java/src/org/forester/surfacing/SimpleDomain.java index 76d73bf..782ce20 100644 --- a/forester/java/src/org/forester/surfacing/SimpleDomain.java +++ b/forester/java/src/org/forester/surfacing/SimpleDomain.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,17 +16,18 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // // Contact: phylosoft @ gmail . com -// WWW: www.phylosoft.org/forester +// WWW: https://sites.google.com/site/cmzmasek/home/software/forester package org.forester.surfacing; -import org.forester.go.GoId; +import org.forester.protein.BasicDomain; +import org.forester.protein.Domain; import org.forester.util.ForesterUtil; /* @@ -35,20 +36,16 @@ import org.forester.util.ForesterUtil; */ public class SimpleDomain implements Domain { - final private DomainId _id; + final private short _id; - public SimpleDomain( final String id_str ) { - if ( ForesterUtil.isEmpty( id_str ) ) { + public SimpleDomain( final String id ) { + if ( ForesterUtil.isEmpty( id ) ) { throw new IllegalArgumentException( "attempt to create protein domain with null or empty id" ); } - _id = new DomainId( id_str ); + _id = BasicDomain.obtainIdAsShort( id ); } @Override - public void addGoId( final GoId go_id ) { - throw new RuntimeException( "method not implemented" ); - } - public int compareTo( final Domain domain ) { if ( this == domain ) { return 0; @@ -56,29 +53,23 @@ public class SimpleDomain implements Domain { return getDomainId().compareTo( domain.getDomainId() ); } - public DomainId getDomainId() { - return _id; + @Override + public String getDomainId() { + return BasicDomain.obtainIdFromShort( _id ); } + @Override public int getFrom() { throw new RuntimeException( "method not implemented" ); } @Override - public GoId getGoId( final int i ) { - throw new RuntimeException( "method not implemented" ); - } - public int getLength() { throw new RuntimeException( "method not implemented" ); } - public short getNumber() { - throw new RuntimeException( "method not implemented" ); - } - @Override - public int getNumberOfGoIds() { + public short getNumber() { throw new RuntimeException( "method not implemented" ); } @@ -92,31 +83,13 @@ public class SimpleDomain implements Domain { throw new RuntimeException( "method not implemented" ); } - public double getPerSequenceEvalue() { - throw new RuntimeException( "method not implemented" ); - } - - public double getPerSequenceScore() { - throw new RuntimeException( "method not implemented" ); - } - - public String getSearchParameter() { - throw new RuntimeException( "method not implemented" ); - } - + @Override public int getTo() { throw new RuntimeException( "method not implemented" ); } + @Override public short getTotalCount() { throw new RuntimeException( "method not implemented" ); } - - public boolean isCompleteQueryMatch() { - throw new RuntimeException( "method not implemented" ); - } - - public boolean isCompleteTargetMatch() { - throw new RuntimeException( "method not implemented" ); - } }