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 float score;
+ private final boolean contactFeature;
+
public String description;
/*
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);
}
/**
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);
}
/**
@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;
}
/**