Write javadoc for new datamodel classes , remove some incomplete staff
authorpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Tue, 21 Dec 2010 18:28:57 +0000 (18:28 +0000)
committerpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Tue, 21 Dec 2010 18:28:57 +0000 (18:28 +0000)
git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@3555 e3abac25-378b-4346-85de-24260fe3988d

datamodel/compbio/data/sequence/JalviewAnnotation.java [deleted file]
datamodel/compbio/data/sequence/MultiAnnotatedSequence.java
datamodel/compbio/data/sequence/Score.java
website/AAConWSClientExample.pdf [deleted file]

diff --git a/datamodel/compbio/data/sequence/JalviewAnnotation.java b/datamodel/compbio/data/sequence/JalviewAnnotation.java
deleted file mode 100644 (file)
index cf19937..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-package compbio.data.sequence;\r
-\r
-public class JalviewAnnotation {\r
-\r
-       String annotation;\r
-\r
-}\r
index 92d475d..1212a7d 100644 (file)
@@ -79,8 +79,4 @@ public class MultiAnnotatedSequence<T extends Enum<T>> {
                return value;\r
        }\r
 \r
-       public JalviewAnnotation toJalviewAnnotation() {\r
-               // TODO Auto-generated method stub\r
-               return null;\r
-       }\r
 }\r
index 127df64..d401aa8 100644 (file)
@@ -5,6 +5,7 @@ import java.io.IOException;
 import java.io.OutputStream;\r
 import java.io.OutputStreamWriter;\r
 import java.text.NumberFormat;\r
+import java.util.ArrayList;\r
 import java.util.Arrays;\r
 import java.util.List;\r
 import java.util.Locale;\r
@@ -15,11 +16,17 @@ import javax.xml.bind.annotation.XmlAccessorType;
 \r
 import compbio.util.annotation.Immutable;\r
 \r
+/**\r
+ * A value class for AACon annotation results storage\r
+ * \r
+ * @author pvtroshin\r
+ * \r
+ */\r
 @XmlAccessorType(XmlAccessType.FIELD)\r
 @Immutable\r
 public class Score {\r
 \r
-       public static final NumberFormat NUMBER_FORMAT = NumberFormat\r
+       static final NumberFormat NUMBER_FORMAT = NumberFormat\r
                        .getNumberInstance(Locale.UK);\r
        static {\r
                NUMBER_FORMAT.setGroupingUsed(false);\r
@@ -34,15 +41,35 @@ public class Score {
                // JaXB default constructor\r
        }\r
 \r
+       /**\r
+        * Instantiate the Score\r
+        * \r
+        * @param method\r
+        *            the ConservationMethod with which {@code scores} were\r
+        *            calculated\r
+        * @param scores\r
+        *            the actual conservation values for each column of the\r
+        *            alignment\r
+        */\r
        public Score(ConservationMethod method, List<Float> scores) {\r
                this.method = method;\r
-               this.scores = scores;\r
+               this.scores = new ArrayList<Float>(scores);\r
        }\r
 \r
+       /**\r
+        * Returns the ConservationMethod\r
+        * \r
+        * @return the ConservationMethod\r
+        */\r
        public ConservationMethod getMethod() {\r
                return method;\r
        }\r
 \r
+       /**\r
+        * The column scores for the alignment\r
+        * \r
+        * @return the column scores for the alignment\r
+        */\r
        public List<Float> getScores() {\r
                return scores;\r
        }\r
@@ -88,8 +115,35 @@ public class Score {
                return true;\r
        }\r
 \r
+       /**\r
+        * Outputs the List of Score objects into the Output stream. The output\r
+        * format is as follows:\r
+        * \r
+        * <pre>\r
+        *        #MethodName <space separated list of values>\r
+        *        \r
+        * For example:\r
+        *       \r
+        *        #KABAT 0.2 0.3 0.2 0 0.645 0.333 1 1 0 0\r
+        *    #SMERFS 0.645 0.333 1 1 0 0 0.2 0.3 0.2 0\r
+        * </pre>\r
+        * \r
+        * The maximum precision for values is 3 digits, but can be less.\r
+        * \r
+        * @param scores\r
+        *            the list of scores to output\r
+        * @param output\r
+        *            the stream to output the data to\r
+        * @throws IOException\r
+        *             if the OutputStream cannot be written into\r
+        * @throws NullPointerException\r
+        *             if the output stream is null\r
+        */\r
        public static void write(Set<Score> scores, OutputStream output)\r
                        throws IOException {\r
+               if (output == null) {\r
+                       throw new NullPointerException("OutputStream must be provided!");\r
+               }\r
                BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(\r
                                output));\r
                for (Score score : scores) {\r
diff --git a/website/AAConWSClientExample.pdf b/website/AAConWSClientExample.pdf
deleted file mode 100644 (file)
index 82a315e..0000000
Binary files a/website/AAConWSClientExample.pdf and /dev/null differ