From: Jim Procter Date: Fri, 31 Oct 2014 16:11:45 +0000 (+0000) Subject: JAL-674 JAL-961 properties to stash additional information for an alignment annotatio... X-Git-Tag: Jalview_2_9~155^2~15^2~10 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=422beff9bcaf1813684e23647889bbb7c822cfae;p=jalview.git JAL-674 JAL-961 properties to stash additional information for an alignment annotation row --- diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index 4159ddb..78f64ac 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -26,7 +26,9 @@ import jalview.analysis.WUSSParseException; import java.util.ArrayList; import java.util.Enumeration; +import java.util.HashMap; import java.util.Hashtable; +import java.util.Map; import java.util.Map.Entry; /** @@ -1119,6 +1121,11 @@ public class AlignmentAnnotation protected String calcId = ""; /** + * properties associated with the calcId + */ + protected Map properties = new HashMap(); + + /** * base colour for line graphs. If null, will be set automatically by * searching the alignment annotation */ @@ -1254,4 +1261,22 @@ public class AlignmentAnnotation adjustForAlignment(); } } + + public Object getProperty(String property) + { + if (properties == null) + { + return null; + } + return properties.get(property); + } + + public void setProperty(String property, String value) + { + if (properties==null) + { + properties = new HashMap(); + } + properties.put(property, value); + } }