synchronized AppData parsing stuff with new AppData entry (embedded/references)
authorjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 13 Jan 2006 12:37:21 +0000 (12:37 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 13 Jan 2006 12:37:21 +0000 (12:37 +0000)
 - this is untested at the mo.

git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@106 be28352e-c001-0410-b1a7-c7978e42abec

src/org/vamsas/test/simpleclient/ArchiveReader.java

index 46ae199..a0f71ca 100644 (file)
@@ -21,8 +21,8 @@ public class ArchiveReader {
         for (int i=0,j=appd.length; i<j; i++) {
           System.out.print("Application "+i+": '"+appd[i].getName()+"'\nVersion '"+appd[i].getVersion()+"'\nURN: '"+appd[i].getUrn()+"'\n");
           System.out.print("AppData is ");
-          if (appd[i].getAppDataChoice().getDataReference()==null) {
-            String appData=appd[i].getAppDataChoice().getData();
+          if (appd[i].getAppDataChoice().getDataReference()!=null) {
+            String appData=appd[i].getAppDataChoice().getDataReference();
             if (appData.length()>1) {
               System.out.print("a reference ("+appData+")");
               InputStream jstrm;
@@ -36,7 +36,7 @@ public class ArchiveReader {
               System.out.println("an empty reference.");
             }
           } else {
-            System.out.println("an embedded chunk of "+appd[i].getAppDataChoice().getDataReference().length+" bytes.");
+            System.out.println("an embedded chunk of "+appd[i].getAppDataChoice().getData().length+" bytes.");
           }
         }