[gxml/gxml-0-4: 2/3] Revert "Moved Xom to its own library libxom"



commit 2700d6040c754973982c22ac17cb30ec130efc6d
Author: Daniel Espinosa <esodan gmail com>
Date:   Thu Jul 17 17:47:28 2014 -0500

    Revert "Moved Xom to its own library libxom"
    
    This reverts commit de2cb220d6abdedce91017f4bef86864fe822b14.
    
    Conflicts:
        gxml/Makefile.am
        gxml/xom/Makefile.am
        test/Makefile.am
        test/SerializableTest.vala

 NEWS                                          |   13 ++-
 configure.ac                                  |    3 -
 gxml/{xom => }/Enumeration.vala               |    2 +-
 gxml/Makefile.am                              |   16 ++-
 gxml/{xom => }/Serializable.vala              |    3 +-
 gxml/{xom => }/SerializableContainer.vala     |    5 +-
 gxml/{xom => }/SerializableGeeArrayList.vala  |   16 +-
 gxml/{xom => }/SerializableGeeDualKeyMap.vala |   20 ++--
 gxml/{xom => }/SerializableGeeHashMap.vala    |   20 ++--
 gxml/{xom => }/SerializableGeeTreeMap.vala    |   24 ++--
 gxml/{xom => }/SerializableJson.vala          |    4 +-
 gxml/{xom => }/SerializableMapDualKey.vala    |    2 +-
 gxml/{xom => }/SerializableMapKey.vala        |    2 +-
 gxml/{xom => }/SerializableObjectModel.vala   |   39 +++---
 gxml/Serialization.vala                       |    3 +-
 gxml/xom/Makefile.am                          |  192 -------------------------
 gxml/xom/namespace-info.vala.in               |   24 ---
 gxml/xom/xom-0.4.pc.in                        |   14 --
 test/EnumerationTest.vala                     |    3 +-
 test/GXmlTest.vala                            |    2 +-
 test/Makefile.am                              |    5 +-
 test/SerializableBasicTypesTest.vala          |    2 -
 test/SerializableGeeArrayListTest.vala        |    1 -
 test/SerializableGeeCollectionsTest.vala      |    1 -
 test/SerializableGeeDualKeyMapTest.vala       |    1 -
 test/SerializableGeeHashMapTest.vala          |    1 -
 test/SerializableGeeTreeMapTest.vala          |    1 -
 test/SerializableObjectModelTest.vala         |    8 +-
 test/SerializableTest.vala                    |   11 +-
 test/SerializationTest.vala                   |    9 +-
 30 files changed, 107 insertions(+), 340 deletions(-)
---
diff --git a/NEWS b/NEWS
index 018de66..81d1499 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,19 @@
 =============
+Version 0.4
+=============
+- Added Examples (Richard Schwarting)
+- Improved Build system (Daniel Espinosa)
+- Windows crosscopilation support (Daniel Espinosa)
+- Added/Improved Serialization Framework (Richard Schwarting, Daniel Espinosa)
+- Added missing License (Richard Schwarting)
+- Renamed DomNode to Node (Richard Schwarting)
+- Added Unit Tests (Richard Schwarting, Daniel Espinosa)
+
+=============
 Version 0.3.2
 =============
 GXml
-        * autotools (Javier Jardon)
+       * autotools (Javier Jardon)
        * internally updated to gee-0.8 (Daniel Espinosa)
        * test improvements and fixes (Arnel Borja)
        * doc updates and fixes
diff --git a/configure.ac b/configure.ac
index b0c54a4..cf6ae05 100644
--- a/configure.ac
+++ b/configure.ac
@@ -194,9 +194,6 @@ Makefile
 gxml/namespace-info.vala
 gxml/gxml-0.4.pc
 gxml/Makefile
-gxml/xom/namespace-info.vala
-gxml/xom/Makefile
-gxml/xom/xom-0.4.pc
 test/Makefile
 test/test.xml
 test/test_invalid.xml
diff --git a/gxml/xom/Enumeration.vala b/gxml/Enumeration.vala
similarity index 99%
rename from gxml/xom/Enumeration.vala
rename to gxml/Enumeration.vala
index a2dcfe6..b86f957 100644
--- a/gxml/xom/Enumeration.vala
+++ b/gxml/Enumeration.vala
@@ -22,7 +22,7 @@
 
 using GXml;
 
-namespace Xom {
+namespace GXml {
        public class Enumeration
        {
                /**
diff --git a/gxml/Makefile.am b/gxml/Makefile.am
index 8343c86..b8b9665 100644
--- a/gxml/Makefile.am
+++ b/gxml/Makefile.am
@@ -1,7 +1,5 @@
 -include $(top_srcdir)/git.mk
 
-SUBDIRS = . xom
-
 # Empty variable to be added elements later
 CLEANFILES=
 BUILT_SOURCES=
@@ -35,7 +33,19 @@ sources = \
        NodeType.vala \
        Notation.vala \
        ProcessingInstruction.vala \
-       Text.vala
+       Text.vala \
+       Serializable.vala \
+       Enumeration.vala \
+       SerializableObjectModel.vala \
+       SerializableJson.vala \
+       Serialization.vala \
+       SerializableGeeTreeMap.vala \
+       SerializableGeeHashMap.vala \
+       SerializableMapKey.vala \
+       SerializableGeeDualKeyMap.vala \
+       SerializableMapDualKey.vala \
+       SerializableGeeArrayList.vala \
+       SerializableContainer.vala
 
 
 ### General Compilation flags
diff --git a/gxml/xom/Serializable.vala b/gxml/Serializable.vala
similarity index 99%
rename from gxml/xom/Serializable.vala
rename to gxml/Serializable.vala
index 92efca0..1cb011c 100644
--- a/gxml/xom/Serializable.vala
+++ b/gxml/Serializable.vala
@@ -19,9 +19,8 @@
  * Authors:
  *      Daniel Espinosa <esodan gmail com>
  */
-using GXml;
 
-namespace Xom {
+namespace GXml {
   /**
    * Interface allowing implementors direct control over serialisation of properties and other data
    */
diff --git a/gxml/xom/SerializableContainer.vala b/gxml/SerializableContainer.vala
similarity index 88%
rename from gxml/xom/SerializableContainer.vala
rename to gxml/SerializableContainer.vala
index cb72f47..f17dc7a 100644
--- a/gxml/xom/SerializableContainer.vala
+++ b/gxml/SerializableContainer.vala
@@ -23,8 +23,7 @@
  * Any class having a collection managed list of nodes must implement this
  * abstract class.
  */
-
-public abstract class Xom.SerializableContainer : Xom.SerializableObjectModel
+public abstract class GXml.SerializableContainer : SerializableObjectModel
 {
   /* Xom interface properties */
   public abstract void init_containers ();
@@ -33,7 +32,7 @@ public abstract class Xom.SerializableContainer : Xom.SerializableObjectModel
 /**
  * Fake interface to be implemented by any collection.
  */
-public interface Xom.SerializableCollection : Object, Xom.Serializable
+public interface GXml.SerializableCollection : Object, Serializable
 {
   public virtual bool is_collection () { return true; }
 }
diff --git a/gxml/xom/SerializableGeeArrayList.vala b/gxml/SerializableGeeArrayList.vala
similarity index 88%
rename from gxml/xom/SerializableGeeArrayList.vala
rename to gxml/SerializableGeeArrayList.vala
index 1334621..4ca42a6 100644
--- a/gxml/xom/SerializableGeeArrayList.vala
+++ b/gxml/SerializableGeeArrayList.vala
@@ -22,7 +22,7 @@
 using GXml;
 using Gee;
 
-public class Xom.SerializableArrayList<G> : Gee.ArrayList<G>, Xom.Serializable, Xom.SerializableCollection
+public class GXml.SerializableArrayList<G> : Gee.ArrayList<G>, Serializable, SerializableCollection
 {
   protected ParamSpec[] properties { get; set; }
   public GLib.HashTable<string,GLib.ParamSpec> ignored_serializable_properties { get; protected set; }
@@ -36,7 +36,7 @@ public class Xom.SerializableArrayList<G> : Gee.ArrayList<G>, Xom.Serializable,
 
   public virtual string node_name ()
   {
-    return ((Xom.Serializable) Object.new (element_type)).node_name ();
+    return ((Serializable) Object.new (element_type)).node_name ();
   }
 
   public virtual GLib.ParamSpec? find_property_spec (string property_name)
@@ -84,10 +84,10 @@ public class Xom.SerializableArrayList<G> : Gee.ArrayList<G>, Xom.Serializable,
                               throws GLib.Error
                               requires (node is Element)
   {
-    if (element_type.is_a (typeof (Xom.Serializable))) {
+    if (element_type.is_a (typeof (Serializable))) {
       for (int i =0; i < size; i++) {
        G e = get (i);
-       ((Xom.Serializable) e).serialize (node);
+       ((GXml.Serializable) e).serialize (node);
       }
     }
     return node;
@@ -113,15 +113,15 @@ public class Xom.SerializableArrayList<G> : Gee.ArrayList<G>, Xom.Serializable,
   public GXml.Node? default_deserialize (GXml.Node node)
                     throws GLib.Error
   {
-    if (!element_type.is_a (typeof (Xom.Serializable))) {
-      throw new Xom.SerializableError.UNSUPPORTED_TYPE ("%s: Value type '%s' is unsupported", 
+    if (!element_type.is_a (typeof (GXml.Serializable))) {
+      throw new SerializableError.UNSUPPORTED_TYPE ("%s: Value type '%s' is unsupported", 
                                                     this.get_type ().name (), element_type.name ());
     }
     if (node is Element) {
       foreach (GXml.Node n in node.child_nodes) {
         if (n is Element) {
-          var obj = (Xom.Serializable) Object.new (element_type);
-          if (n.node_name == ((Xom.Serializable) obj).node_name ()) {
+          var obj = (Serializable) Object.new (element_type);
+          if (n.node_name == ((Serializable) obj).node_name ()) {
             obj.deserialize (n);
             add (obj);
           }
diff --git a/gxml/xom/SerializableGeeDualKeyMap.vala b/gxml/SerializableGeeDualKeyMap.vala
similarity index 89%
rename from gxml/xom/SerializableGeeDualKeyMap.vala
rename to gxml/SerializableGeeDualKeyMap.vala
index 0847977..667bdfe 100644
--- a/gxml/xom/SerializableGeeDualKeyMap.vala
+++ b/gxml/SerializableGeeDualKeyMap.vala
@@ -22,7 +22,7 @@
 using GXml;
 using Gee;
 
-public class Xom.SerializableDualKeyMap<P,S,V> : Object, Xom.Serializable, Xom.SerializableCollection
+public class GXml.SerializableDualKeyMap<P,S,V> : Object, Serializable, SerializableCollection
 {
   protected Gee.HashMultiMap<P,HashMap<S,V>> storage;
 
@@ -118,7 +118,7 @@ public class Xom.SerializableDualKeyMap<P,S,V> : Object, Xom.Serializable, Xom.S
 
   public virtual string node_name ()
   {
-    return ((Xom.Serializable) Object.new (value_type)).node_name ();
+    return ((Serializable) Object.new (value_type)).node_name ();
   }
 
   public virtual GLib.ParamSpec? find_property_spec (string property_name)
@@ -167,8 +167,8 @@ public class Xom.SerializableDualKeyMap<P,S,V> : Object, Xom.Serializable, Xom.S
                               requires (node is Element)
   {
     foreach (V v in values ()) {
-        if (v is Xom.Serializable)
-          ((Xom.Serializable) v).serialize (node);;
+        if (v is Serializable)
+          ((GXml.Serializable) v).serialize (node);;
     }
     return node;
   }
@@ -194,16 +194,16 @@ public class Xom.SerializableDualKeyMap<P,S,V> : Object, Xom.Serializable, Xom.S
                     throws GLib.Error
                     requires (node is Element)
   {
-    if (!(value_type.is_a (typeof (Xom.Serializable)) &&
-        value_type.is_a (typeof (Xom.SerializableMapDualKey)))) {
-      throw new Xom.SerializableError.UNSUPPORTED_TYPE ("%s: Value type '%s' is unsupported", 
+    if (!(value_type.is_a (typeof (GXml.Serializable)) &&
+        value_type.is_a (typeof (SerializableMapDualKey)))) {
+      throw new SerializableError.UNSUPPORTED_TYPE ("%s: Value type '%s' is unsupported", 
                                                     this.get_type ().name (), value_type.name ());
     }
     foreach (GXml.Node n in node.child_nodes) {
       if (n is Element) {
-        var obj = (Xom.SerializableMapDualKey<P,S>) Object.new (value_type);
-        if (n.node_name == ((Xom.Serializable) obj).node_name ()) {
-          ((Xom.Serializable) obj).deserialize (n);
+        var obj = (SerializableMapDualKey<P,S>) Object.new (value_type);
+        if (n.node_name == ((Serializable) obj).node_name ()) {
+          ((Serializable) obj).deserialize (n);
           @set (obj.get_map_primary_key (), obj.get_map_secondary_key (), obj);
         }
       }
diff --git a/gxml/xom/SerializableGeeHashMap.vala b/gxml/SerializableGeeHashMap.vala
similarity index 86%
rename from gxml/xom/SerializableGeeHashMap.vala
rename to gxml/SerializableGeeHashMap.vala
index 3c8c526..a7ce625 100644
--- a/gxml/xom/SerializableGeeHashMap.vala
+++ b/gxml/SerializableGeeHashMap.vala
@@ -21,7 +21,7 @@
  */
 using GXml;
 
-public class Xom.SerializableHashMap<K,V> : Gee.HashMap<K,V>, Xom.Serializable, Xom.SerializableCollection
+public class GXml.SerializableHashMap<K,V> : Gee.HashMap<K,V>, Serializable, SerializableCollection
 {
   protected ParamSpec[] properties { get; set; }
   public GLib.HashTable<string,GLib.ParamSpec> ignored_serializable_properties { get; protected set; }
@@ -34,7 +34,7 @@ public class Xom.SerializableHashMap<K,V> : Gee.HashMap<K,V>, Xom.Serializable,
 
   public virtual string node_name ()
   {
-    return ((Xom.Serializable) Object.new (value_type)).node_name ();
+    return ((Serializable) Object.new (value_type)).node_name ();
   }
 
   public virtual GLib.ParamSpec? find_property_spec (string property_name)
@@ -82,9 +82,9 @@ public class Xom.SerializableHashMap<K,V> : Gee.HashMap<K,V>, Xom.Serializable,
                               throws GLib.Error
                               requires (node is Element)
   {
-    if (value_type.is_a (typeof (Xom.Serializable))) {
+    if (value_type.is_a (typeof (Serializable))) {
       foreach (V v in values) {
-       ((Xom.Serializable) v).serialize (node);
+       ((GXml.Serializable) v).serialize (node);
       }
     }
     return node;
@@ -110,9 +110,9 @@ public class Xom.SerializableHashMap<K,V> : Gee.HashMap<K,V>, Xom.Serializable,
   public GXml.Node? default_deserialize (GXml.Node node)
                     throws GLib.Error
   {
-    if (!(value_type.is_a (typeof (Xom.Serializable)) &&
-        value_type.is_a (typeof (Xom.SerializableMapKey)))) {
-      throw new Xom.SerializableError.UNSUPPORTED_TYPE ("%s: Value type '%s' is unsupported", 
+    if (!(value_type.is_a (typeof (GXml.Serializable)) &&
+        value_type.is_a (typeof (SerializableMapKey)))) {
+      throw new SerializableError.UNSUPPORTED_TYPE ("%s: Value type '%s' is unsupported", 
                                                     this.get_type ().name (), value_type.name ());
     }
     if (node is Element) {
@@ -122,9 +122,9 @@ public class Xom.SerializableHashMap<K,V> : Gee.HashMap<K,V>, Xom.Serializable,
           stdout.printf (@"Node $(node.node_name) for type '$(get_type ().name ())'\n");
 #endif
           var obj = Object.new (value_type);
-          if (n.node_name == ((Xom.Serializable) obj).node_name ()) {
-            ((Xom.Serializable) obj).deserialize (n);
-            @set (((Xom.SerializableMapKey<K>) obj).get_map_key (), obj);
+          if (n.node_name == ((Serializable) obj).node_name ()) {
+            ((Serializable) obj).deserialize (n);
+            @set (((SerializableMapKey<K>) obj).get_map_key (), obj);
           }
         }
       }
diff --git a/gxml/xom/SerializableGeeTreeMap.vala b/gxml/SerializableGeeTreeMap.vala
similarity index 84%
rename from gxml/xom/SerializableGeeTreeMap.vala
rename to gxml/SerializableGeeTreeMap.vala
index f3825bf..4f3efd2 100644
--- a/gxml/xom/SerializableGeeTreeMap.vala
+++ b/gxml/SerializableGeeTreeMap.vala
@@ -21,7 +21,7 @@
  */
 using GXml;
 
-public class Xom.SerializableTreeMap<K,V> : Gee.TreeMap<K,V>, Xom.Serializable, Xom.SerializableCollection
+public class GXml.SerializableTreeMap<K,V> : Gee.TreeMap<K,V>, Serializable, SerializableCollection
 {
   protected ParamSpec[] properties { get; set; }
   public GLib.HashTable<string,GLib.ParamSpec> ignored_serializable_properties { get; protected set; }
@@ -34,8 +34,8 @@ public class Xom.SerializableTreeMap<K,V> : Gee.TreeMap<K,V>, Xom.Serializable,
 
   public virtual string node_name ()
   {
-    if (value_type.is_a (typeof (Xom.Serializable)))
-      return ((Xom.Serializable) Object.new (value_type)).node_name ();
+    if (value_type.is_a (typeof (Serializable)))
+      return ((Serializable) Object.new (value_type)).node_name ();
     else
       return get_type ().name ();
   }
@@ -85,9 +85,9 @@ public class Xom.SerializableTreeMap<K,V> : Gee.TreeMap<K,V>, Xom.Serializable,
                               throws GLib.Error
                               requires (node is Element)
   {
-    if (value_type.is_a (typeof (Xom.Serializable))) {
+    if (value_type.is_a (typeof (Serializable))) {
       foreach (V v in values) {
-       ((Xom.Serializable) v).serialize (node);
+       ((GXml.Serializable) v).serialize (node);
       }
     }
     return node;
@@ -113,21 +113,21 @@ public class Xom.SerializableTreeMap<K,V> : Gee.TreeMap<K,V>, Xom.Serializable,
   public GXml.Node? default_deserialize (GXml.Node node)
                     throws GLib.Error
   {
-    if (!(value_type.is_a (typeof (Xom.Serializable)) &&
-        value_type.is_a (typeof (Xom.SerializableMapKey)))) {
-      throw new Xom.SerializableError.UNSUPPORTED_TYPE ("%s: Value type '%s' is unsupported", 
+    if (!(value_type.is_a (typeof (GXml.Serializable)) &&
+        value_type.is_a (typeof (SerializableMapKey)))) {
+      throw new SerializableError.UNSUPPORTED_TYPE ("%s: Value type '%s' is unsupported", 
                                                     this.get_type ().name (), value_type.name ());
     }
-    if (node is GXml.Element) {
+    if (node is Element) {
       foreach (GXml.Node n in node.child_nodes) {
         if (n is Element) {
 #if DEBUG
           stdout.printf (@"Node $(node.node_name) for type '$(get_type ().name ())'\n");
 #endif
           var obj = Object.new (value_type);
-          if (n.node_name == ((Xom.Serializable) obj).node_name ()) {
-            ((Xom.Serializable) obj).deserialize (n);
-            @set (((Xom.SerializableMapKey<K>) obj).get_map_key (), obj);
+          if (n.node_name == ((Serializable) obj).node_name ()) {
+            ((Serializable) obj).deserialize (n);
+            @set (((SerializableMapKey<K>) obj).get_map_key (), obj);
           }
         }
       }
diff --git a/gxml/xom/SerializableJson.vala b/gxml/SerializableJson.vala
similarity index 99%
rename from gxml/xom/SerializableJson.vala
rename to gxml/SerializableJson.vala
index e80eda6..8241751 100644
--- a/gxml/xom/SerializableJson.vala
+++ b/gxml/SerializableJson.vala
@@ -22,8 +22,6 @@
  *       Daniel Espinosa <esodan gmail com>
  */
 
-using GXml;
-
 /*
   Version 3: json-glib version
 
@@ -61,7 +59,7 @@ using GXml;
  * serialization themselves, including non-public properties or
  * data types not automatically supported by { link GXml.Serialization}.
  */
-public class Xom.SerializableJson : GLib.Object, Xom.Serializable
+public class GXml.SerializableJson : GLib.Object, GXml.Serializable
 {
   /* Serializable Interface properties */
   protected ParamSpec[] properties { get; set; }
diff --git a/gxml/xom/SerializableMapDualKey.vala b/gxml/SerializableMapDualKey.vala
similarity index 94%
rename from gxml/xom/SerializableMapDualKey.vala
rename to gxml/SerializableMapDualKey.vala
index 6776df4..5bfbf94 100644
--- a/gxml/xom/SerializableMapDualKey.vala
+++ b/gxml/SerializableMapDualKey.vala
@@ -20,7 +20,7 @@
  *      Daniel Espinosa <esodan gmail com>
  */
 using GXml;
-public interface Xom.SerializableMapDualKey<P,S> : Object
+public interface GXml.SerializableMapDualKey<P,S> : Object
 {
   public abstract P get_map_primary_key  ();
   public abstract S get_map_secondary_key ();
diff --git a/gxml/xom/SerializableMapKey.vala b/gxml/SerializableMapKey.vala
similarity index 94%
rename from gxml/xom/SerializableMapKey.vala
rename to gxml/SerializableMapKey.vala
index 77882f8..944b1b0 100644
--- a/gxml/xom/SerializableMapKey.vala
+++ b/gxml/SerializableMapKey.vala
@@ -21,7 +21,7 @@
  */
 using GXml;
 
-public interface Xom.SerializableMapKey<K> : Object
+public interface GXml.SerializableMapKey<K> : Object
 {
   public abstract K get_map_key ();
 }
diff --git a/gxml/xom/SerializableObjectModel.vala b/gxml/SerializableObjectModel.vala
similarity index 93%
rename from gxml/xom/SerializableObjectModel.vala
rename to gxml/SerializableObjectModel.vala
index 0e68881..c0e3146 100644
--- a/gxml/xom/SerializableObjectModel.vala
+++ b/gxml/SerializableObjectModel.vala
@@ -19,9 +19,8 @@
  * Authors:
  *      Daniel Espinosa <esodan gmail com>
  */
-using GXml;
 
-public abstract class Xom.SerializableObjectModel : Object, Serializable
+public abstract class GXml.SerializableObjectModel : Object, Serializable
 {
   /* Serializable interface properties */
   protected ParamSpec[] properties { get; set; }
@@ -80,7 +79,7 @@ public abstract class Xom.SerializableObjectModel : Object, Serializable
   public virtual GXml.Node? serialize (GXml.Node node)
                        throws GLib.Error
                        requires (node_name () != null)
-                       requires (node is GXml.Document || node is Element)
+                       requires (node is Document || node is Element)
   {
     return default_serialize (node);
   }
@@ -90,9 +89,9 @@ public abstract class Xom.SerializableObjectModel : Object, Serializable
 #if DEBUG
     stdout.printf (@"$(get_type ().name ()): Serializing on node: $(node.node_name)\n");
 #endif
-    GXml.Document doc;
-    if (node is GXml.Document)
-      doc = (GXml.Document) node;
+    Document doc;
+    if (node is Document)
+      doc = (Document) node;
     else
       doc = node.owner_document;
     var element = doc.create_element (node_name ());
@@ -100,15 +99,15 @@ public abstract class Xom.SerializableObjectModel : Object, Serializable
       serialize_property (element, spec);
     }
     if (get_enable_unknown_serializable_property ()) {
-        foreach (GXml.Node n in unknown_serializable_property.get_values ()) {
-          if (n is GXml.Element) {
-            var e = (GXml.Node) doc.create_element (n.node_name);
+        foreach (Node n in unknown_serializable_property.get_values ()) {
+          if (n is Element) {
+            var e = (Node) doc.create_element (n.node_name);
             n.copy (ref e, true);
             element.append_child (e);
           }
           if (n is Attr) {
             element.set_attribute (n.node_name, n.node_value);
-            var a = (GXml.Node) element.get_attribute_node (n.node_name);
+            var a = (Node) element.get_attribute_node (n.node_name);
             n.copy (ref a);
           }
           if (n is Text) {
@@ -174,7 +173,7 @@ public abstract class Xom.SerializableObjectModel : Object, Serializable
           val = rval.dup_string ();
         }
         else {
-          GXml.Node node = null;
+          Node node = null;
           this.serialize_unknown_property (element, prop, out node);
           return node;
         }
@@ -194,7 +193,7 @@ public abstract class Xom.SerializableObjectModel : Object, Serializable
     }
     else
       attr.value = val;
-    return (GXml.Node) attr;
+    return (Node) attr;
   }
 
   public virtual GXml.Node? deserialize (GXml.Node node)
@@ -206,18 +205,18 @@ public abstract class Xom.SerializableObjectModel : Object, Serializable
   public GXml.Node? default_deserialize (GXml.Node node)
                                     throws GLib.Error
   {
-    GXml.Document doc;
-    if (node is GXml.Document) {
-      doc = (GXml.Document) node;
+    Document doc;
+    if (node is Document) {
+      doc = (Document) node;
       return_val_if_fail (doc.document_element != null, null);
     }
     else
       doc = node.owner_document;
-    GXml.Element element;
-    if (node is GXml.Element)
+    Element element;
+    if (node is Element)
       element = (Element) node;
     else
-      element = (GXml.Element) doc.document_element;
+      element = (Element) doc.document_element;
     return_val_if_fail (element != null, null);
     if (node_name () == null) {
       message (@"WARNING: Object type '$(get_type ().name ())' have no Node Name defined");
@@ -263,7 +262,7 @@ public abstract class Xom.SerializableObjectModel : Object, Serializable
             }
         }
       }
-      foreach (GXml.Node n in element.child_nodes)
+      foreach (Node n in element.child_nodes)
       {
         if (n is Text) {
           if (serialize_use_xml_node_value ()) {
@@ -278,7 +277,7 @@ public abstract class Xom.SerializableObjectModel : Object, Serializable
             }
           }
         }
-        if (n is GXml.Element  && !cnodes.has_key (n.node_name)) {
+        if (n is Element  && !cnodes.has_key (n.node_name)) {
 #if DEBUG
             stdout.printf (@"$(get_type ().name ()): DESERIALIZING ELEMENT '$(n.node_name)'\n");
 #endif
diff --git a/gxml/Serialization.vala b/gxml/Serialization.vala
index 3c3dc01..1d35233 100644
--- a/gxml/Serialization.vala
+++ b/gxml/Serialization.vala
@@ -25,9 +25,8 @@
    tastier */
 /* TODO: document memory management for the C side */
 
-using GXml;
 
-namespace Xom {
+namespace GXml {
        private static void print_object_properties (GLib.Object obj) {
                ParamSpec[] properties;
                properties = obj.get_class ().list_properties ();
diff --git a/test/EnumerationTest.vala b/test/EnumerationTest.vala
index 344bd45..4b689e4 100644
--- a/test/EnumerationTest.vala
+++ b/test/EnumerationTest.vala
@@ -24,7 +24,6 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 using GXml;
-using Xom;
 using Gee;
 
 public enum OptionsEnum
@@ -213,4 +212,4 @@ class SerializableEnumerationTest : GXmlTest
                      }
                    });
   }
-}
+}
\ No newline at end of file
diff --git a/test/GXmlTest.vala b/test/GXmlTest.vala
index 5cbffb6..148eafa 100644
--- a/test/GXmlTest.vala
+++ b/test/GXmlTest.vala
@@ -1,4 +1,4 @@
-/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
+/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
 using GXml;
 
 class GXmlTest {
diff --git a/test/Makefile.am b/test/Makefile.am
index 126a728..ba78813 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -57,13 +57,11 @@ AM_VALAFLAGS = \
        $(top_srcdir)/vapi/config.vapi \
        $(top_srcdir)/vapi/gxml-test.vapi \
        --vapidir=$(top_srcdir)/vapi \
-       --vapidir=$(top_builddir)/gxml/xom \
        --vapidir=$(top_builddir)/gxml \
        --pkg gio-2.0 \
        --pkg gee-0.8 \
        --pkg posix \
        --pkg gxml-0.4 \
-       --pkg xom-0.4 \
        --pkg libxml-2.0 \
        -C \
        -g \
@@ -77,8 +75,7 @@ gxml_test_LDADD = \
        $(GXML_LIBS) \
        $(LIBXML_LIBS) \
        $(GIO_LIBS) \
-       ../gxml/libgxml-0.4.la\
-       ../gxml/xom/libxom-0.4.la \
+       ../gxml/libgxml-0.4.la
        $(NULL)
 
 gxml_test_LDFLAGS = $(AM_LDFLAGS)
diff --git a/test/SerializableBasicTypesTest.vala b/test/SerializableBasicTypesTest.vala
index 96ba63f..b3655ef 100644
--- a/test/SerializableBasicTypesTest.vala
+++ b/test/SerializableBasicTypesTest.vala
@@ -24,8 +24,6 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 using GXml;
-using Xom;
-
 class SerializableBasicTypeTest : GXmlTest {
   public class BasicType : SerializableObjectModel
   {
diff --git a/test/SerializableGeeArrayListTest.vala b/test/SerializableGeeArrayListTest.vala
index ce316e2..82a5b62 100644
--- a/test/SerializableGeeArrayListTest.vala
+++ b/test/SerializableGeeArrayListTest.vala
@@ -24,7 +24,6 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 using GXml;
-using Xom;
 using Gee;
 
 class AElement : SerializableObjectModel
diff --git a/test/SerializableGeeCollectionsTest.vala b/test/SerializableGeeCollectionsTest.vala
index 38dffe6..3022be0 100644
--- a/test/SerializableGeeCollectionsTest.vala
+++ b/test/SerializableGeeCollectionsTest.vala
@@ -24,7 +24,6 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 using GXml;
-using Xom;
 using Gee;
 
 class SerializableGeeCollectionsTest : GXmlTest
diff --git a/test/SerializableGeeDualKeyMapTest.vala b/test/SerializableGeeDualKeyMapTest.vala
index 3db02c2..01a0a8f 100644
--- a/test/SerializableGeeDualKeyMapTest.vala
+++ b/test/SerializableGeeDualKeyMapTest.vala
@@ -24,7 +24,6 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 using GXml;
-using Xom;
 using Gee;
 
 class Spaces : SerializableObjectModel, SerializableMapDualKey<string,string>
diff --git a/test/SerializableGeeHashMapTest.vala b/test/SerializableGeeHashMapTest.vala
index 24073b4..ad48795 100644
--- a/test/SerializableGeeHashMapTest.vala
+++ b/test/SerializableGeeHashMapTest.vala
@@ -24,7 +24,6 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 using GXml;
-using Xom;
 using Gee;
 
 class SerializableGeeHashMapTest : GXmlTest
diff --git a/test/SerializableGeeTreeMapTest.vala b/test/SerializableGeeTreeMapTest.vala
index 7214fdd..87c2c61 100644
--- a/test/SerializableGeeTreeMapTest.vala
+++ b/test/SerializableGeeTreeMapTest.vala
@@ -24,7 +24,6 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 using GXml;
-using Xom;
 using Gee;
 
 class SerializableGeeTreeMapTest : GXmlTest
diff --git a/test/SerializableObjectModelTest.vala b/test/SerializableObjectModelTest.vala
index 47571ec..3325464 100644
--- a/test/SerializableObjectModelTest.vala
+++ b/test/SerializableObjectModelTest.vala
@@ -24,9 +24,7 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 using GXml;
-using Xom;
 using Gee;
-
 const string XML_COMPUTER_FILE = 
 """<?xml version="1.0"?>
 <computer manufacturer="ThecnicalGroup" model="YH576G" cores="4" ghz="2.8"/>""";
@@ -126,7 +124,7 @@ public class Package : ObjectModel
     manual = new Manual ();
     source = "Mexico";
     destiny = "World";
-    ((Xom.Serializable) this).serialize_unknown_property.connect ( (element, prop, out node) => {
+    ((Serializable) this).serialize_unknown_property.connect ( (element, prop, out node) => {
       //GLib.message (@"Serializing Unknown Property: $(prop.name) | $(prop.get_nick ())");
       if (prop.name == "tags")
       {
@@ -138,7 +136,7 @@ public class Package : ObjectModel
         }
       }
     });
-    ((Xom.Serializable) this).deserialize_unknown_property.connect ( (element, prop) => {
+    ((Serializable) this).deserialize_unknown_property.connect ( (element, prop) => {
       //GLib.message (@"Deserializing Unknown Property: $(prop.name) | $(prop.get_nick ())");
       if (element.node_name == "tag") {
         tags.append_val (((Element) element).content);
@@ -966,4 +964,4 @@ class SerializableObjectModelTest : GXmlTest
       assert_not_reached ();
     }
   }
-}
+}
\ No newline at end of file
diff --git a/test/SerializableTest.vala b/test/SerializableTest.vala
index e5a9b0a..aea2044 100644
--- a/test/SerializableTest.vala
+++ b/test/SerializableTest.vala
@@ -25,7 +25,6 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 using GXml;
-using Xom;
 using Gee;
 
 /**
@@ -51,7 +50,7 @@ using Gee;
    Test overriding {set,get}_property
 */
 
-public class SerializableTomato : Xom.SerializableJson {
+public class SerializableTomato : GXml.SerializableJson {
        public int weight;
        private int age { get; set; }
        public int height { get; set; }
@@ -77,7 +76,7 @@ public class SerializableTomato : Xom.SerializableJson {
        }
 }
 
-public class SerializableCapsicum : Xom.SerializableJson {
+public class SerializableCapsicum : GXml.SerializableJson {
        public int weight;
        private int age { get; set; }
        public int height { get; set; }
@@ -97,8 +96,8 @@ public class SerializableCapsicum : Xom.SerializableJson {
                this.age = age;
                this.height = height;
                this.ratings = ratings;
-               ((Xom.Serializable)this).serialize_unknown_property_type.connect 
(serialize_unknown_property_type);
-               ((Xom.Serializable)this).deserialize_unknown_property_type.connect 
(deserialize_unknown_property_type);
+               ((Serializable)this).serialize_unknown_property_type.connect 
(serialize_unknown_property_type);
+               ((Serializable)this).deserialize_unknown_property_type.connect 
(deserialize_unknown_property_type);
        }
 
        /* TODO: do we really need GLib.Value? or should we modify the object directly?
@@ -140,7 +139,7 @@ public class SerializableCapsicum : Xom.SerializableJson {
 }
 
 
-public class SerializableBanana : Xom.SerializableJson {
+public class SerializableBanana : GXml.SerializableJson {
        private int private_field;
        public int public_field;
        private int private_property { get; set; }
diff --git a/test/SerializationTest.vala b/test/SerializationTest.vala
index 6672780..f9c5aa3 100644
--- a/test/SerializationTest.vala
+++ b/test/SerializationTest.vala
@@ -1,6 +1,5 @@
 /* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
 using GXml;
-using Xom;
 using Gee;
 
 /**
@@ -324,7 +323,7 @@ class SerializationTest : GXmlTest {
                                        Test.message ("Regular expression [%s] for test failed: %s",
                                                      expectation, e.message);
                                        assert_not_reached ();
-                               } catch (Xom.SerializationError e) {
+                               } catch (GXml.SerializationError e) {
                                        Test.message ("%s", e.message);
                                        assert_not_reached ();
                                } catch (GLib.Error e) {
@@ -374,7 +373,7 @@ class SerializationTest : GXmlTest {
                                        assert_not_reached ();
                                } catch (GLib.Error e) {
                                        //stdout.printf (@"Cought Error: $(e.message)");
-                                       if (e is Xom.SerializationError.UNKNOWN_PROPERTY) {
+                                       if (e is GXml.SerializationError.UNKNOWN_PROPERTY) {
                                                // pass
                                        } else {
                                                GLib.message (@"Error is not UNKNOWN_PROPERTY: $(e.message)");
@@ -390,7 +389,7 @@ class SerializationTest : GXmlTest {
                                        Serialization.deserialize_object (0, doc);
                                        assert_not_reached ();
                                } catch (GLib.Error e) {
-                                       if (e is Xom.SerializationError.UNKNOWN_TYPE) {
+                                       if (e is GXml.SerializationError.UNKNOWN_TYPE) {
                                        // pass
                                        }
                                        else {
@@ -411,7 +410,7 @@ class SerializationTest : GXmlTest {
                                        fruit = (Fruit)Serialization.deserialize_object (typeof (Fruit), doc);
                                        assert_not_reached ();
                                } catch (GLib.Error e) {
-                                       if (e is Xom.SerializationError.UNKNOWN_PROPERTY)
+                                       if (e is GXml.SerializationError.UNKNOWN_PROPERTY)
                                        { // pass
                                        }
                                        else {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]