// 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
// 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;
/*
*/
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;
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" );
}
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" );
- }
}