[Webfunds-commits] java/webfunds/ricardian Contract.java

Ian Grigg iang@cypherpunks.ai
Sun, 17 Sep 2000 15:41:28 -0400 (AST)


iang        00/09/17 15:41:28

  Modified:    webfunds/ricardian Contract.java
  Log:
  debugging routines to see what sections and fields there are there,
  although doesn't look in myFile at all (so incomplete).

Revision  Changes    Path
1.43      +28 -1     java/webfunds/ricardian/Contract.java

Index: Contract.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/ricardian/Contract.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- Contract.java	2000/09/05 18:20:22	1.42
+++ Contract.java	2000/09/17 19:41:27	1.43
@@ -1,4 +1,4 @@
-/* $Id: Contract.java,v 1.42 2000/09/05 18:20:22 iang Exp $
+/* $Id: Contract.java,v 1.43 2000/09/17 19:41:27 iang Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -167,6 +167,7 @@
         if (this.type == null || this.type.equals(""))
             throw new ContractException(ContractException.NOT_A_CONTRACT,
                                         "no [issue] type");
+
     }
 
     public String fileNameFromDigest(byte[] hash)
@@ -1268,6 +1269,32 @@
             String item2 = section + "_" + item;
             ss = fields.getSectionItemArray(section, item2);
         }
+        return ss;
+    }
+
+    /**
+     *  Get the fieldnames in a section
+     *  Doesn't look in myFile.
+     */
+    public String[] getSectionItems(String section)
+    {
+        String[] ss;
+
+        ss = fields.getSectionItems(section);
+
+        return ss;
+    }
+
+    /**
+     *  Get all the section names.
+     *  Doesn't look in myFile.
+     */
+    public String[] getSectionNames()
+    {
+        String[] ss;
+
+        ss = fields.getSectionNames();
+
         return ss;
     }