Hello community,

here is the log from the commit of package sord for openSUSE:Factory checked in 
at 2013-09-11 13:44:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sord (Old)
 and      /work/SRC/openSUSE:Factory/.sord.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sord"

Changes:
--------
--- /work/SRC/openSUSE:Factory/sord/sord.changes        2012-10-24 
17:45:41.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.sord.new/sord.changes   2013-09-11 
13:44:09.000000000 +0200
@@ -1,0 +2,12 @@
+Thu Sep  5 20:51:13 UTC 2013 - [email protected]
+
+- Update to 0.12.0
+  * Update to waf 1.7.9 and autowaf r90 (install docs to versioned directory)
+  * Add sord_get() for easily getting single property values
+  * sord_validate: Pass type check when range is xsd:anyURI and value is a URI
+  * sord_validate: Support any subClassOf rdf:Property, not just baked-in ones
+  * sordmm.hpp: Add convenient constructors for decimal and integer literals
+  * sordmm.hpp: Add Node::to_serd_node()
+  * sordmm.hpp: Don't automatically add RDF namespace prefix to world
+
+-------------------------------------------------------------------

Old:
----
  sord-0.10.4.tar.bz2

New:
----
  sord-0.12.0.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sord.spec ++++++
--- /var/tmp/diff_new_pack.G7e6Se/_old  2013-09-11 13:44:11.000000000 +0200
+++ /var/tmp/diff_new_pack.G7e6Se/_new  2013-09-11 13:44:11.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package sord
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %define soname 0
 
 Name:           sord
-Version:        0.10.4
+Version:        0.12.0
 Release:        0
 Summary:        Utilities to work with RDF data
 License:        ISC
@@ -103,7 +103,7 @@
 
 %files -n libsord-docs
 %defattr(0644,root,root,0755)
-%{_defaultdocdir}/sord/
+%{_defaultdocdir}/sord-0/
 %{_mandir}/man3/*
 
 %changelog

++++++ sord-0.10.4.tar.bz2 -> sord-0.12.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sord-0.10.4/NEWS new/sord-0.12.0/NEWS
--- old/sord-0.10.4/NEWS        2012-10-15 00:23:57.000000000 +0200
+++ new/sord-0.12.0/NEWS        2013-02-18 17:06:00.000000000 +0100
@@ -1,3 +1,15 @@
+sord (0.12.0) stable;
+
+  * Update to waf 1.7.9 and autowaf r90 (install docs to versioned directory)
+  * Add sord_get() for easily getting single property values
+  * sord_validate: Pass type check when range is xsd:anyURI and value is a URI
+  * sord_validate: Support any subClassOf rdf:Property, not just baked-in ones
+  * sordmm.hpp: Add convenient constructors for decimal and integer literals
+  * sordmm.hpp: Add Node::to_serd_node()
+  * sordmm.hpp: Don't automatically add RDF namespace prefix to world
+
+ -- David Robillard <[email protected]>  Mon, 18 Feb 2013 11:05:59 -0500
+
 sord (0.10.4) stable;
 
   * Implement better data type validation in sord_validate conformant with
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sord-0.10.4/README new/sord-0.12.0/README
--- old/sord-0.10.4/README      2012-04-17 19:01:40.000000000 +0200
+++ new/sord-0.12.0/README      2013-01-14 06:18:52.000000000 +0100
@@ -1,5 +1,5 @@
 Sord
-----
+====
 
 Sord is a lightweight C library for storing RDF statements in memory.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sord-0.10.4/doc/sord_validate.1 
new/sord-0.12.0/doc/sord_validate.1
--- old/sord-0.10.4/doc/sord_validate.1 2012-09-09 08:58:42.000000000 +0200
+++ new/sord-0.12.0/doc/sord_validate.1 2013-02-18 17:11:25.000000000 +0100
@@ -45,7 +45,7 @@
 sord_validate was written by David Robillard <[email protected]>
 
 .SH COPYRIGHT
-Copyright \(co 2012 David Robillard.
+Copyright \(co 2012-2013 David Robillard.
 .br
 License: <http://www.opensource.org/licenses/isc-license>
 .br
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sord-0.10.4/doc/sordi.1 new/sord-0.12.0/doc/sordi.1
--- old/sord-0.10.4/doc/sordi.1 2012-09-09 08:58:57.000000000 +0200
+++ new/sord-0.12.0/doc/sordi.1 2013-02-18 17:11:25.000000000 +0100
@@ -31,7 +31,7 @@
 Sordi was written by David Robillard <[email protected]>
 
 .SH COPYRIGHT
-Copyright \(co 2011 David Robillard.
+Copyright \(co 2011-2013 David Robillard.
 .br
 License: <http://www.opensource.org/licenses/isc-license>
 .br
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sord-0.10.4/sord/sord.h new/sord-0.12.0/sord/sord.h
--- old/sord-0.10.4/sord/sord.h 2012-08-10 00:33:30.000000000 +0200
+++ new/sord-0.12.0/sord/sord.h 2013-02-18 18:19:55.000000000 +0100
@@ -1,5 +1,5 @@
 /*
-  Copyright 2011-2012 David Robillard <http://drobilla.net>
+  Copyright 2011-2013 David Robillard <http://drobilla.net>
 
   Permission to use, copy, modify, and/or distribute this software for any
   purpose with or without fee is hereby granted, provided that the above
@@ -397,6 +397,20 @@
             const SordNode* p,
             const SordNode* o,
             const SordNode* g);
+/**
+   Search for a single node that matches a pattern.
+   Exactly one of @p s, @p p, @p o must be NULL.
+   This function is mainly useful for predicates that only have one value.
+   The returned node must be freed using sord_node_free.
+   @return the first matching node, or NULL if no matches are found.
+*/
+SORD_API
+SordNode*
+sord_get(SordModel*      model,
+         const SordNode* s,
+         const SordNode* p,
+         const SordNode* o,
+         const SordNode* g);
 
 /**
    Return true iff a statement exists.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sord-0.10.4/sord/sordmm.hpp 
new/sord-0.12.0/sord/sordmm.hpp
--- old/sord-0.10.4/sord/sordmm.hpp     2012-08-10 00:33:30.000000000 +0200
+++ new/sord-0.12.0/sord/sordmm.hpp     2013-02-18 18:40:54.000000000 +0100
@@ -1,5 +1,5 @@
 /*
-  Copyright 2011-2012 David Robillard <http://drobilla.net>
+  Copyright 2011-2013 David Robillard <http://drobilla.net>
 
   Permission to use, copy, modify, and/or distribute this software for any
   purpose with or without fee is hereby granted, provided that the above
@@ -113,7 +113,6 @@
                : _next_blank_id(0)
        {
                _c_obj = sord_world_new();
-               add_prefix("rdf", 
"http://www.w3.org/1999/02/22-rdf-syntax-ns#";);
        }
 
        inline ~World() {
@@ -151,6 +150,7 @@
        inline Node(World& world, Type t, const std::string& s);
        inline Node(World& world);
        inline Node(World& world, const SordNode* node);
+       inline Node(World& world, SordNode* node, bool copy=false);
        inline Node(const Node& other);
        inline ~Node();
 
@@ -161,6 +161,10 @@
        inline const SordNode* get_node() const { return _c_obj; }
        inline SordNode*       get_node()       { return _c_obj; }
 
+       const SerdNode* to_serd_node() {
+               return sord_node_to_serd_node(_c_obj);
+       }
+
        inline bool is_valid() const { return type() != UNKNOWN; }
 
        inline bool operator<(const Node& other) const {
@@ -240,6 +244,30 @@
 public:
        inline Literal(World& world, const std::string& s)
                : Node(world, Node::LITERAL, s) {}
+
+       static inline Node decimal(World& world, double d, unsigned 
frac_digits) {
+               const SerdNode val  = serd_node_new_decimal(d, 7);
+               const SerdNode type = serd_node_from_string(
+                       SERD_URI, (const uint8_t*)SORD_NS_XSD "decimal");
+
+               return Node(
+                       world,
+                       sord_node_from_serd_node(
+                               world.c_obj(), world.prefixes().c_obj(), &val, 
&type, NULL),
+                       false);
+       }
+
+       static inline Node integer(World& world, int64_t i) {
+               const SerdNode val  = serd_node_new_integer(i);
+               const SerdNode type = serd_node_from_string(
+                       SERD_URI, (const uint8_t*)SORD_NS_XSD "integer");
+
+               return Node(
+                       world,
+                       sord_node_from_serd_node(
+                               world.c_obj(), world.prefixes().c_obj(), &val, 
&type, NULL),
+                       false);
+       }
 };
 
 inline
@@ -278,7 +306,14 @@
 Node::Node(World& world, const SordNode* node)
        : _world(&world)
 {
-       _c_obj = node ? sord_node_copy(node) : NULL;
+       _c_obj = sord_node_copy(node);
+}
+
+inline
+Node::Node(World& world, SordNode* node, bool copy)
+       : _world(&world)
+{
+       _c_obj = copy ? sord_node_copy(node) : node;
 }
 
 inline
@@ -431,6 +466,10 @@
                         const Node& predicate,
                         const Node& object);
 
+       inline Node get(const Node& subject,
+                       const Node& predicate,
+                       const Node& object);
+
        inline World& world() const { return _world; }
 
 private:
@@ -596,6 +635,18 @@
        return Iter(_world, sord_find(_c_obj, quad));
 }
 
+inline Node
+Model::get(const Node& subject,
+           const Node& predicate,
+           const Node& object)
+{
+       SordNode* c_node = sord_get(
+               _c_obj, subject.c_obj(), predicate.c_obj(), object.c_obj(), 
NULL);
+       Node node(_world, c_node);
+       sord_node_free(_world.c_obj(), c_node);
+       return node;
+}
+
 }  // namespace Sord
 
 #endif  // SORD_SORDMM_HPP
Files old/sord-0.10.4/sord-0.10.4.tar.bz2.sig and 
new/sord-0.12.0/sord-0.10.4.tar.bz2.sig differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sord-0.10.4/src/sord.c new/sord-0.12.0/src/sord.c
--- old/sord-0.10.4/src/sord.c  2012-08-23 05:36:38.000000000 +0200
+++ new/sord-0.12.0/src/sord.c  2013-02-18 18:15:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*
-  Copyright 2011 David Robillard <http://drobilla.net>
+  Copyright 2011-2013 David Robillard <http://drobilla.net>
 
   Permission to use, copy, modify, and/or distribute this software for any
   purpose with or without fee is hereby granted, provided that the above
@@ -844,6 +844,31 @@
        return sord_find(model, pat);
 }
 
+SordNode*
+sord_get(SordModel*      model,
+         const SordNode* s,
+         const SordNode* p,
+         const SordNode* o,
+         const SordNode* g)
+{
+       if ((bool)s + (bool)p + (bool)o != 2) {
+               return NULL;
+       }
+
+       SordIter* i   = sord_search(model, s, p, o, g);
+       SordNode* ret = NULL;
+       if (!s) {
+               ret = sord_node_copy(sord_iter_get_node(i, SORD_SUBJECT));
+       } else if (!p) {
+               ret = sord_node_copy(sord_iter_get_node(i, SORD_PREDICATE));
+       } else if (!o) {
+               ret = sord_node_copy(sord_iter_get_node(i, SORD_OBJECT));
+       }
+
+       sord_iter_free(i);
+       return ret;
+}
+
 bool
 sord_ask(SordModel*      model,
          const SordNode* s,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sord-0.10.4/src/sord_test.c 
new/sord-0.12.0/src/sord_test.c
--- old/sord-0.10.4/src/sord_test.c     2012-08-10 00:33:31.000000000 +0200
+++ new/sord-0.12.0/src/sord_test.c     2013-01-14 07:51:40.000000000 +0100
@@ -238,6 +238,22 @@
                                 TUP_FMT_ARGS(nomatch));
        }
 
+       if (sord_get(sord, NULL, NULL, uri(world, 3), g)) {
+               return test_fail("Fail: Get *,*,3 succeeded\n");
+       } else if (!sord_node_equals(
+                          sord_get(sord, uri(world, 1), uri(world, 2), NULL, 
g),
+                          uri(world, 3))) {
+               return test_fail("Fail: Get 1,2,* != 3\n");
+       } else if (!sord_node_equals(
+                          sord_get(sord, uri(world, 1), NULL, uri(world, 3), 
g),
+                          uri(world, 2))) {
+               return test_fail("Fail: Get 1,*,3 != 2\n");
+       } else if (!sord_node_equals(
+                          sord_get(sord, NULL, uri(world, 2), uri(world, 3), 
g),
+                          uri(world, 1))) {
+               return test_fail("Fail: Get *,2,3 != 1\n");
+       }
+
        for (unsigned i = 0; i < NUM_PATTERNS; ++i) {
                QueryTest test = patterns[i];
                SordQuad  pat = { test.query[0], test.query[1], test.query[2], 
g };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sord-0.10.4/src/sord_validate.c 
new/sord-0.12.0/src/sord_validate.c
--- old/sord-0.10.4/src/sord_validate.c 2012-09-09 09:06:24.000000000 +0200
+++ new/sord-0.12.0/src/sord_validate.c 2013-02-18 17:11:25.000000000 +0100
@@ -1,5 +1,5 @@
 /*
-  Copyright 2012 David Robillard <http://drobilla.net>
+  Copyright 2012-2013 David Robillard <http://drobilla.net>
 
   Permission to use, copy, modify, and/or distribute this software for any
   purpose with or without fee is hereby granted, provided that the above
@@ -63,6 +63,7 @@
        SordNode* rdfs_domain;
        SordNode* rdfs_range;
        SordNode* rdfs_subClassOf;
+       SordNode* xsd_anyURI;
        SordNode* xsd_decimal;
        SordNode* xsd_maxInclusive;
        SordNode* xsd_minInclusive;
@@ -79,7 +80,7 @@
 {
        printf("sord_validate " SORD_VERSION
               " <http://drobilla.net/software/sord>\n");
-       printf("Copyright 2012 David Robillard <http://drobilla.net>.\n"
+       printf("Copyright 2012-2013 David Robillard <http://drobilla.net>.\n"
               "License: <http://www.opensource.org/licenses/isc>\n"
               "This is free software; you are free to change and redistribute 
it."
               "\nThere is NO WARRANTY, to the extent permitted by law.\n");
@@ -349,6 +350,12 @@
        } else if (sord_node_get_type(node) == SORD_URI) {
                if (sord_node_equals(type, uris->foaf_Document)) {
                        return true;  // Questionable...
+               } else if (is_descendant_of(
+                                  model, uris,
+                                  type, uris->xsd_anyURI, 
uris->owl_onDatatype)) {
+                       /* Type is any URI and this is a URI, so pass.  
Restrictions on
+                          anyURI subtypes are not currently checked (very 
uncommon). */
+                       return true;  // Type is anyURI, and this is a URI
                } else {
                        SordIter* t = sord_search(model, node, uris->rdf_type, 
NULL, NULL);
                        for (; !sord_iter_end(t); sord_iter_next(t)) {
@@ -446,6 +453,7 @@
        URI(rdfs, domain);
        URI(rdfs, range);
        URI(rdfs, subClassOf);
+       URI(xsd, anyURI);
        URI(xsd, decimal);
        URI(xsd, maxInclusive);
        URI(xsd, minInclusive);
@@ -465,24 +473,29 @@
                const SordNode* pred = quad[SORD_PREDICATE];
                const SordNode* obj  = quad[SORD_OBJECT];
 
-               bool is_Property = sord_ask(
-                       model, pred, uris.rdf_type, uris.rdf_Property, 0);
-               bool is_OntologyProperty = sord_ask(
-                       model, pred, uris.rdf_type, uris.owl_OntologyProperty, 
0);
-               bool is_ObjectProperty = sord_ask(
+               bool is_any_property = false;
+               SordIter* t = sord_search(model, pred, uris.rdf_type, NULL, 
NULL);
+               for (; !sord_iter_end(t); sord_iter_next(t)) {
+                       if (is_descendant_of(model, &uris,
+                                            sord_iter_get_node(t, SORD_OBJECT),
+                                            uris.rdf_Property,
+                                            uris.rdfs_subClassOf)) {
+                               is_any_property = true;
+                               break;
+                       }
+               }
+               sord_iter_free(t);
+
+               const bool is_ObjectProperty = sord_ask(
                        model, pred, uris.rdf_type, uris.owl_ObjectProperty, 0);
-               bool is_FunctionalProperty = sord_ask(
+               const bool is_FunctionalProperty = sord_ask(
                        model, pred, uris.rdf_type, 
uris.owl_FunctionalProperty, 0);
-               bool is_InverseFunctionalProperty = sord_ask(
+               const bool is_InverseFunctionalProperty = sord_ask(
                        model, pred, uris.rdf_type, 
uris.owl_InverseFunctionalProperty, 0);
-               bool is_DatatypeProperty = sord_ask(
+               const bool is_DatatypeProperty = sord_ask(
                        model, pred, uris.rdf_type, uris.owl_DatatypeProperty, 
0);
-               bool is_AnnotationProperty = sord_ask(
-                       model, pred, uris.rdf_type, 
uris.owl_AnnotationProperty, 0);
 
-               if (!is_Property && !is_OntologyProperty && !is_ObjectProperty 
&&
-                   !is_FunctionalProperty && !is_InverseFunctionalProperty &&
-                   !is_DatatypeProperty && !is_AnnotationProperty) {
+               if (!is_any_property) {
                        error("Use of undefined property", quad);
                }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sord-0.10.4/src/sordi.c new/sord-0.12.0/src/sordi.c
--- old/sord-0.10.4/src/sordi.c 2012-08-23 05:41:38.000000000 +0200
+++ new/sord-0.12.0/src/sordi.c 2013-02-18 17:11:25.000000000 +0100
@@ -1,5 +1,5 @@
 /*
-  Copyright 2011-2012 David Robillard <http://drobilla.net>
+  Copyright 2011-2013 David Robillard <http://drobilla.net>
 
   Permission to use, copy, modify, and/or distribute this software for any
   purpose with or without fee is hereby granted, provided that the above
@@ -40,7 +40,7 @@
 print_version(void)
 {
        printf("sordi " SORD_VERSION " <http://drobilla.net/software/sord>\n");
-       printf("Copyright 2011-2012 David Robillard <http://drobilla.net>.\n"
+       printf("Copyright 2011-2013 David Robillard <http://drobilla.net>.\n"
               "License: <http://www.opensource.org/licenses/isc>\n"
               "This is free software; you are free to change and redistribute 
it."
               "\nThere is NO WARRANTY, to the extent permitted by law.\n");
Files old/sord-0.10.4/waf and new/sord-0.12.0/waf differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sord-0.10.4/wscript new/sord-0.12.0/wscript
--- old/sord-0.10.4/wscript     2012-10-15 00:20:43.000000000 +0200
+++ new/sord-0.12.0/wscript     2013-02-18 17:48:49.000000000 +0100
@@ -10,7 +10,7 @@
 # major increment <=> incompatible changes
 # minor increment <=> compatible changes (additions)
 # micro increment <=> no interface changes
-SORD_VERSION       = '0.10.4'
+SORD_VERSION       = '0.12.0'
 SORD_MAJOR_VERSION = '0'
 
 # Mandatory waf variables

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to