From 685824e0cd6fd7f3f0096edea242dbea2ea35c7e Mon Sep 17 00:00:00 2001 From: Daniel Espinosa Date: Wed, 1 Mar 2017 13:50:53 -0600 Subject: [PATCH] Fix IXsdListAttributesGroup name. Documentation Fixes. IXsdListAttributesGroup use to have an incorrect name. Remember XSD Schema definitions is a work in progress, expect changes like this if future versions. --- gxml/DomCollections.vala | 6 ++-- gxml/DomNode.vala | 2 +- gxml/Element.vala | 2 +- gxml/GomCollections.vala | 33 +++++++++---------- gxml/GomElement.vala | 4 +-- gxml/GomObject.vala | 8 ++--- gxml/GomProperty.vala | 15 ++++----- gxml/GomSchema.vala | 2 +- gxml/Node.vala | 2 +- gxml/Schema.vala | 9 +++-- gxml/Serializable.vala | 58 ++++----------------------------- gxml/SerializableContainer.vala | 12 +++---- gxml/XParser.vala | 2 +- gxml/XPath.vala | 4 +-- 14 files changed, 53 insertions(+), 106 deletions(-) diff --git a/gxml/DomCollections.vala b/gxml/DomCollections.vala index 246fffe1..84efb0e5 100644 --- a/gxml/DomCollections.vala +++ b/gxml/DomCollections.vala @@ -171,9 +171,9 @@ public interface GXml.DomTokenList : GLib.Object, Gee.BidirList { public abstract void add (string[] tokens) throws GLib.Error; public abstract void remove (string[] tokens); /** - * If @auto is true, adds @param token if not present and removing if it is, @force value - * is taken in account. If @param auto is false, then @force is considered; if true adds - * @param token, if false removes it. + * If auto is true, adds token if not present and removing if it is, @force value + * is taken in account. If auto is false, then @force is considered; if true adds + * token, if false removes it. */ public abstract bool toggle (string token, bool force = false, bool auto = true) throws GLib.Error; public abstract string to_string (); diff --git a/gxml/DomNode.vala b/gxml/DomNode.vala index 32509fbd..e18ec9e4 100644 --- a/gxml/DomNode.vala +++ b/gxml/DomNode.vala @@ -103,7 +103,7 @@ public interface GXml.DomNode : GLib.Object, GXml.DomEventTarget { * belonging to given document. * * Only {@link GXml.DomElement} objects are supported. For attributes, use - * {@link GXml.DomElement.set_attr} method, passing source's name and value as arguments. + * {@link GXml.DomElement.set_attribute} method, passing source's name and value as arguments. * * @param doc a {@link GXml.DomDocument} owning destiny node * @param node a {@link GXml.DomElement} to copy nodes to diff --git a/gxml/Element.vala b/gxml/Element.vala index 27f933c8..60474e78 100644 --- a/gxml/Element.vala +++ b/gxml/Element.vala @@ -78,7 +78,7 @@ public interface GXml.Element : Object, GXml.Node /** * Convenient class for a list of {@link GXml.Element} objects based on - * {@link Gee.ListArray}, with good support for bindings. + * {@link Gee.ArrayList}, with good support for bindings. */ public class GXml.ElementList : ArrayList, GXml.DomHTMLCollection { // DomHTMLCollection diff --git a/gxml/GomCollections.vala b/gxml/GomCollections.vala index 899af4d3..f1a9da08 100644 --- a/gxml/GomCollections.vala +++ b/gxml/GomCollections.vala @@ -23,8 +23,7 @@ /** * An interface to keep references to {@link DomElement} in a {@link element} - * child nodes. Only {@link GomObject} are supported. It can be filled out - * using {@link update}. + * child nodes. Only {@link GomObject} are supported. */ public interface GXml.GomCollection : Object { @@ -44,7 +43,7 @@ public interface GXml.GomCollection : Object */ public abstract string items_name { get; } /** - * A {@link Type} of {@link DomElement} child objects of {@link 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}. @@ -52,7 +51,7 @@ public interface GXml.GomCollection : Object 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 element_name} + * {@link element} with same, case insensitive, name of {@link items_name} */ public abstract void search () throws GLib.Error; /** @@ -262,7 +261,7 @@ public abstract class GXml.BaseCollection : Object { /** * A class impementing {@link GomCollection} to store references to - * child {@link DomElement} of {@link element}, using an index. + * child {@link DomElement} of {@link GomCollection.element}, using an index. * * {{{ * public class YourObject : GomElement { @@ -291,7 +290,7 @@ public class GXml.GomArrayList : GXml.BaseCollection, GomCollection { /** * Inteface to be implemented by {@link GomElement} derived classes - * in order to provide a string to be used in {@link GomHasMap} as key. + * in order to provide a string to be used in {@link GomHashMap} as key. * * If {@link GomHashMap} has set its {@link GomHashMap.attribute_key} * its value has precedence over this method. @@ -302,8 +301,8 @@ public interface GXml.MappeableElement : Object, DomElement { /** * A class impementing {@link GomCollection} to store references to - * child {@link DomElement} of {@link element}, using an attribute in - * items as key or {@link MappeableElement.map_key} method if implemented + * child {@link DomElement} of {@link GomCollection.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}. * @@ -438,7 +437,7 @@ public class GXml.GomHashMap : GXml.BaseCollection, GXml.GomCollection { /** * Inteface to be implemented by {@link GomElement} derived classes - * in order to provide a string to be used in {@link GomHasMap} as key. + * in order to provide a string to be used in {@link GomHashMap} as key. * * If {@link GomHashMap} has set its {@link GomHashMap.attribute_key} * its value has precedence over this method. @@ -450,9 +449,9 @@ public interface GXml.MappeableElementPairKey : Object, DomElement { /** * A class impementing {@link GomCollection} to store references to - * child {@link DomElement} of {@link element}, using two attributes in - * items as primary and secondary keys or {@link MappeableElementPairKey.map_primary_key} - * and {@link MappeableElementPairKey.map_secondary_key} methods if + * child {@link DomElement} of {@link GomCollection.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} is 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 @@ -460,9 +459,9 @@ public interface GXml.MappeableElementPairKey : Object, DomElement { * * If {@link GomElement} to be added is of type {@link GomCollection.items_type} * and implements {@link MappeableElementPairKey}, you should set - * {@link GomHashMap.attribute_primary_key} and {@link GomHashMap.attribute_secondary_key} - * to null in order to use returned value of {@link MappeableElementPairKey.map_primary_key} - * and {@link MappeableElementPairKey.map_secondary_key} + * {@link attribute_primary_key} and {@link attribute_secondary_key} + * to null in order to use returned value of {@link MappeableElementPairKey.get_map_primary_key} + * and {@link MappeableElementPairKey.get_map_secondary_key} * as keys. * * {{{ @@ -589,8 +588,8 @@ public class GXml.GomHashPairedMap : GXml.BaseCollection, GXml.GomCollection { return ht.get_keys (); } /** - * Validates if given element has a {@link GomHashMap.attribute_primary_key} - * and {@link GomHashMap.attribute_secondary_key} set, + * Validates if given element has a {@link attribute_primary_key} + * and {@link attribute_secondary_key} set, * if so adds a new keys pointing to given index and returns true. * * Attribute should be a valid {@link DomElement} attribute or diff --git a/gxml/GomElement.vala b/gxml/GomElement.vala index 259c7d01..ce17bfec 100644 --- a/gxml/GomElement.vala +++ b/gxml/GomElement.vala @@ -61,7 +61,7 @@ public class GXml.GomElement : GomNode, parser.read_stream (istream, cancellable); } /** - * Parses an XML string, deserializing it over {@link GomElemen}. + * Parses an XML string, deserializing it over {@link GomElement}. */ public void read_from_string (string str) throws GLib.Error { var parser = new XParser (this); @@ -250,7 +250,7 @@ public class GXml.GomElement : GomNode, * already. * * Any instance properties of type {@link GomElement} or {@link GomCollection} - * should be initialized using {@link GomObject.create_instance_property} + * should be initialized using {@link GomObject.set_instance_property} */ public void initialize (string local_name) { _local_name = local_name; diff --git a/gxml/GomObject.vala b/gxml/GomObject.vala index a31bdd96..7a0736e2 100644 --- a/gxml/GomObject.vala +++ b/gxml/GomObject.vala @@ -51,7 +51,7 @@ public interface GXml.GomObject : GLib.Object, return l; } /** - * Returns property's {@link ParamSpec} based on given nick. This function is + * Returns property's {@link GLib.ParamSpec} based on given nick. This function is * case insensitive. */ public virtual ParamSpec? find_property_name (string pname) { @@ -75,7 +75,7 @@ public interface GXml.GomObject : GLib.Object, } /** * Returns a {@link GomObject} or a {@link GomCollection} property's - * {@link ParamSpec} based on given name. This method is + * {@link GLib.ParamSpec} based on given name. This method is * case insensitive. * * This method will check if nick's name is equal than given name @@ -204,7 +204,7 @@ public interface GXml.GomObject : GLib.Object, * transformation from string. * * By default all {@link GLib.Object} are children of - * this object, see {@link set_child} + * this object. */ public virtual bool set_attribute (string name, string val) { #if DEBUG @@ -273,7 +273,7 @@ public interface GXml.GomObject : GLib.Object, /** * Search a {@link GLib.Object} property with given name * and returns it, if it is a {@link DomElement}. If not found, - * {@link DomNode.get_elements_by_tag_name} is called, returning + * {@link DomElement.get_elements_by_tag_name} is called, returning * first node found. Tag name to use, is the given name parameter. * * @param name a name of this object's property of type {@link DomElement} or diff --git a/gxml/GomProperty.vala b/gxml/GomProperty.vala index 6cdea519..34ec9a66 100644 --- a/gxml/GomProperty.vala +++ b/gxml/GomProperty.vala @@ -50,8 +50,7 @@ public abstract class GXml.GomBaseProperty : Object, GXml.GomProperty { */ public abstract string? value { owned get; set; } /** - * Takes a string and check if it can be validated using - * {@link validation_rule}. + * Takes a string and check if it can be valid for this property. */ public virtual bool validate_value (string val) { return true; } } @@ -137,14 +136,13 @@ public class GXml.GomArrayString : GomBaseProperty { /** * Convenient class to handle a {@link GomElement}'s attribute * using a list of pre-defined and unmutable values, taken from - * an {@link XsdSimpleType} definition + * an {@link IXsdSimpleType} definition */ public class GXml.GomXsdArrayString : GomArrayString { protected GLib.File _source = null; protected string _simple_type = null; /** - * Name of {@link XsdSympleType} to use as source. If {@link source} is set - * calls {@link initialize_xsd}. + * Name of {@link IXsdSimpleType} to use as source. */ public string simple_type { get { return _simple_type; } @@ -152,8 +150,7 @@ public class GXml.GomXsdArrayString : GomArrayString { } /** * A {@link GLib.File} source to read from, simple type definitions in - * an XSD file type. Once it is set, search required {@link simple_type} - * definition name and call {@link initalize_xsd} + * an XSD file type. */ public GLib.File source { get { return _source; } @@ -164,8 +161,8 @@ public class GXml.GomXsdArrayString : GomArrayString { } /** * Load list of strings from a {@link GLib.File}, parsing using an - * {@link GomXsdSchema} object and searching for {@link XsdSimpleType} - * definition with name {@link source_type}. + * {@link GomXsdSchema} object and searching for {@link IXsdSimpleType} + * definition with name {@link simple_type}. */ public void load () throws GLib.Error { #if DEBUG diff --git a/gxml/GomSchema.vala b/gxml/GomSchema.vala index 457cb942..387d1457 100644 --- a/gxml/GomSchema.vala +++ b/gxml/GomSchema.vala @@ -142,7 +142,7 @@ public class GXml.GomXsdComplexType : GomXsdBaseType { */ public GomXsdList type_attributes { get { return _type_attributes; } } /** - * List of type {@link GomXsdGroupAttribute} definitions + * List of group {@link GomXsdAttribute} definitions */ public GomXsdList group_attributes { get { return _group_attributes; } } construct { diff --git a/gxml/Node.vala b/gxml/Node.vala index 4ef423ef..b35da626 100644 --- a/gxml/Node.vala +++ b/gxml/Node.vala @@ -217,7 +217,7 @@ public interface GXml.Node : Object /** * Convenient class for a list of {@link GXml.Node} objects based on - * {@link Gee.ListArray}, with good support for bindings. + * {@link Gee.ArrayList}, with good support for bindings. */ public class GXml.NodeList : Gee.ArrayList { public new GXml.Node get (int index) { return base.get (index); } diff --git a/gxml/Schema.vala b/gxml/Schema.vala index cc7deb48..57162d26 100644 --- a/gxml/Schema.vala +++ b/gxml/Schema.vala @@ -111,7 +111,6 @@ public interface GXml.IXsdComplexType : Object, DomElement, IXsdBaseType { * (#all | List of (extension | restriction)) */ public abstract string final { get; set; } - public abstract string? id { get; set; } public abstract bool mixed { get; set; } public abstract string name { get; set; } /** @@ -123,13 +122,13 @@ public interface GXml.IXsdComplexType : Object, DomElement, IXsdBaseType { */ public abstract IXsdBaseContent content_type { get; set; } /** - * List of type {@link IXsdAttribute} definitions + * List of {@link IXsdAttribute} definitions */ public abstract IXsdListAttributes type_attributes { get; } /** - * List of type {@link IXsdGroupAttribute} definitions + * List of {@link IXsdAttributeGroup} definitions */ - public abstract IXsdListGroupAttributes group_attributes { get; } + public abstract IXsdListAttributesGroup group_attributes { get; } } public interface GXml.IXsdExtension : Object, DomElement { @@ -225,6 +224,6 @@ public interface GXml.IXsdListElements : Object, IXsdList {} public interface GXml.IXsdListSimpleTypes : Object, IXsdList {} public interface GXml.IXsdListComplexTypes : Object, IXsdList {} public interface GXml.IXsdListAttributes : Object, IXsdList {} -public interface GXml.IXsdListGroupAttributes : Object, IXsdList {} +public interface GXml.IXsdListAttributesGroup : Object, IXsdList {} public interface GXml.IXsdListTypeRestrictionEnumerations : Object, IXsdList {} public interface GXml.IXsdListTypeRestrictionWhiteSpaces : Object, IXsdList {} diff --git a/gxml/Serializable.vala b/gxml/Serializable.vala index 0282cce7..75aa3117 100644 --- a/gxml/Serializable.vala +++ b/gxml/Serializable.vala @@ -118,9 +118,7 @@ namespace GXml { * * Implementors could set up methods to provide a clean easy to use API to set * nodes contents. In most cases, users would like to set a value through a getter - * or setter or through a property in the class. If you use a property, you should - * add it to {@link ignored_serializable_properties} in order to see its value - * in a XML node property. + * or setter or through a property in the class. * */ public abstract bool serialize_use_xml_node_value (); @@ -186,7 +184,7 @@ namespace GXml { * override the properties to serialize. * * @param property_node the {@link GXml.Node} encapsulating data to deserialize - * @return `true` if the property was handled, `false` if {@link GXml.Serialization} should handle it. + * @return `true` if the property was handled. */ public abstract bool deserialize_property (GXml.Node property_node) throws GLib.Error; @@ -234,28 +232,8 @@ namespace GXml { ParamSpec prop); /** - * Handles finding the {@link GLib.ParamSpec} for a given property. - * - * {@link GXml.Serialization} uses {@link GLib.ObjectClass.find_property} - * (as well as {@link GLib.ObjectClass.list_properties}, - * {@link GLib.Object.get_property}, and - * {@link GLib.Object.set_property}) to manage serialization - * of properties. {@link GXml.Serializable} gives the - * implementing class an opportunity to override - * {@link GLib.ObjectClass.find_property} to control - * what properties exist for {@link GXml.Serialization}'s - * purposes. - * - * For instance, if an object has private data fields - * that are not installed public properties, but that - * should be serialized, {@link GLib.ObjectClass.find_property} can be defined - * to return a {@link GLib.ParamSpec} for non-installed - * properties. Other {@link GXml.Serializable} functions - * should be consistent with it. - * - * An implementing class might wish to maintain such - * {@link GLib.ParamSpec} s separately, rather than creating new - * ones for each call. + * Handles finding the {@link GLib.ParamSpec} for a given property, it should + * a serializable property, see {@link list_serializable_properties}. * * @param property_name the name of a property to obtain a {@link GLib.ParamSpec} for * @return a {@link GLib.ParamSpec} describing the named property @@ -288,29 +266,7 @@ namespace GXml { } /** - * List the known properties for an object's class - * - * Class {@link GXml.Serialization} uses - * {@link GLib.ObjectClass.list_properties} (as well as - * {@link GLib.ObjectClass.find_property}, - * {@link GLib.Object.get_property}, and {@link GLib.Object.set_property}) - * to manage serialization of an object's properties. - * {@link GXml.Serializable} gives an implementing class an - * opportunity to override - * {@link GLib.ObjectClass.list_properties} to control which - * properties exist for {@link GXml.Serialization}'s purposes. - * - * For instance, if an object has private data fields - * that are not installed public properties, but that - * should be serialized, list_properties can be - * defined to return a list of {@link GLib.ParamSpec} s covering - * all the "properties" to serialize. Other - * {@link GXml.Serializable} functions should be consistent - * with it. - * - * An implementing class might wish to maintain such - * {@link GLib.ParamSpec} s separately, rather than creating new - * ones for each call. + * List the known properties for an object's class to be de/seriablizable. * * @return an array of {@link GLib.ParamSpec} of "properties" for the object. */ @@ -346,10 +302,10 @@ namespace GXml { * representation of a value into the type specified by the * supplied #GValue dest. A #GXmlSerializableError will be * set if the string cannot be parsed into the desired type. - * + * * {@link Serializable} interface support a number of data types to convert * from its string representation. These are supported types: - * + * * a. integers: int8, int64, uint, long, ulong, char, uchar * a. boolean * a. floats: float, double diff --git a/gxml/SerializableContainer.vala b/gxml/SerializableContainer.vala index 301a0ea5..430b71b3 100644 --- a/gxml/SerializableContainer.vala +++ b/gxml/SerializableContainer.vala @@ -58,20 +58,16 @@ public interface GXml.SerializableCollection : Object, Gee.Traversable? resolver = null) -- GitLab