git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b5aea33
)
JAL-2505 explicit (and final) contactFeature property
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Mon, 5 Jun 2017 08:41:02 +0000
(09:41 +0100)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Mon, 5 Jun 2017 08:41:02 +0000
(09:41 +0100)
src/jalview/datamodel/SequenceFeature.java
patch
|
blob
|
history
diff --git
a/src/jalview/datamodel/SequenceFeature.java
b/src/jalview/datamodel/SequenceFeature.java
index
045bbbd
..
25dfc40
100755
(executable)
--- a/
src/jalview/datamodel/SequenceFeature.java
+++ b/
src/jalview/datamodel/SequenceFeature.java
@@
-58,9
+58,9
@@
public class SequenceFeature implements FeatureLocationI
private static final String ATTRIBUTES = "ATTRIBUTES";
/*
private static final String ATTRIBUTES = "ATTRIBUTES";
/*
- * type, begin, end, featureGroup are final to ensure that
- * the integrity of SequenceFeatures data store can't be
- * broken by direct update of these fields
+ * type, begin, end, featureGroup and contactFeature are final
+ * to ensure that the integrity of SequenceFeatures data store
+ * can't be broken by direct update of these fields
*/
public final String type;
*/
public final String type;
@@
-72,6
+72,8
@@
public class SequenceFeature implements FeatureLocationI
public final float score;
public final float score;
+ private final boolean contactFeature;
+
public String description;
/*
public String description;
/*
@@
-107,12
+109,7
@@
public class SequenceFeature implements FeatureLocationI
public SequenceFeature(String theType, String theDesc, int theBegin,
int theEnd, String group)
{
public SequenceFeature(String theType, String theDesc, int theBegin,
int theEnd, String group)
{
- this.type = theType;
- this.description = theDesc;
- this.begin = theBegin;
- this.end = theEnd;
- this.featureGroup = group;
- this.score = NO_SCORE;
+ this(theType, theDesc, theBegin, theEnd, NO_SCORE, group);
}
/**
}
/**
@@
-134,6
+131,12
@@
public class SequenceFeature implements FeatureLocationI
this.end = theEnd;
this.featureGroup = group;
this.score = theScore;
this.end = theEnd;
this.featureGroup = group;
this.score = theScore;
+
+ /*
+ * for now, only "Disulfide/disulphide bond" is treated as a contact feature
+ */
+ this.contactFeature = "disulfide bond".equalsIgnoreCase(type)
+ || "disulphide bond".equalsIgnoreCase(type);
}
/**
}
/**
@@
-504,13
+507,7
@@
public class SequenceFeature implements FeatureLocationI
@Override
public boolean isContactFeature()
{
@Override
public boolean isContactFeature()
{
- // TODO abstract one day to a FeatureType class
- if ("disulfide bond".equalsIgnoreCase(type)
- || "disulphide bond".equalsIgnoreCase(type))
- {
- return true;
- }
- return false;
+ return contactFeature;
}
/**
}
/**