[gxml] Removed GomCollection interface in favor of Collection
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] Removed GomCollection interface in favor of Collection
- Date: Wed, 5 Dec 2018 18:40:59 +0000 (UTC)
commit 4db8df481d39ac857bd8bcd812e9a55375c3ded1
Author: Daniel Espinosa <esodan gmail com>
Date: Wed Dec 5 12:40:16 2018 -0600
Removed GomCollection interface in favor of Collection
gxml/Collections.vala | 30 +++----
gxml/GomCollections.vala | 168 ++++++------------------------------
gxml/GomElement.vala | 2 +-
gxml/GomObject.vala | 14 +--
gxml/Parser.vala | 14 +--
gxml/Schema.vala | 2 +-
gxml/SerializableGeeArrayList.vala | 8 +-
gxml/SerializableGeeDualKeyMap.vala | 8 +-
gxml/SerializableGeeHashMap.vala | 8 +-
gxml/SerializableGeeTreeMap.vala | 2 +-
gxml/meson.build | 2 +-
meson.build | 2 +-
12 files changed, 73 insertions(+), 187 deletions(-)
---
diff --git a/gxml/Collections.vala b/gxml/Collections.vala
index 5f1df31..c236276 100644
--- a/gxml/Collections.vala
+++ b/gxml/Collections.vala
@@ -23,27 +23,27 @@
using Gee;
/**
- * A DOM4 interface to keep references to {@link DomElement} children of a {@link parent_element}
+ * A DOM4 interface to keep references to {@link DomElement} children of a {@link element}
*/
public interface GXml.Collection : Object
{
/**
- * A list of child {@link DomElement} objects of {@link parent_element}
+ * A list of child {@link DomElement} objects of {@link element}
*/
public abstract GLib.Queue<int> nodes_index { get; }
/**
* A {@link GXml.DomElement} with all child elements in collection.
*/
- public abstract GXml.DomElement parent_element { get; construct set; }
+ public abstract GXml.DomElement element { get; construct set; }
/**
- * Local name of {@link DomElement} objects of {@link parent_element}, which could be
+ * Local name of {@link DomElement} objects of {@link element}, which could be
* contained in this collection.
*
* Used when reading to add elements to collection.
*/
public abstract string items_name { get; }
/**
- * A {@link GLib.Type} of {@link DomElement} child objects of {@link parent_element},
+ * A {@link GLib.Type} of {@link DomElement} child objects of {@link element},
* which could be contained in this collection.
*
* Type should be an {@link GomObject}.
@@ -51,11 +51,11 @@ public interface GXml.Collection : Object
public abstract Type items_type { get; construct set; }
/**
* Search and add references to all {@link GomObject} nodes as child of
- * {@link parent_element} with same, case insensitive, name of {@link items_name}
+ * {@link element} with same, case insensitive, name of {@link items_name}
*/
public abstract void search () throws GLib.Error;
/**
- * Gets a child {@link DomElement} of {@link parent_element} referenced in
+ * Gets a child {@link DomElement} of {@link element} referenced in
* {@link nodes_index}.
*/
public virtual DomElement? get_item (int index) throws GLib.Error {
@@ -65,12 +65,12 @@ public interface GXml.Collection : Object
throw new DomError.INDEX_SIZE_ERROR
(_("Invalid index for elements in array list"));
int i = nodes_index.peek_nth (index);
- if (i < 0 || i >= parent_element.child_nodes.size)
+ if (i < 0 || i >= element.child_nodes.size)
throw new DomError.INDEX_SIZE_ERROR
(_("Invalid index reference for child elements in array list"));
- var e = parent_element.child_nodes.get (i);
+ var e = element.child_nodes.get (i);
if (e != null)
- if (!(e is GXml.Collection))
+ if (!(e is GXml.DomElement))
throw new DomError.INVALID_NODE_TYPE_ERROR
(_("Referenced object's type is invalid. Should be a GXmlDomElement"));
return (DomElement?) e;
@@ -96,8 +96,8 @@ public interface GXml.Collection : Object
public abstract void initialize (GLib.Type t) throws GLib.Error;
/**
* Creates a new instance of {@link items_type}, with same
- * {@link DomNode.owner_document} than {@link parent_element}. New instance
- * is not set as a child of collection's {@link parent_element}; to do so,
+ * {@link DomNode.owner_document} than {@link element}. New instance
+ * is not set as a child of collection's {@link element}; to do so,
* use {@link append}
*
* Returns: a new instance object or null if type is not a {@link DomElement} or no parent has been set
@@ -105,9 +105,9 @@ public interface GXml.Collection : Object
public virtual DomElement? create_item () {
if (items_type.is_a (GLib.Type.INVALID)) return null;
if (!items_type.is_a (typeof (DomElement))) return null;
- if (parent_element == null) return null;
+ if (element == null) return null;
return Object.new (items_type,
- "owner_document", parent_element.owner_document) as DomElement;
+ "owner_document", element.owner_document) as DomElement;
}
/**
* Validate if given node and index, should be added to collection.
@@ -286,4 +286,4 @@ public interface GXml.ThreeMap : Object, GXml.Collection, Traversable<DomElement
* and skey as secondary key.
*/
public abstract Set<string> third_keys_set (string pkey, string skey);
-}
\ No newline at end of file
+}
diff --git a/gxml/GomCollections.vala b/gxml/GomCollections.vala
index ad885ff..bb260c1 100644
--- a/gxml/GomCollections.vala
+++ b/gxml/GomCollections.vala
@@ -21,120 +21,16 @@
*/
using Gee;
-/**
- * A DOM4 interface to keep references to {@link DomElement} in a {@link element}
- * child nodes. Only {@link GomObject} are supported.
- */
-[Version (deprecated = true, deprecated_since = "0.18", replacement = "GXml.Collection")]
-public interface GXml.GomCollection : Object
-{
- /**
- * A list of child {@link DomElement} objects of {@link element}
- */
- public abstract GLib.Queue<int> nodes_index { get; }
- /**
- * A {@link GomElement} with all child elements in collection.
- */
- public abstract GomElement element { get; construct set; }
- /**
- * Local name of {@link DomElement} objects of {@link element}, which could be
- * contained in this collection.
- *
- * Used when reading to add elements to collection.
- */
- public abstract string items_name { get; }
- /**
- * A {@link GLib.Type} of {@link DomElement} child objects of {@link element},
- * which could be contained in this collection.
- *
- * Type should be an {@link GomObject}.
- */
- public abstract Type items_type { get; construct set; }
- /**
- * Search and add references to all {@link GomObject} nodes as child of
- * {@link element} with same, case insensitive, name of {@link items_name}
- */
- public abstract void search () throws GLib.Error;
- /**
- * Gets a child {@link DomElement} of {@link element} referenced in
- * {@link nodes_index}.
- */
- public virtual DomElement? get_item (int index) throws GLib.Error {
- if (nodes_index.length == 0)
- return null;
- if (index < 0 || index >= nodes_index.length)
- throw new DomError.INDEX_SIZE_ERROR
- (_("Invalid index for elements in array list"));
- int i = nodes_index.peek_nth (index);
- if (i < 0 || i >= element.child_nodes.size)
- throw new DomError.INDEX_SIZE_ERROR
- (_("Invalid index reference for child elements in array list"));
- var e = element.child_nodes.get (i);
- if (e != null)
- if (!(e is GomElement))
- throw new DomError.INVALID_NODE_TYPE_ERROR
- (_("Referenced object's type is invalid. Should be a GXmlGomElement"));
- return (DomElement?) e;
- }
- /**
- * Adds a {@link DomElement} node to this collection. Depending on type of
- * collection, this method will take information from node to initialize
- * how to find it.
- */
- public abstract void append (DomElement node) throws GLib.Error;
- /**
- * Number of items referenced in {@link nodes_index}
- */
- public virtual int length { get { return (int) nodes_index.get_length (); } }
- /**
- * Initialize collection to use a given {@link GomElement} derived type.
- * Internally, this method create an instance of given type to initialize
- * {@link items_type} and {@link items_name}.
- *
- * This method can be used at construction time of classes implementing
- * {@link GomCollection} to initialize object type to refer in collection.
- */
- public abstract void initialize (GLib.Type t) throws GLib.Error;
- /**
- * Creates a new instance of {@link items_type}, with same
- * {@link DomNode.owner_document} than {@link element}. New instance
- * is not set as a child of collection's {@link element}; to do so,
- * use {@link append}
- *
- * Returns: a new instance object or null if type is not a {@link GomElement} or no parent has been set
- */
- public virtual GomElement? create_item () {
- if (items_type.is_a (GLib.Type.INVALID)) return null;
- if (!items_type.is_a (typeof (GomElement))) return null;
- if (element == null) return null;
- return Object.new (items_type,
- "owner_document", element.owner_document) as GomElement;
- }
- /**
- * Validate if given node and index, should be added to collection.
- *
- * Implementations should use this method to perform any action before
- * element is added to collection, like setup internal pointers to given
- * index, in order to get access to referenced node.
- *
- * Return: true if node and index should be added to collection.
- */
- public abstract bool validate_append (int index, DomElement element) throws GLib.Error;
- /**
- * Clear this collection in prepareation for a search
- */
- public abstract void clear () throws GLib.Error;
-}
/**
- * Base class for collections implemeting {@link GomCollection}, priving basic
+ * Base class for collections implemeting {@link Collection}, priving basic
* infrastructure.
*
* Collections properties should be initialized with current container element
* in order to be able to add new references to elements. Use {@link initialize_element}
* to set parent element and {@link search} to find elements for collection.
*/
-public abstract class GXml.BaseCollection : Object, Traversable<DomElement>, Iterable<DomElement>,
GomCollection, Collection {
+public abstract class GXml.BaseCollection : Object, Traversable<DomElement>, Iterable<DomElement>,
Collection {
/**
* A collection of node's index refered. Don't modify it manually.
*/
@@ -149,7 +45,7 @@ public abstract class GXml.BaseCollection : Object, Traversable<DomElement>, Ite
* contained in this collection.
*
* Used when reading to add elements to collection. You can set it at construction time,
- * by, for example, instantaiting a object of the type {@link GomCollection.items_type}
+ * by, for example, instantaiting a object of the type {@link Collection.items_type}
* then use {@link GomElement.local_name}'s value.
*/
protected string _items_name = "";
@@ -178,17 +74,7 @@ public abstract class GXml.BaseCollection : Object, Traversable<DomElement>, Ite
/**
* {@inheritDoc}
*/
- public GomElement element {
- get { return _element; }
- construct set {
- if (value != null)
- _element = value;
- }
- }
- /**
- * {@inheritDoc}
- */
- public DomElement parent_element {
+ public DomElement element {
get { return _element as DomElement; }
construct set {
if (value is GomElement)
@@ -208,13 +94,13 @@ public abstract class GXml.BaseCollection : Object, Traversable<DomElement>, Ite
_items_type = items_type;
}
/**
- * Initialize an {@link GomCollection} to use an element as children's parent.
- * Searchs for all nodes, calling {@link GomCollection.search}
- * with {@link GomCollection.items_type}, using its
+ * Initialize an {@link Collection} to use an element as children's parent.
+ * Searchs for all nodes, calling {@link Collection.search}
+ * with {@link Collection.items_type}, using its
* {@link DomElement.local_name} to find it.
*
* Implemenation classes, should initialize collection to hold a {@link GomElement}
- * derived type using {@link GomCollection.initialize}.
+ * derived type using {@link Collection.initialize}.
*/
public void initialize_element (GomElement e) throws GLib.Error {
_element = e;
@@ -248,7 +134,7 @@ public abstract class GXml.BaseCollection : Object, Traversable<DomElement>, Ite
}
/**
* Search for all child nodes in {@link element} of type {@link GomElement}
- * with a {@link GomElement.local_name} equal to {@link GomCollection.items_name},
+ * with a {@link GomElement.local_name} equal to {@link Collection.items_name},
* to add it to collection. This method calls {@link clear} first.
*
* Implementations could add additional restrictions to add element to collection.
@@ -284,15 +170,15 @@ public abstract class GXml.BaseCollection : Object, Traversable<DomElement>, Ite
return i.foreach (f);
}
// Itarable Interface
- public Iterator<DomElement> iterator () { return new GomCollectionIterator (this); }
+ public Iterator<DomElement> iterator () { return new CollectionIterator (this); }
// For Iterable interface implementation
- private class GomCollectionIterator : Object, Traversable<DomElement>, Iterator<DomElement> {
+ private class CollectionIterator : Object, Traversable<DomElement>, Iterator<DomElement> {
private int pos;
- private GomCollection _collection;
+ private Collection _collection;
public bool read_only { get { return false; } }
public bool valid { get { return (pos >= 0 && pos < _collection.length); } }
- public GomCollectionIterator (GomCollection col) {
+ public CollectionIterator (Collection col) {
_collection = col;
pos = -1;
}
@@ -336,8 +222,8 @@ public abstract class GXml.BaseCollection : Object, Traversable<DomElement>, Ite
}
/**
- * A class impementing {@link GomCollection} to store references to
- * child {@link DomElement} of {@link GomCollection.element}, using an index.
+ * A class impementing {@link Collection} to store references to
+ * child {@link DomElement} of {@link Collection.element}, using an index.
*
* {{{
* public class YourObject : GomElement {
@@ -365,13 +251,13 @@ public class GXml.GomArrayList : GXml.BaseCollection, GXml.List {
}
/**
- * A class impementing {@link GomCollection} to store references to
- * child {@link DomElement} of {@link GomCollection.element}, using an attribute in
+ * A class impementing {@link Collection} to store references to
+ * child {@link DomElement} of {@link Collection.element}, using an attribute in
* items as key or {@link MappeableElement.get_map_key} method if implemented
* by items to be added. If key is not defined in node, it is not added; but
- * keeps it as a child node of actual {@link GomCollection.element}.
+ * keeps it as a child node of actual {@link Collection.element}.
*
- * If {@link GomElement} to be added is of type {@link GomCollection.items_type}
+ * If {@link GomElement} to be added is of type {@link Collection.items_type}
* and implements {@link MappeableElement}, you should set {@link GomHashMap.attribute_key}
* to null in order to use returned value of {@link MappeableElement.get_map_key}
* as key.
@@ -512,16 +398,16 @@ public class GXml.GomHashMap : GXml.BaseCollection, GXml.Map {
}
/**
- * A class impementing {@link GomCollection} to store references to
- * child {@link DomElement} of {@link GomCollection.element}, using two attributes in
+ * A class impementing {@link Collection} to store references to
+ * child {@link DomElement} of {@link Collection.element}, using two attributes in
* items as primary and secondary keys or {@link MappeableElementPairKey.get_map_primary_key}
* and {@link MappeableElementPairKey.get_map_secondary_key} methods if
* {@link MappeableElementPairKey} are implemented
* by items to be added. If one or both keys are not defined in node,
* it is not added; but keeps it as a child node of actual
- * {@link GomCollection.element}.
+ * {@link Collection.element}.
*
- * If {@link GomElement} to be added is of type {@link GomCollection.items_type}
+ * If {@link GomElement} to be added is of type {@link Collection.items_type}
* and implements {@link MappeableElementPairKey}, you should set
* {@link attribute_primary_key} and {@link attribute_secondary_key}
* to null in order to use returned value of {@link MappeableElementPairKey.get_map_primary_key}
@@ -731,17 +617,17 @@ public class GXml.GomHashPairedMap : GXml.BaseCollection, GXml.PairedMap {
}
/**
- * A class impementing {@link GomCollection} to store references to
- * child {@link DomElement} of {@link GomCollection.element}, using three attributes in
+ * A class impementing {@link Collection} to store references to
+ * child {@link DomElement} of {@link Collection.element}, using three attributes in
* items as primary, secondary tertiary keys or {@link MappeableElementThreeKey.get_map_pkey},
* {@link MappeableElementThreeKey.get_map_skey}
* and {@link MappeableElementThreeKey.get_map_tkey}
* methods if {@link MappeableElementThreeKey} are implemented
* by items to be added. All keys should be defined in node, otherwise
* it is not added; but keeps it as a child node of actual
- * {@link GomCollection.element}.
+ * {@link Collection.element}.
*
- * If {@link GomElement} to be added is of type {@link GomCollection.items_type}
+ * If {@link GomElement} to be added is of type {@link Collection.items_type}
* and implements {@link MappeableElementThreeKey}, you should set
* {@link attribute_primary_key}, {@link attribute_secondary_key}
* and {@link attribute_third_key}
diff --git a/gxml/GomElement.vala b/gxml/GomElement.vala
index 233b5f4..4d5de1a 100644
--- a/gxml/GomElement.vala
+++ b/gxml/GomElement.vala
@@ -323,7 +323,7 @@ public class GXml.GomElement : GomNode,
* document, you can call {@link DomNode.owner_document} to set one if not set
* already.
*
- * Any instance properties of type {@link GomElement} or {@link GomCollection}
+ * Any instance properties of type {@link GomElement} or {@link Collection}
* should be initialized using {@link GomObject.set_instance_property}
*/
public void initialize (string local_name) {
diff --git a/gxml/GomObject.vala b/gxml/GomObject.vala
index 88b51f9..dcfe3de 100644
--- a/gxml/GomObject.vala
+++ b/gxml/GomObject.vala
@@ -67,7 +67,7 @@ public interface GXml.GomObject : GLib.Object,
return null;
}
/**
- * Returns a {@link GomObject} or a {@link GomCollection} property's
+ * Returns a {@link GomObject} or a {@link Collection} property's
* {@link GLib.ParamSpec} based on given name. This method is
* case insensitive.
*
@@ -85,7 +85,7 @@ public interface GXml.GomObject : GLib.Object,
string sname = spec.name.down ();
if (sname == name || nick == name) {
if (spec.value_type.is_a (typeof (GomObject))
- || spec.value_type.is_a (typeof (GomCollection))) {
+ || spec.value_type.is_a (typeof (Collection))) {
#if DEBUG
GLib.message ("Found Property: "+pname);
#endif
@@ -103,7 +103,7 @@ public interface GXml.GomObject : GLib.Object,
var l = new GLib.List<ParamSpec> ();
foreach (ParamSpec spec in this.get_class ().list_properties ()) {
if ((spec.value_type.is_a (typeof (GomObject))
- || spec.value_type.is_a (typeof (GomCollection)))
+ || spec.value_type.is_a (typeof (Collection)))
&& spec.value_type.is_instantiatable ()) {
#if DEBUG
GLib.message ("Object Name: "+spec.name+ " Nick: "+spec.get_nick ());
@@ -324,12 +324,12 @@ public interface GXml.GomObject : GLib.Object,
* Convenient method to set an instance of given property's
* name and initialize according to have same {@link DomNode.owner_document}
* and set its {@link DomNode.parent_node} to this appending it as a child.
- * If property is a {@link GomCollection} it is initialize to use
- * this as its {@link GomCollection.element}.
+ * If property is a {@link Collection} it is initialize to use
+ * this as its {@link Collection.element}.
*
* Instance is set ot object's property.
*
- * Property should be a {@link GomElement} or {@link GomCollection}
+ * Property should be a {@link GomElement} or {@link Collection}
*
* While an object could be created and set to a Object's property, it
* is not correctly initialized by default. This method helps in the process.
@@ -356,7 +356,7 @@ public interface GXml.GomObject : GLib.Object,
if (prop == null) return false;
Value v = Value (prop.value_type);
Object obj;
- if (prop.value_type.is_a (typeof (GomCollection))) {
+ if (prop.value_type.is_a (typeof (Collection))) {
obj = Object.new (prop.value_type, "element", this);
v.set_object (obj);
set_property (prop.name, v);
diff --git a/gxml/Parser.vala b/gxml/Parser.vala
index 9239bf7..e7b043b 100644
--- a/gxml/Parser.vala
+++ b/gxml/Parser.vala
@@ -214,7 +214,7 @@ public interface GXml.Parser : Object {
if (!(parent is GomObject)) return false;
foreach (ParamSpec pspec in
(parent as GomObject).get_property_element_list ()) {
- if (pspec.value_type.is_a (typeof (GomCollection))) continue;
+ if (pspec.value_type.is_a (typeof (Collection))) continue;
//if (!pspec.value_type.is_instantiatable ()) continue;
var obj = Object.new (pspec.value_type,
"owner-document", node.owner_document) as DomElement;
@@ -233,8 +233,8 @@ public interface GXml.Parser : Object {
}
/**
* Creates a new {@link DomElement} and append it as a child of parent: for current
- * read node, only if parent: have a property as {@link GomCollection} type and current
- * node have same local name as collection {@link GomCollection.items_name}
+ * read node, only if parent: have a property as {@link Collection} type and current
+ * node have same local name as collection {@link Collection.items_name}
*
* Returns: true if element is set to a new object, it is set as a child of parent:
* and has been added to a parent:'s collection property.
@@ -245,14 +245,14 @@ public interface GXml.Parser : Object {
if (!(parent is GomObject)) return false;
foreach (ParamSpec pspec in
(parent as GomObject).get_property_element_list ()) {
- if (!(pspec.value_type.is_a (typeof (GomCollection)))) continue;
- GomCollection col;
+ if (!(pspec.value_type.is_a (typeof (Collection)))) continue;
+ Collection col;
Value vc = Value (pspec.value_type);
parent.get_property (pspec.name, ref vc);
- col = vc.get_object () as GomCollection;
+ col = vc.get_object () as Collection;
if (col == null) {
col = Object.new (pspec.value_type,
- "element", parent) as GomCollection;
+ "element", parent) as Collection;
vc.set_object (col);
parent.set_property (pspec.name, vc);
}
diff --git a/gxml/Schema.vala b/gxml/Schema.vala
index c64731c..d977f19 100644
--- a/gxml/Schema.vala
+++ b/gxml/Schema.vala
@@ -212,7 +212,7 @@ public interface GXml.IXsdAttributeGroup : Object {
public const string SCHEMA_NODE_NAME = "attributeGroup";
}
-public interface GXml.IXsdList : Object, GomCollection {
+public interface GXml.IXsdList : Object, Collection {
public abstract DomElement element { get; construct set; }
public abstract Type items_type { get; construct set; }
public abstract Type items_name { get; construct set; }
diff --git a/gxml/SerializableGeeArrayList.vala b/gxml/SerializableGeeArrayList.vala
index b0a4fea..379475f 100644
--- a/gxml/SerializableGeeArrayList.vala
+++ b/gxml/SerializableGeeArrayList.vala
@@ -25,9 +25,9 @@ using Gee;
/**
* {@link GXml.Node} Serializable Framework. A {@link Serializable} objects container
* based on {@link Gee.ArrayList}. It requires to dump to a {@link GXml.Document}
- * or parse a pre-parsed XML tree {@link GXml.Document}. See {@link GXml.GomCollection} to avoid
+ * or parse a pre-parsed XML tree {@link GXml.Document}. See {@link GXml.Collection} to avoid
* pre/post parsing processes.
- *
+ *
* It is derived It implements {@link Serializable} and {@link SerializableCollection}
* interfaces.
*/
@@ -41,7 +41,7 @@ public class GXml.SerializableArrayList<G> : Gee.ArrayList<G>, Serializable, Ser
public virtual bool deserialized () { return _deserialized; }
public virtual bool deserialize_node (GXml.Node node) throws GLib.Error {
if (!element_type.is_a (typeof (GXml.Serializable))) {
- throw new SerializableError.UNSUPPORTED_TYPE_ERROR (_("%s: Value type '%s' is unsupported"),
+ throw new SerializableError.UNSUPPORTED_TYPE_ERROR (_("%s: Value type '%s' is unsupported"),
this.get_type ().name (), element_type.name ());
}
if (node is Element) {
@@ -60,7 +60,7 @@ public class GXml.SerializableArrayList<G> : Gee.ArrayList<G>, Serializable, Ser
if (_deserialized) return false;
if (_node == null) return false;
if (!element_type.is_a (typeof (GXml.Serializable))) {
- throw new SerializableError.UNSUPPORTED_TYPE_ERROR (_("%s: Value type '%s' is unsupported"),
+ throw new SerializableError.UNSUPPORTED_TYPE_ERROR (_("%s: Value type '%s' is unsupported"),
this.get_type ().name (), element_type.name ());
}
if (_node is Element) {
diff --git a/gxml/SerializableGeeDualKeyMap.vala b/gxml/SerializableGeeDualKeyMap.vala
index 2cfea00..f112b95 100644
--- a/gxml/SerializableGeeDualKeyMap.vala
+++ b/gxml/SerializableGeeDualKeyMap.vala
@@ -25,9 +25,9 @@ using Gee;
/**
* Serializable Framework. A {@link Serializable} objects container
* based on Gee interfaces with dual key. It requires to dump to a {@link GXml.Document}
- * or parse a pre-parsed XML tree {@link GXml.Document}. See {@link GXml.GomCollection} to avoid
+ * or parse a pre-parsed XML tree {@link GXml.Document}. See {@link GXml.Collection} to avoid
* pre/post parsing processes.
- *
+ *
* It implements {@link Serializable} and {@link SerializableCollection} interfaces, it is iterable as
* other Gee collections.
*/
@@ -43,7 +43,7 @@ public class GXml.SerializableDualKeyMap<P,S,V> : Object, Gee.Traversable <V>, S
public virtual bool deserialize_node (GXml.Node node) throws GLib.Error {
if (!(value_type.is_a (typeof (GXml.Serializable)) &&
value_type.is_a (typeof (SerializableMapDualKey)))) {
- throw new SerializableError.UNSUPPORTED_TYPE_ERROR (_("%s: Value type '%s' is unsupported"),
+ throw new SerializableError.UNSUPPORTED_TYPE_ERROR (_("%s: Value type '%s' is unsupported"),
this.get_type ().name (), value_type.name ());
}
if (node is Element) {
@@ -64,7 +64,7 @@ public class GXml.SerializableDualKeyMap<P,S,V> : Object, Gee.Traversable <V>, S
if (_node == null) return false;
if (!(value_type.is_a (typeof (GXml.Serializable)) &&
value_type.is_a (typeof (SerializableMapDualKey)))) {
- throw new SerializableError.UNSUPPORTED_TYPE_ERROR (_("%s: Value type '%s' is unsupported"),
+ throw new SerializableError.UNSUPPORTED_TYPE_ERROR (_("%s: Value type '%s' is unsupported"),
this.get_type ().name (), value_type.name ());
}
foreach (GXml.Node n in _node.children_nodes) {
diff --git a/gxml/SerializableGeeHashMap.vala b/gxml/SerializableGeeHashMap.vala
index a7e3092..572ac23 100644
--- a/gxml/SerializableGeeHashMap.vala
+++ b/gxml/SerializableGeeHashMap.vala
@@ -23,9 +23,9 @@ using GXml;
/**
* Serializable Framework. A {@link Serializable} objects container based
* on {@link Gee.HashMap}. It requires to dump to a {@link GXml.Document}
- * or parse a pre-parsed XML tree {@link GXml.Document}. See {@link GXml.GomCollection} to avoid
+ * or parse a pre-parsed XML tree {@link GXml.Document}. See {@link GXml.Collection} to avoid
* pre/post parsing processes.
- *
+ *
* It uses a key and value store implementing {@link Gee.HashMap} interface.
* It implements {@link Serializable} and {@link SerializableCollection} interfaces.
*/
@@ -40,7 +40,7 @@ public class GXml.SerializableHashMap<K,V> : Gee.HashMap<K,V>, Serializable, Ser
public virtual bool deserialize_node (GXml.Node node) throws GLib.Error {
if (!(value_type.is_a (typeof (GXml.Serializable)) &&
value_type.is_a (typeof (SerializableMapKey)))) {
- throw new SerializableError.UNSUPPORTED_TYPE_ERROR (_("%s: Value type '%s' is unsupported"),
+ throw new SerializableError.UNSUPPORTED_TYPE_ERROR (_("%s: Value type '%s' is unsupported"),
this.get_type ().name (), value_type.name ());
}
if (node is Element) {
@@ -61,7 +61,7 @@ public class GXml.SerializableHashMap<K,V> : Gee.HashMap<K,V>, Serializable, Ser
if (_node == null) return false;
if (!(value_type.is_a (typeof (GXml.Serializable)) &&
value_type.is_a (typeof (SerializableMapKey)))) {
- throw new SerializableError.UNSUPPORTED_TYPE_ERROR (_("%s: Value type '%s' is unsupported"),
+ throw new SerializableError.UNSUPPORTED_TYPE_ERROR (_("%s: Value type '%s' is unsupported"),
this.get_type ().name (), value_type.name ());
}
if (_node is Element) {
diff --git a/gxml/SerializableGeeTreeMap.vala b/gxml/SerializableGeeTreeMap.vala
index 5771b41..7d2a155 100644
--- a/gxml/SerializableGeeTreeMap.vala
+++ b/gxml/SerializableGeeTreeMap.vala
@@ -23,7 +23,7 @@ using GXml;
/**
* Serializable Framework. A {@link Serializable} objects container based
* on {@link Gee.TreeMap}. It requires to dump to a {@link GXml.Document}
- * or parse a pre-parsed XML tree {@link GXml.Document}. See {@link GXml.GomCollection} to avoid
+ * or parse a pre-parsed XML tree {@link GXml.Document}. See {@link GXml.Collection} to avoid
* pre/post parsing processes.
*
* It uses a key and value store implementing {@link Gee.TreeMap} interface.
diff --git a/gxml/meson.build b/gxml/meson.build
index cb6c45e..e9759e4 100644
--- a/gxml/meson.build
+++ b/gxml/meson.build
@@ -176,4 +176,4 @@ custom_target('typelib',
depends: lib,
install: true,
install_dir: join_paths(get_option('libdir'), 'girepository-1.0'))
-endif
\ No newline at end of file
+endif
diff --git a/meson.build b/meson.build
index d583b83..6287f33 100644
--- a/meson.build
+++ b/meson.build
@@ -1,7 +1,7 @@
project('gxml', [ 'vala', 'c'], version : '0.16.1')
PROJECT_NAME = meson.project_name ()
-API_VERSION = '0.16'
+API_VERSION = '0.18'
PROJECT_VERSION = meson.project_version ()
VERSIONED_PROJECT_NAME = PROJECT_NAME+'-'+API_VERSION
CAMEL_CASE_NAME = 'GXml'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]