From 332327b9f2272674f8da954d76805ff3754b8ab3 Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 15 Dec 2010 14:50:40 +0000 Subject: [PATCH] getters and modification state flag --- src/jalview/io/packed/JalviewDataset.java | 79 ++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/src/jalview/io/packed/JalviewDataset.java b/src/jalview/io/packed/JalviewDataset.java index 1e06636..1972189 100644 --- a/src/jalview/io/packed/JalviewDataset.java +++ b/src/jalview/io/packed/JalviewDataset.java @@ -16,6 +16,55 @@ public class JalviewDataset AlignmentI parentDataset; /** + * @return the parentDataset + */ + public AlignmentI getParentDataset() + { + return parentDataset; + } + /** + * @param parentDataset the parentDataset to set + */ + public void setParentDataset(AlignmentI parentDataset) + { + this.parentDataset = parentDataset; + } + /** + * @return the featureColours + */ + public Hashtable getFeatureColours() + { + return featureColours; + } + /** + * @param featureColours the featureColours to set + */ + public void setFeatureColours(Hashtable featureColours) + { + this.featureColours = featureColours; + } + /** + * @return the seqDetails + */ + public Hashtable getSeqDetails() + { + return seqDetails; + } + /** + * @param seqDetails the seqDetails to set + */ + public void setSeqDetails(Hashtable seqDetails) + { + this.seqDetails = seqDetails; + } + /** + * @return the al + */ + public List getAl() + { + return (al==null) ? new ArrayList() : al; + } + /** * current alignment being worked on. */ List al; @@ -62,11 +111,31 @@ public class JalviewDataset { // the following works because all trees are already had node/SequenceI associations created. jalview.analysis.NJTree njt = new jalview.analysis.NJTree(al.getSequencesArray(), nf); - // this just updates the displayed leaf name on the try according to the SequenceIs. + // this just updates the displayed leaf name on the tree according to the SequenceIs. njt.renameAssociatedNodes(); } } + /** + * set modification flag. If anything modifies the alignment in the current set, this flag should be true + */ + private boolean modified=false; + + /** + * @return the modified + */ + public boolean isModified() + { + return modified; + } + /** + * or the modification state with the given state + * @param modifiedFromAction + */ + public void updateSetModified(boolean modifiedFromAction) + { + modified |= modifiedFromAction; + } } /** @@ -173,4 +242,12 @@ public SequenceI getLastAssociatedSequence() { // TODO: delineate semantics for associating uniquified data with potentially de-uniquified sequence. return null; } +/** + * update the modified state flag for the current set with the given modification state + * @param modified - this will be ored with current modification state + */ +public void updateSetModified(boolean modified) +{ + getLastAlignmentSet().updateSetModified(modified); +} } \ No newline at end of file -- 1.7.10.2