*/
package jalview.datamodel;
-public class DBRefEntry
+import jalview.api.DBRefEntryI;
+
+public class DBRefEntry implements DBRefEntryI
{
String source = "", version = "", accessionId = "";
* @param entry
* @return true if source, accession and version are equal with those of entry
*/
- public boolean equalRef(DBRefEntry entry)
+ @Override
+ public boolean equalRef(DBRefEntryI entry)
{
if (entry == null)
{
{
return true;
}
- if ((source != null && entry.source != null && source
- .equalsIgnoreCase(entry.source))
- && (accessionId != null && entry.accessionId != null && accessionId
- .equalsIgnoreCase(entry.accessionId))
- && (version != null && entry.version != null && version
- .equalsIgnoreCase(entry.version)))
+ if (entry != null
+ && (source != null && entry.getSource() != null && source
+ .equalsIgnoreCase(entry.getSource()))
+ && (accessionId != null && entry.getAccessionId() != null && accessionId
+ .equalsIgnoreCase(entry.getAccessionId()))
+ && (version != null && entry.getVersion() != null && version
+ .equalsIgnoreCase(entry.getVersion())))
{
return true;
}
return false;
}
+ @Override
public String getSource()
{
return source;
}
+ @Override
public String getVersion()
{
return version;
}
+ @Override
public String getAccessionId()
{
return accessionId;
* @param accessionId
* the accessionId to set
*/
+ @Override
public void setAccessionId(String accessionId)
{
this.accessionId = accessionId;
* @param source
* the source to set
*/
+ @Override
public void setSource(String source)
{
this.source = source;
* @param version
* the version to set
*/
+ @Override
public void setVersion(String version)
{
this.version = version;
+ ((accessionId != null) ? accessionId : "");
}
+ @Override
public String toString()
{
return getSrcAccString();
package jalview.datamodel;
import jalview.analysis.AlignSeq;
+import jalview.api.DBRefEntryI;
import jalview.util.StringUtils;
import java.util.ArrayList;
String vamsasId;
+ DBRefEntryI sourceDBRef;
+
DBRefEntry[] dbrefs;
RNA rna;
* @param v
* DOCUMENT ME!
*/
+ @Override
public void setSequenceFeatures(SequenceFeature[] features)
{
sequenceFeatures = features;
}
+ @Override
public synchronized void addSequenceFeature(SequenceFeature sf)
{
if (sequenceFeatures == null)
sequenceFeatures = temp;
}
+ @Override
public void deleteFeature(SequenceFeature sf)
{
if (sequenceFeatures == null)
*
* @return
*/
+ @Override
public SequenceFeature[] getSequenceFeatures()
{
SequenceFeature[] features = sequenceFeatures;
return features;
}
+ @Override
public void addPDBId(PDBEntry entry)
{
if (pdbIds == null)
*
* @return DOCUMENT ME!
*/
+ @Override
public String getDisplayId(boolean jvsuffix)
{
StringBuffer result = new StringBuffer(name);
* @param name
* DOCUMENT ME!
*/
+ @Override
public void setName(String name)
{
this.name = name;
*
* @return DOCUMENT ME!
*/
+ @Override
public String getName()
{
return this.name;
* @param start
* DOCUMENT ME!
*/
+ @Override
public void setStart(int start)
{
this.start = start;
*
* @return DOCUMENT ME!
*/
+ @Override
public int getStart()
{
return this.start;
* @param end
* DOCUMENT ME!
*/
+ @Override
public void setEnd(int end)
{
this.end = end;
*
* @return DOCUMENT ME!
*/
+ @Override
public int getEnd()
{
return this.end;
*
* @return DOCUMENT ME!
*/
+ @Override
public int getLength()
{
return this.sequence.length;
* @param seq
* DOCUMENT ME!
*/
+ @Override
public void setSequence(String seq)
{
this.sequence = seq.toCharArray();
checkValidRange();
}
+ @Override
public String getSequenceAsString()
{
return new String(sequence);
}
+ @Override
public String getSequenceAsString(int start, int end)
{
return new String(getSequence(start, end));
}
+ @Override
public char[] getSequence()
{
return sequence;
*
* @see jalview.datamodel.SequenceI#getSequence(int, int)
*/
+ @Override
public char[] getSequence(int start, int end)
{
if (start < 0)
*
* @return DOCUMENT ME!
*/
+ @Override
public char getCharAt(int i)
{
if (i < sequence.length)
* @param desc
* DOCUMENT ME!
*/
+ @Override
public void setDescription(String desc)
{
this.description = desc;
*
* @return DOCUMENT ME!
*/
+ @Override
public String getDescription()
{
return this.description;
*
* @see jalview.datamodel.SequenceI#findIndex(int)
*/
+ @Override
public int findIndex(int pos)
{
// returns the alignment position for a residue
* @return int[SequenceI.getEnd()-SequenceI.getStart()+1] or null if no
* residues in SequenceI object
*/
+ @Override
public int[] gapMap()
{
String seq = jalview.analysis.AlignSeq.extractGaps(
annotation.setSequenceRef(this);
}
+ @Override
public void removeAlignmentAnnotation(AlignmentAnnotation annotation)
{
if (this.annotation != null)
*
* @see jalview.datamodel.SequenceI#createDatasetSequence()
*/
+ @Override
public SequenceI createDatasetSequence()
{
if (datasetSequence == null)
* jalview.datamodel.SequenceI#setAlignmentAnnotation(AlignmmentAnnotation[]
* annotations)
*/
+ @Override
public void setAlignmentAnnotation(AlignmentAnnotation[] annotations)
{
if (annotation != null)
* @return The index (zero-based) on this sequence in the MSA. It returns
* {@code -1} if this information is not available.
*/
+ @Override
public int getIndex()
{
return index;
* position for this sequence. This value is zero-based (zero for
* this first sequence)
*/
+ @Override
public void setIndex(int value)
{
index = value;
}
+ @Override
public void setRNA(RNA r)
{
rna = r;
}
+ @Override
public RNA getRNA()
{
return rna;
return result;
}
+ @Override
public String toString()
{
return getDisplayId(false);
return null;
}
+ @Override
+ public void setSourceDBRef(DBRefEntryI dbRef)
+ {
+ this.sourceDBRef = dbRef;
+ }
+
+ @Override
+ public DBRefEntryI getSourceDBRef()
+ {
+ return this.sourceDBRef;
+ }
+
}