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:
b58a042
)
JAL-674 JAL-961 JAL-1578 accessors and copy constructor for annotation row properties
author
Jim Procter
<jprocter@dundee.ac.uk>
Mon, 3 Nov 2014 10:01:43 +0000
(10:01 +0000)
committer
Jim Procter
<jprocter@dundee.ac.uk>
Mon, 3 Nov 2014 10:01:43 +0000
(10:01 +0000)
src/jalview/datamodel/AlignmentAnnotation.java
patch
|
blob
|
history
diff --git
a/src/jalview/datamodel/AlignmentAnnotation.java
b/src/jalview/datamodel/AlignmentAnnotation.java
index
936ba42
..
e0a8e6e
100755
(executable)
--- a/
src/jalview/datamodel/AlignmentAnnotation.java
+++ b/
src/jalview/datamodel/AlignmentAnnotation.java
@@
-634,6
+634,14
@@
public class AlignmentAnnotation
this.scaleColLabel = annotation.scaleColLabel;
this.showAllColLabels = annotation.showAllColLabels;
this.calcId = annotation.calcId;
this.scaleColLabel = annotation.scaleColLabel;
this.showAllColLabels = annotation.showAllColLabels;
this.calcId = annotation.calcId;
+ if (annotation.properties!=null)
+ {
+ properties = new HashMap<String,String>();
+ for (Map.Entry<String, String> val:annotation.properties.entrySet())
+ {
+ properties.put(val.getKey(), val.getValue());
+ }
+ }
if (this.hasScore = annotation.hasScore)
{
this.score = annotation.score;
if (this.hasScore = annotation.hasScore)
{
this.score = annotation.score;
@@
-1272,7
+1280,7
@@
public class AlignmentAnnotation
}
}
}
}
- public Object getProperty(String property)
+ public String getProperty(String property)
{
if (properties == null)
{
{
if (properties == null)
{
@@
-1289,4
+1297,18
@@
public class AlignmentAnnotation
}
properties.put(property, value);
}
}
properties.put(property, value);
}
+
+ public boolean hasProperties()
+ {
+ return properties != null && properties.size() > 0;
+ }
+
+ public Collection<String> getProperties()
+ {
+ if (properties == null)
+ {
+ return Collections.EMPTY_LIST;
+ }
+ return properties.keySet();
+ }
}
}