[open-ils-commits] [GIT] Evergreen ILS branch master updated. 0fea2393446d8604f703a3fc405743bbedc22996

Evergreen Git git at git.evergreen-ils.org
Fri Dec 14 17:00:10 EST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  0fea2393446d8604f703a3fc405743bbedc22996 (commit)
       via  349ce9be19d5b3697f9015abd9c33368da5a3627 (commit)
       via  1167ba577036f913e12e801577c1f69440865015 (commit)
      from  2003773f3e8630d1df6c2cdf65c561ce2d6c806c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0fea2393446d8604f703a3fc405743bbedc22996
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Apr 5 09:36:31 2012 -0400

    Java IDL parser supports isnew/ischanged/isdeleted
    
    Includes changes to TestIDL.java for verification.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>

diff --git a/Open-ILS/src/java/org/open_ils/idl/IDLParser.java b/Open-ILS/src/java/org/open_ils/idl/IDLParser.java
index 4da147f..059aeb7 100644
--- a/Open-ILS/src/java/org/open_ils/idl/IDLParser.java
+++ b/Open-ILS/src/java/org/open_ils/idl/IDLParser.java
@@ -159,6 +159,15 @@ public class IDLParser {
 
         if("class".equals(localpart)) {
 
+            String[] vfields = {"isnew", "ischanged", "isdeleted"};
+            for (String fieldName : vfields) {
+                IDLField field = new IDLField();
+                field.setName(fieldName);
+                field.setArrayPos(fieldIndex++);
+                field.setIsVirtual(true);
+                current.addField(field);
+            }
+
             if(keepIDLObjects)
                 IDLObjects.put(current.getIDLClass(), current);
 
diff --git a/Open-ILS/src/java/org/open_ils/test/TestIDL.java b/Open-ILS/src/java/org/open_ils/test/TestIDL.java
index de778a9..c50ad62 100644
--- a/Open-ILS/src/java/org/open_ils/test/TestIDL.java
+++ b/Open-ILS/src/java/org/open_ils/test/TestIDL.java
@@ -10,10 +10,11 @@ public class TestIDL {
         parser.parse();
         //System.out.print(parser.toXML());
 
-        /*
         OSRFObject bre = new OSRFObject("bre");
         bre.put("id", new Integer(1));
+        bre.put("isnew", new Boolean(false));
+        bre.put("isdeleted", new Boolean(true));
         System.out.println(bre);
-        */
+        System.out.println(new JSONWriter(bre).write());
     }
 }

commit 349ce9be19d5b3697f9015abd9c33368da5a3627
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Feb 24 16:37:07 2012 -0500

    Add Java *.class files to gitignore
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>

diff --git a/.gitignore b/.gitignore
index 8b5efd3..9c48a33 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,7 @@
 *.lo
 *.pyc
 *.slo
+*.class
 
 aclocal.m4
 autom4te.cache/

commit 1167ba577036f913e12e801577c1f69440865015
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Feb 24 16:33:58 2012 -0500

    Java IDL parser updated to use derived field array index
    
    The "array_position" IDL attribute is deprecated.  Determine the
    index by field position within the XML.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>

diff --git a/Open-ILS/src/java/org/open_ils/idl/IDLParser.java b/Open-ILS/src/java/org/open_ils/idl/IDLParser.java
index a82b25d..4da147f 100644
--- a/Open-ILS/src/java/org/open_ils/idl/IDLParser.java
+++ b/Open-ILS/src/java/org/open_ils/idl/IDLParser.java
@@ -29,6 +29,7 @@ public class IDLParser {
     InputStream inStream;
     HashMap<String, IDLObject> IDLObjects;
     IDLObject current;
+    private int fieldIndex;
 
     /** If true, we retain the full set of IDL objects in memory.  This is true by default. */
     private boolean keepIDLObjects;
@@ -39,6 +40,7 @@ public class IDLParser {
         IDLObjects = new HashMap<String, IDLObject>();
         keepIDLObjects = true;
         parsedObjectCount = 0;
+        fieldIndex = 0;
     }
 
     public IDLParser(String fileName) throws IOException {
@@ -122,6 +124,7 @@ public class IDLParser {
         String localpart = reader.getLocalName();
     
         if( "class".equals(localpart) ) {
+            fieldIndex = 0;
             current = new IDLObject();
             current.setIDLClass(reader.getAttributeValue(null, "id"));
             current.setController(reader.getAttributeValue(null, "controller"));
@@ -133,7 +136,7 @@ public class IDLParser {
         if( "field".equals(localpart) ) {
             IDLField field = new IDLField();
             field.setName(reader.getAttributeValue(null, "name"));
-            field.setArrayPos(new Integer(reader.getAttributeValue(OILS_NS_OBJ, "array_position")));
+            field.setArrayPos(fieldIndex++);
             field.setIsVirtual("true".equals(reader.getAttributeValue(OILS_NS_PERSIST, "virtual")));
             current.addField(field);
         }

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                                        |    1 +
 Open-ILS/src/java/org/open_ils/idl/IDLParser.java |   14 +++++++++++++-
 Open-ILS/src/java/org/open_ils/test/TestIDL.java  |    5 +++--
 3 files changed, 17 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list