Redland

 view release on metacpan or  search on metacpan

redland/RELEASE.html  view on Meta::CPAN


<p>The node class can now encode and decode long literals with length
&gt;65535 using new encoding type 'N'.
</p>

<p>Added new constructor
<code>librdf_new_node_from_typed_counted_literal</code>
to build a typed node with a counted literal string.
</p>


<h3>Parser Class Changes</h3>

<p>Changes to allow NULL base uris in parsing methods, but to fail if
it is omitted but required.  Applies to
<code>librdf_parser_parse_as_stream</code>,
<code>librdf_parser_parse_into_model</code>,
<code>librdf_parser_parse_string_as_stream</code>,
<code>librdf_parser_parse_string_into_model</code>,
<code>librdf_parser_parse_counted_string_as_stream</code>
and
<code>librdf_parser_parse_counted_string_into_model</code>
</p>

<p>Added <code>librdf_parser_get_accept_header</code> to get
the <code>Accept</code> header that would be sent with a parser
HTTP fetch of content.
</p>


<h3>Query Class Changes</h3>

<p>Graph names in SPARQL now connect up to redland context nodes
to allow SPARQL <code>GRAPH</code> to work.
</p>


<h3>Serializer Class Changes</h3>

<p>Added new methods to serialize <code>librdf_stream</code>s of triples rather
than just <code>librdf_model</code>:
<code>librdf_serializer_serialize_stream_to_file_handle</code>,
<code>librdf_serializer_serialize_stream_to_file</code>,
<code>librdf_serializer_serialize_stream_to_string</code>,
<code>librdf_serializer_serialize_stream_to_counted_string</code> and
<code>librdf_serializer_serialize_stream_to_iostream</code>.
Fixes
<a href="http://bugs.librdf.org/mantis/view.php?id=92">Issue #0000092</a>
</p>


<h3>Storage Class Changes</h3>

<p>Methods <code>librdf_storage_add_statement</code>,
<code>librdf_storage_add_statements</code> and
<code>librdf_storage_contains_statement</code>
now enforce only allowing legal RDF triples.
</p>

<p>The <em>Memory</em> storage now supports deleting while iterating or
streaming the storage.
</p>

<p>The <em>PostgreSQL</em> storage now accepts option 'database' like
MySQL and other Redland relational databases in addition to the
existing option it accepted, 'dbname'.
</p>

<p><em>SQLite</em> storage fixes:<br />
</p>
<p>
Fix crash in <code>librdf_model_context_remove_statements</code>
Fixes
<a href="http://bugs.librdf.org/mantis/view.php?id=103">Issue #0000103</a>
</p>

<p>Wrap all <code>sqlite_FREE</code> calls on error messages so that
they are only called with SQLITE API v2.
Fixes
<a href="http://bugs.librdf.org/mantis/view.php?id=105">Issue #0000105</a>
</p>

<p>Check for no language or no datatype when they are NULL
in <code>librdf_storage_sqlite_literal_helper</code>.
Fixes
<a href="http://bugs.librdf.org/mantis/view.php?id=136">Issue #0000136</a>
</p>

<p>Store pending queries while the database is locked doing
a <code>SELECT</code> and do them once the select is done.  Such as
deleting triples during a find or serialise.
Fixes
<a href="http://bugs.librdf.org/mantis/view.php?id=139">Issue #0000139</a>
</p>


<p>SQLite storage now has a 'synchronous' storage option which takes
values 'off', 'normal' or 'full' allowing access to the sqlite pragma
to control when commits are synchronised to file.
</p>


<h3>Other changes</h3>

<p><code>rdfproc</code> now allows the base URI for parsing to be set
to null with <code>-</code> and adjust messages to handle this.
</p>

<p>Added some more const fixes to heuristics.
Fixes
<a href="http://bugs.librdf.org/mantis/view.php?id=107">Issue #0000107</a>
</p>

<p>Autodocs for <code>librdf_new_node_from_blank_identifier</code>.
Fixes
<a href="http://bugs.librdf.org/mantis/view.php?id=114">Issue #0000114</a>
</p>

<p>If <code>librdf_storage_sqlite_statement_operator_helper</code> fails,
free the stringbuffer.
Fixes

redland/RELEASE.html  view on Meta::CPAN

may be merged in future.)</p>

<p>The <code>get_object</code> method now always returns a pointer to
a shared object.  If this object is needed outside the scope of an
iteration, it must be copied, which for Nodes is the copy constructor
<code>librdf_new_node_from_node</code>.</p>

<p>C example for Redland 0.9.11 and earlier:</p>
<pre>
  while(!librdf_iterator_end(iterator)) {
    node=(librdf_node*)librdf_iterator_get_next(iterator);
    /* do something with the node */
  }
</pre>

<p>Redland 0.9.12:</p>
<pre>
  while(!librdf_iterator_end(iterator)) {
    node=(librdf_node*)librdf_iterator_get_object(iterator);
    /* do something with the node */
    librdf_iterator_next(iterator);
  }
</pre>

<p>A new method <code>get_context</code> was added returning a Node
for the context of the original Statement that generated the Iterator
Node.</p>

<p>C Iterator context example:</p>
<pre>
  while(!librdf_iterator_end(iterator)) {
    node=(librdf_node*)librdf_iterator_get_object(iterator);
    context_node=(librdf_node*)librdf_iterator_get_context(iterator);
    /* do something with the node and its context */
    librdf_iterator_next(iterator);
  }
</pre>



<h3>Model Class Changes</h3>

<p>The <a href="docs/api/model.html">Model</a>
<code>add_statement</code> method no longer takes ownership of the
passed in statement object.  The caller now retains ownership and can
reuse the statement several times and has responsibility for freeing it
if need be (when it isn't shared).</p>

<p>C example for Redland 0.9.11 and earlier:</p>
<pre>
  librdf_model_add_statement(model, statement);
</pre>

<p>Redland 0.9.12:</p>
<pre>
  librdf_model_add_statement(model, statement);
  librdf_free_statement(statement);
</pre>


<p>C streaming statement example for Redland 0.9.11 and earlier:</p>
<pre>
  while(!librdf_stream_end(stream)) {
    librdf_statement *statement=librdf_stream_next(stream); 
    /* This statement is new, so could be added directly */
    librdf_model_add_statement(model, statement);
  }
</pre>

<p>Redland 0.9.12:</p>
<pre>
  while(!librdf_stream_end(stream)) {
    librdf_statement *statement=librdf_stream_get_object(stream); 
    /* This statement is now shared so can still be just added */
    librdf_model_add_statement(model, statement);
  }
</pre>


<p><code>librdf_model_add_string_literal_statement</code> lost the
xml_space argument.</p>

<p>A new method was added to add a Statement with
an RDF datatyped literals object:</p>
<pre>
  int librdf_model_add_typed_literal_statement(librdf_model* model,
     librdf_node* subject, 
     librdf_node* predicate, 
     char* string, char *xml_language, librdf_uri *datatype_uri);
</pre>

<p>This should be used in preference to
<code>librdf_model_add_string_literal_statement</code> which remains
in the API as a wrapper around the above.</p>

<p>New methods were added to add, remove and list Statements to contexts.</p>

<pre>
  /* Add a single statement to the model with context */
  int librdf_model_context_add_statement(librdf_model* model,
    librdf_node* context, librdf_statement* statement);

  /* Add all statements on the stream to the model with context */
  int librdf_model_context_add_statements(librdf_model* model, 
    librdf_node* context, librdf_stream* stream);

  /* Remove a single statement from the model with the given context */
  int librdf_model_context_remove_statement(librdf_model* model, 
    librdf_node* context, librdf_statement* statement);

  /* Remove all statements from the model with given context */
  int librdf_model_context_remove_statements(librdf_model* model, 
    librdf_node* context);

  /* List all statements in the model with the given context */
  librdf_stream* librdf_model_context_serialize(librdf_model* model, 
    librdf_node* context);
</pre>


<h3>Node Class Changes</h3>



( run in 0.536 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )