public class DBRefEntry implements DBRefEntryI
{
String source = "", version = "", accessionId = "";
-
- private int startRes, endRes;
/**
* maps from associated sequence to the database sequence's coordinate system
*/
* @return
*/
@Override
- public boolean updateFrom(DBRefEntry other)
+ public boolean updateFrom(DBRefEntryI other)
{
if (other == null)
{
* otherwise the versions have to match
*/
String otherVersion = other.getVersion();
+
if ((version == null || version.equals("0") || version.endsWith(":0"))
&& otherVersion != null)
{
}
else
{
- if (!version.equalsIgnoreCase(otherVersion))
+ if (version != null
+ && (otherVersion == null || !version
+ .equalsIgnoreCase(otherVersion)))
{
return false;
}
{
return getSrcAccString();
}
-
- @Override
- public int getStartRes()
- {
- return startRes;
- }
-
- @Override
- public void setStartRes(int startRes)
- {
- this.startRes = startRes;
- }
-
- @Override
- public int getEndRes()
- {
- return endRes;
- }
-
- @Override
- public void setEndRes(int endRes)
- {
- this.endRes = endRes;
- }
}