Normalize language tags used in SPARQL query syntax to lowercase.
Modularize RDF::Query::Plan::Service to allow mock testing.
Added exception handling in RDF::Query->set_error.
Added subplans_of_type method to Plan classes.
Fixed use of '__DEFAULT__' sentinel value in RDF::Query::Plan, RDF::Query::Plan::Service, RDF::Query::Node::Resource->as_sparql, and RDF::Query->as_sparql.
Force the planner to avoid using a bind-join when the RHS contains a Service subplan (to avoid a DOS attack on the remote endpoint).
Updated DATATYPE() to return rdf:langString on language-tagged literals (per RDF 1.1 change).
Fixed sse serialization in RDF::Query::Algebra::Service to handle binary op (variable endpoint) form.
Croak rather than die in some places, confess and use logdie in one place
Updated xt/dawg-syntax11.t to find more syntax queries in the dawg test data.
SPARQL 1.1 parser now throws errors for more classes of syntactically invalid queries (repeated expression aliases, wrong number of BINDINGS values, SELECT * with use of grouping).
Added support for non-strict comparisons of xsd:strings in RDF::Query::Node::Literal (based on $LAZY_COMPARISONS variable).
Other
Major refactor of xt/dawg-eval11.t test harness.
Updated required version of Test::More to 0.88 (0.86 doesn't have done_testing() used in t/store-config.t).
Updated RDF::Query::Expression::Function->evaluate to throw an error if no function coderef is found.
Version 2.904 (2010-11-23)
Added 'set prefix' and 'time' commands to rqsh.
Added string concatenation overloading of binary +.
Fixed bug in property path evaluation on encountering blank path nodes.
Fixed use of binary '*' in FILTER without numeric data in t/resultforms.t.
Fixed bin/dawg11-status.pl to only load SPARQL 1.1 earl result files.
Fixed RDF::Query::Plan::Update to ignore non-ground triples (unbound variables don't act as wildcards).
Fixed handling of named graph data in insert/delete patterns of update operations.
Updated RDF::Query::Util to use RDF::Trine::Model->temporary_model and guess an appropriate parser based on filenames.
Updated namespace URI in RDF::Query::Functions::Jena to <http://jena.hpl.hp.com/ARQ/function#>.
Updated namespace URI in RDF::Query::Functions::Xpath to <http://www.w3.org/2005/xpath-functions#>.
Updated xt/dawg-eval11.t to align with updated test case manifest schemas.
Updated xt/dawg-eval11.t to prevent test cases with missing files from emitting failures (now skipped).
Added xpath function implementations.
Added SPARQL 1.1 Update shortcut syntax support for COPY, MOVE, and ADD graph operations.
Fixed bug in RDF::Query::Plan::Construct that wasn't giving each result a new set of blank nodes (RT 63155).
Updated SYNOPSIS and execute() and execute_plan() methods POD (RT 63153 comment from Ivan Shmakov).
Updated documentation to explicitly discuss inherited methods due to subclassing.
Fixed RDF::Query::Algebra::Sequence->sse to serialize operations in proper order.
Added $silent argument to RDF::Query::Algebra::Clear constructor.
Version 2.903 (2010-11-03)
SPARQL 1.1
New features
Added support for BIND(expr AS ?var) operator.
Added isNumeric built-in function, checking for proper datatype and valid lexical forms for numerics.
Updates
Updated SPARQL 1.1 parser to handle WITH clauses with PrefixedNames.
SPARQL 1.1 parser now sets error and returns if no query string is supplied.
Added more exception handling in RDF::Query::Parser::SPARQL11.
Updated CLEAR and DROP handling in SPARQL 1.1 parser and engine to handle 'NAMED' and 'ALL' variants.
Renamed 'binding_variables' methods to 'potentially_bound' to align with current SPARQL 1.1 terminology.
Results returned by property path plans are now RDF::Query::VariableBindings objects and are properly projected.
The query planner now interprets simple paths as basic graph patterns.
Removed Algebra and Plan classes for Not and Exists operations (now handled in other classes).
Updated RDF::Query::Plan::Extend to drop the extended variable binding if evaluating the extension yields an error.
Updated RDF::Query::Plan::Update to accept delete patterns with variables.
Updated subquery plan objects to use a sub-plan, not a full query object.
Bug fixes
Fixed SPARQL 1.1 parser bug that was returning partial data from a failed parse call.
Fixed SPARQL 1.1 parser bug for queries with multiple FILTERs in a GGP including an EXISTS filter.
Fixed SPARQL 1.1 parser bug for DROP/CLEAR queries.
Fixed SPARQL 1.1 parser typo of 'SEPARATOR' argument to GROUP_CONCAT aggregate.
Fixed SPARQL 1.1 parser to handle FITLERS to the left of MINUS/OPTIONAL and allow projecting '*' with other vars/epressions.
Fixed SPARQL 1.1 parser case sensitivity of project expression 'AS' token.
Fixed SPARQL 1.1 parser handling of of subqueries within GRAPH blocks.
Fixed miscellaneous bugs and improved performance of parsing SPARQL 1.1 queries.
Made parsing of very large triple blocks non-recursive in SPARQL 1.1 parser.
Fixed COALESCE function to handle errors properly.
Fixed RDF::Query::Plan::Aggregate to extend results using AliasExpressions from HAVING clauses.
Fixed bug that was ignoring GROUP BY clauses when no aggregate operations were present.
Fixed bad looping on start node of unbounded property paths.
Fixed bug in query planning of '^' property paths.
Fixed zero-length property path evaluation within GRAPH blocks.
Removed plan duplication of zero-length case in '*' property paths.
Fixed handling of named graphs within subqueries (changes to active graph handling in the query planner).
Fixed type-promotion and handling of numeric types in aggregate handling.
Fixed RDF::Query::Algebra::Update->as_sparql to handle INSERT/DELETE updates properly.
Fixed RDF::Query::Plan::Aggregate->sse to allow handling of (non-blessed, scalar) '*' columns.
Query Engine
Added ability to pass through arguments to the query planner in RDF::Query->prepare.
Updated RDF::Query::Node::Literal::_cmp to handle literals that fail to parse as DateTime objects.
Updated RDF::Query::Plan::Limit to use the limit accessor internally.
RDF::Query::Plan::NamedGraph now uses lazy iterator for graph names.
Updated RDF::Query::VariableBindings to subclass the new RDF::Trine::VariableBindings.
RDF::Query::Algebra::Project now implements bind_variables().
Updated RDF::Query->describe to use $model->bounded_description instead of simply outgoing arcs.
Fixed bug in evaluation of function expressions in which the execution context object was lost (causing EXISTS filters to fail).
Fixed optimization of COUNT(*) over 1-triple BGPs to keep the variable binding for the pseudo-variable ?COUNT(*).
Fixed sse serialization in RDF::Query::Algebra::Distinct.
Fixed RDF::Query::Plan::Join::PushDownNestedLoop to close sub-plans in close() method.
rqsh - RDF::Query Shell
Added ability to show the parsed algebra with 'parse' command.
Added abiility to show the query execution plan with the 'explain' command.
Added ability to change the RDF serializer with the 'serializer' command.
Added ability to initialize new stores with the 'init' command.
Added ability to change underlying store with the 'use' command.
Added 'help' command.
Updated packaging to install rqsh script (renamed from old bin/rqsh.pl).
Updated to catch errors thrown while trying to create new storage backends (e.g. DBI->connect failing).
rqsh now defaults to read-write models.
rqsh now sets a base URI for the current working directory.
Password input now doesn't echo to the terminal.
Filename input now autocompletes via Term::ReadLine.
Warning and Error Handling
Replaced calls to die with throwing exceptions.
RDF::Query->new now warns about unrecognized options.
DATATYPE() now throws an exception unless passed a valid node object.
RDF::Query::Expresion::Binary now throws exceptions on numeric comparisions with non-numeric operands.
Fixed error message in RDF::Query::Plan::NamedGraph.
Added trace debugging to RDF::Query::Plan::Union.
Added trace debugging to RDF::Query::Plan::Project.
Added trace debugging to RDF::Query::Plan::Path.
Tests and Miscellany
Added SPARQL 1.1 syntax and eval test harnesses.
Fixed bug in xt/dawg-eval11.t parsing of srx files containing literal values that evaluate to false in perl (e.g. '0').
Fixed turtle output for rdfs:comments in xt/dawg/earl.pl.
Moved developer tests from t/ to xt/.
Refactored RDF::Query::Functions into several auto-loaded sub-packages via Module::Pluggable (patch from tobyink).
Removed references to the now-deprecated mac.com in network-based tests.
Updated expected values in t/queryform-describe.t for results using bounded descriptions.
Updated RDF::Query::Util to look for .prefix-cmd cache of common namespace names.
Updated RDF::Query::Util::cli_parse_args to accept '-r' as a read-only flag.
Updated required version of RDF::Trine to 0.126.
Updated to use URI 1.52 to allow direct usage of IRIs without unicode workarounds.
Made code updates to improve performance based on profiling.
Version 2.902 (2010-07-02)
Fixed bug in requiring prerequisite modules.
Version 2.901 (2010-06-29)
Fixed named graph handling.
Fixed bug in handling of * aggregates.
Simplified code to create new temporary models when FROM clauses dereference graph data.
Added support for SPARQL 1.1 CREATE/DROP GRAPH update operations.
Fixed infinite loop bug on parsing certain invalid SPARQL 1.1 update queries.
Fixed handling of BGPs within named graphs in RDF::Query::Plan::BasicGraphPattern.
Updated syntax error exception messages in SPARQL parsers.
Fixed property path evaluation within named graphs.
Converted Makefile.PL to properly use Module::Install.
Version 2.900 (2010-06-23)
Major Changes
SPARQL 1.1 is now the default query parser.
RDF::Core is no longer supported as a backend triplestore.
Redland is still supported as a backend store, but updated handling of default and named graphs means that existing triples stored in Redland without a context (named graph) will not be accessible from RDF::Query.
SPARQL Language Updates
Added support for SPARQL 1.1 Query features:
Basic Query Federation with BINDINGS and UNDEF support.
Functions: IF, STRDT, STRLANG, IRI, URI, BNODE.
Infix operators IN and NOT IN.
Aggregates COUNT, SUM, MIN, MAX, AVG, GROUP_CONCAT, and SAMPLE.
Property paths.
Negation with MINUS graph patterns and NOT EXISTS filters.
Added support for SPARQL 1.1 Update features:
INSERT/DELETE DATA, INSERT/DELETE WHERE, LOAD, and CLEAR
Added support for multi-statement updates.
API Updates
Removed all bridge classes (RDF::Query::Model::*).
Removed RDF::Query::Logger class.
Removed net filter function code from RDF::Query.
Added as_hash method to Query, Algebra, and Node classes.
Removed SPARUL and SPARQLP parsers.
RDF::Query no longer loads URIs in FROM and FROM NAMED clauses with SPARQL 1.1 by default.
Added ability for RDF::Query::Plan::Iterator to fire a callback when execute() is called.
Added new RDF::Query::Plan::ComputedStatement class.
Added new RDF::Query::Plan::Iterator class.
Bugfixes
Fixed whitespace unescaping bug in SPARQL (1.0 and 1.1) parsers.
Scripts
Added bin/json.pl to print a JSON-formatted representation of the query algebra.
Added bin/rqsh.pl CLI interface to executing updates and queries.
Added ability to serialize algebra and plan in bin/deparse.pl.
bin/deparse.pl now catches parsing errors and prints stacktrace.
Optimizations
Implemented optimization for COUNT(*) over a single triplepattern.
Version 2.202 (2010-05-22)
Added initial SPARQL 1.1 syntax and eval support for select expressions, subqueries, negation, aggregates, subqueries, and basic federation.
Updated BGPOptimizer to estimate selectivity directly instead of using costmodel code.
Removed costmodel code.
Removed unused fixup and execute methods in Algebra classes.
Updated RDF::Query to only instantiate DateTime parser and LWP::UserAgent if needed.
Changed DBPedia network test to align with recent DBPedia update in t/dev-service-description.
Updated SPARQLP parser tests to align with internal changes in RDF::Query::Algebra::Aggregate.
Updated RDF::Query::Algebra::Aggregate and RDF::Query::Plan::Aggregate to syntactically handle HAVING clauses.
Fixed bin/graph-bgp.pl (had bitrotted).
Changed bnodes to named variables in examples/queries/sparql-bgp-people-knows.rq.
RDF::Query::Util::cli_make_query now defaults the 'class' parameter to 'RDF::Query'.
Removed dependency list and added perlrdf link to POD in RDF::Trine and RDF::Query.
Version 2.201 (2010-01-30)
Added benchmark/lubm.pl.
Added examples/queries/sparql-ask-people.rq.
Added RDFa tests.
Added Data::UUID prerequisite to META.yml and Makefile.PL.
Updated ::Model::RDFTrine::add_uri and ::add_string to use new RDF::Trine::Parser methods.
Updated as_sparql and sse code to work with more recent RDF::Trine versions.
Removed as_sparql caching in RDF::Query::Algebra::Triple.
Renamed RDF::Query test files to remove old-style numbering.
Updated parser tests to track new RDF::Trine::Node::Literal internal structure.
Updated prereq version of RDF::Trine to 0.114.
Fixed NAME POD section in RDF::Query::ServiceDescription (RT52264 from KjetilK).
Version 2.200 (2009-08-06)
Federation / Service Descriptions
Rewrote the optimistic plan generator in RDF::Query::Federate::Plan.
Added threshold timeout argument to RDF::Query::Plan::ThresholdUnion and support for it in RDF::Query::Federate::Plan.
Simplified logging in RDF::Query::Federate::Plan (now only logs to category 'rdf.query.federate.plan').
RDF::Query::ServiceDescription now adds an 'origin' label annotations to RDF::Query::Algebra::Triple objects.
Removed check of the sd:definitive property in RDF::Query::ServiceDescription (was based on wrong assumptions).
Updated RDF::Query::ServiceDescription::answers_triple_pattern() to recognize wildcard capabilities, constructor now adds wildcard by default.
Added new RDF::Query::ServiceDescription::new_with_model constructor.
RDF::Query::ServiceDescription::computed_statement_generator now returns empty iterators when passed triple patterns with bound blank nodes.
Added test data in data/federation_data/.
RDF::Query::Plan::Service now adds an 'origin' label annotation to the RDF::Query::VariableBindings object.
Added 'optimistic_threshold_time' query flag to RDF::Query::ExecutionContext and RDF::Query constructor.
RDF::Query::Federate::add_service() now adds the appropriate computed statement generators to the query object.
Removed optimistic query rewriting test from t/34-servicedescription.t (now covered by t/federate.t).
Added t/federate.t with tests for optimistic federated query optimization using ::Plan::ThresholdUnion and RDF::Endpoint::Server.
Aggregates
Fixed serialization quoting issue in RDF::Query::Algebra::Aggregate::sse().
RDF::Query::Plan::Aggregate now attempts plain string comparisons for MIN,MAX when strict_errors is not set.
Added support for average aggregates, and fixed datatype support in aggregates.
Command Line Inferface
Added bin/query.pl, a fork of examples/query.pl, to support simple query execution.
Added RDF::Query::Util as home to helper functions (added CLI args parsing functions to create queries and models).
Simplified CLI argument parsing in bin/ and examples/ programs.
Refactoring, Code Cleanup, and Documentation
Added and updated POD to RDF::Query::Util, RDF::Query::Node and RDF::Query::Plan and RDF::Query::Federate::Plan.
Added check for RDFQUERY_THROW_ON_SERVICE environment variable in RDF::Query::Plan::Service.
Cleaned up code in RDF::Query::Model::get_computed_statements().
Updated SSE formatting and uninitialized warning in RDF::Query::Plan, RDF::Query::Algebra::Filter, RDF::Query::Algebra::Distinct and RDF::Query::Algebra::Sort.
Moved shared RDF::Trine-related model methods into RDF::Query::Model from subclasses.
Raised required RDF::Trine version to 0.111 which brings RDF::Trine::Graph support.
RDF::Query::Model::RDFTrine::BasicGraphPattern::execute now returns $self.
Removed dependency on Test::JSON, List::MoreUtils, and XML::Parser.
Removed TODO on test in t/29-serialize.t.
Removed unnecessary code in RDF::Query::Plan subclasses, bin/query.pl, bin/graph-bgp.pl and bin/graph-query.pl.
Logging
Added logging in RDF::Query::Plan::ThresholdUnion, and RDF::Query::Model.
Changed logging level from debug to trace in RDF::Query::Plan::Triple, RDF::Query::Plan::Project, RDF::Query::Plan::Filter, RDF::Query::Plan::Join::NestedLoop, RDF::Query::Plan::PushDownNestedLoop, and RDF::Query::Model::RDFTrine.
Added calls to Log::Log4perl::is_debug to eliminate unnecessary serialization of logging when not in use.
Made error message more useful when SERVICE calls fail in RDF::Query::Plan::Service.
Bugfixes
Fixed bug in RDF::Query::Plan::Offset in cases where the offset was beyond the end of the result set.
Fixed testing for Bloom::Filter in t/31-service.t.
Fixed test expectations when making remote DBPedia query in t/34-servicedescription.t.
Fixed check of $ENV{RDFQUERY_NETWORK_TESTS} to test boolean value, not just existence.
Fixed (bad) expected serializations in t/29-serialize.t.
Fixed bug in RDF::Query::Plan::ThresholdUnion attempting to close an iterator twice.
Fixed sse serialization issues in RDF::Query::Algebra::BasicGraphPattern and RDF::Query::Algebra::Project.
Fixed bug in RDF::Query::Node::from_trine() that up-cast blank nodes to variables.
Fixed quoting issue in RDF::Query::Algebra::Service::sse().
Fixed parameter handling in bin/graph-qeps.pl:prune_plans().
Fixed handling of 'GRAPH ?g {}' (empty GraphGraphPatterns) to return all graph names.
Added check for ref($node) in RDF::Query::VariableBindings::new (broke code after previous removal of blessed() check).
Added use of defined() in code that had been testing boolean value of objects (and causing expensive string overloading).
Miscellaneous Changes
Added examples of queries and service descriptions in examples/.
Updated dawg-eval.t to actually test graph equivalence.
Clarified graph labels in RDF::Query::Model::RDFTrine::BasicGraphPattern::graph().
Added the ability to add label annotations to RDF::Query::VariableBindings, RDF::Query::Algebra::Triple and RDF::Query::Algebra::Quad objects.
RDF::Query::Plan::Quad and RDF::Query::Plan::Triple now add an 'origin' label annotation to the RDF::Query::VariableBindings object if the underlying statement has one.
RDF::Query::Plan::prune_plans now uses a stable sort when comparing plan costs.
RDF::Query::Algebra::Triple::new now up-casts to RDF::Query node objects, if necessary.
RDF::Query::Model::RDFTrine::generate_plans now respects the force_no_optimization query flag.
RDF::Query::Algebra::BasicGraphPattern::sse() now sorts triples for output.
Added distinguish_bnode_variables method to RDF::Query::Algebra::Quad and RDF::Query::Algebra::Triple.
Added RDF::Query::Node::compare for sorting (either Trine or Query) node objects.
Added RDF::Query::plan_class so that ::Federate can overload calls to ::Plan methods.
Added support for computed statement generators (like ARQ's computed property support [e.g. list:member]).
Added trial subsumes() methods to ::Algebra::BasicGraphPattern and ::Algebra::Triple.
Algebra classes now call RDF::Query::algebra_fixup for optimization before falling back on normal fixup code.
Allow equality test and disjunction filters in patterns that can be compiled to SQL.
Fixed ::Algebra::GroupGraphPattern to use join_bnode_streams in cases where the bloom filter wasn't automatically created but instead provided by the user.
Fixed ::Model::RDFTrine::as_string use with Quads.
Fixed argument list for RDF::Query::Algebra::Service::_names_for_node called from bloom function.
Fixed bug so ::Model::RDFTrine::meta may be called as a class method.
Fixed RDF::Query::algebra_fixup to ignore service capabilities that would result in empty BGPs.
Modified code for aggregate queries (though they are currently broken).
Moved construction of bloom-filter-optimized patterns to RDF::Query::Algebra::GroupGraphPattern::_bloom_optimized_pattern().
Moved initial federated service code into RDF::Query::fixup and ::algebra_fixup.
Moved QEP generation code to RDF::Query::query_plan so it can be overloaded.
Moved RDF::Query::add_service() to RDF::Query::Federate::add_service().
Parsing service descriptions now more forgiving in the face of missing values.
RDF::Query::Algebra::Triple::new now adds RDF::Query::Node::Variable objects for undefined nodes.
RDF::Query::fixup() now only returns a construct pattern (the query pattern now being returned by RDF::Query::query_plan()).
RDF::Query::Model::get_computed_statements now doesn't die if there's no query object present.
RDF::Query::new() now accepts two-argument form with just $query and \%options.
RDF::Query::Node::Literal objects now can compare as equal when they're of numeric type but the lexical values aren't numeric.
RDF::Query::prune_plans now takes ExecutionContext as an argument, and in turn calls ::Plan::prune_plans.
RDF::Query::query_plan() now returns all possible query plans when called in list context.
RDF::Query::query_plans now calls RDF::Query::prune_plans to select from the list of possible QEPs.
RDF::Trine::Node::Resource now escapes unicode in base URIs (now just relative URI part) before calling URI->new_abs.
Removed now unused RDF::Query::construct() and RDF::Query::fixup().
Removed old execute() code from ::Algebra classes.
Removed unused redland fallback code from RDF::Query::Model::RDFTrine.
Split RDF::Query::execute into prepare() and execute_plan() methods.
Converted RDF::Query::execute() to use ::Plan classes.
Updated ::Compiler::SQL to recognize ::Algebra::Project objects.
Updates to RDF::Query::execute() to support explicit pre-binding lists (instead of just scalar values).
::Algebra::GroupGraphPattern now throws an exception if passed unblessed values as patterns.
::Federate now labels nodes in the QEP tree with applicable services.
::Model::debug() now shows data from the named graph model.
::Model::RDFTrine::add_uri now decodes resulting content as utf8 before proceeding.
::Model::RDFTrine::meta() probes the underlying store object to declare the proper 'store' class.
::Service::_names_for_node updated to use ::Plan classes for query execution (fixes use of the k:bloom filter).
Classes
Added algebra classes for solution modifiers and query forms (construct, project).
Added code and tests for Query Execution Plan classes RDF::Query::Plan::*.
Added RDF::Query::Federate::Plan for federation-specific code.
Added RDF::Query::BGPOptimizer implementing a basic optimizer for basic selectivity-based join ordering.
Added RDF::Query::CostModel classes for computing/estimating the cost of executing a specific pattern.
Added RDF::Query::ExecutionContext to hold all necessary information for query execution (query, model, bound variables).
Added RDF::Query::ServiceDescription for parsing DARQ-style service descriptions.
Added RDF::Query::VariableBindings to wrap existing HASH-based variable binding structure.
Added stub ::Plan::ThresholdUnion class for running optimistic queries.
Added workaround to RDFCore bridge so that RDF::Core doesn't die if getStmts is called with a Literal in the subj or pred position.
Added a RequestedInterruptError exception class.
Added code for RDF-Trine specific BGP query plans.
Changed debugging in RDF::Query modules to use Log::Log4perl.
Made SERVICE work again by rolling back streaming socket work (now commented out).
Moved federation code to new RDF::Query::Federate class.
Plan generation now includes any plans the model object can provide.
RDF::Query now always uses a cost model (defaulting to ::Naive).
RDF::Query::Federate now defaults to SPARQLP parser.
Removed logging/warn calls from forked process in ::Service (was screwing up the parent-child IO pipe).
Removed use of "DISTINCT" queries in SERVICE calls (for pipelining).
ServiceDescription now only runs sofilter if ?subject/?object are bound.
Started work on a more holistic approach to supporting service descriptions (instead of using add_computed_statement_generator()).
Updated ::Algebra::Service to fork and use LWP's callback mechanism for concurrency.
::Algebra::Service now defers loading of content until the first result is requested.
::Model::RDFTrine now only produces BGP plans if there is no get_computed_statement_generators in the query object.
Code now materializes all node identities before creating the Bloom filter (so capacity arg is accurate).
Bloom filter use is now only attempted on SERVICE blocks that don't immediately contain a FILTER.
Re-ordered conditionals so that the service-bloom-filter try block is called less frequently.
SERVICE execution now uses non-identity reasoning Bloom filter function.
Syntax and Serialization
Added from_sse method to ::Statement, ::Node.
Added initial code for ARQ-style property paths.
Added initial parser code for SPARQL Update (SPARUL) extension.
Added new 'UNSAID' syntax for SPARQLP, implementing negation.
Added parse_expr method to RDF::Query::Parser::SPARQL.
Added RDF::Query::Algebra::Quad::bf() method.
Fixed RDQL parser to qualify URIs before returning from parse().
Fixed SSE serialization of Aggregates using '*' instead of a variable as the column.
Removed (now unused) parser generator script.
SPARQL parser now always adds a ::Algebra::Project (even when the query selects '*').
SPARQL parser now creates ::Algebra::Construct objects for CONSTRUCT queries.
SPARQL parser now puts ::Distinct above ::Sort algebras in the parse tree.
SPARQLP parser now creates ::Project object as parent of any ::Aggregate.
Turtle parser now doesn't modify the lexical value of numeric typed literals.
Turtle parser now makes universal IDs for all blank node (even those with given IDs like _:xyz).
Updated ::Algebra SSE serializations to conform to Jena's serialization syntax.
Updated ::Algebra::Limit::sse to emit 'slice' serialization if its child is a ::Algebra::Offset.
Updated as_sparql() methods to support the new ::Construct classes.
Updated RDF::Query::sse to emit base and prefix serializations.
Updated SPARQL parser and serializer tests to always assume an ::Algebra::Project on SELECT queries.
Updated SSE serialization of ::Join::PushDownNestedLoop to use 'bind-join' terminology.
Updates to SPARQLP parser to support FeDeRate BINDINGS keyword.
::Algebra::Distinct now does proper serialization in as_sparql().
::GroupGraphPattern::sse() updated to output the '(join ...)' only if the GGP has more than one pattern.
Optimizer
Added benchmark/plans.pl to show the runtimes of the available QEPs for a query.
Added benchmark/costmodel.pl for testing the RDF::Query::CostModel.
Added logging for execution time (time to construct iterator) of Triples, BGPs, GGPs and sorting.
Added logging of cardinalities in ::Algebra::Triple, ::Algebra::BasicGraphPattern and ::Algebra::Service.
Added logging to plan classes ::NestedLoop, ::Service, ::Triple.
Naive plan is used in ::Federate::Plan::generate_plans only if no optimistic plans are available.
Updated cost model code to work with ::Plan classes instead of ::Algebra classes.
Logging code now uses sse serialization as log keys (because of expressions that can't be serialized as SPARQL).
Logging object can now be passed to RDF::Query constructor.
Updated logging of algebra execution to use SPARQL serialization as logging key.
Miscellaneous
SPARQL parser now constructs ::Algebra::Project objects (had been in RDF::Query::execute).
Updated RDF::Query to require version 0.108 of RDF::Trine.
Added new bloom:filter function variant that doesn't use identity reasoning.
Added debugging information when RDFQUERY_THROW_ON_SERVICE is in effect.
Fixed test plan for t/optimizer.t in cases where no appropriate model is available.
Updated plan generation code to use ::BGPOptimizer when the model supports node_counts.
Fixed SSE serialization bug in ::Algebra::Sort.
Fixed bugs in RDF::Query and RDF::Query::Expression classes that insisted variables be RDF::Query objects (and not simply RDF::Trine objects).
Fixed propogation of iterator binding_names when pre-bound values are used in ::Algebra execution.
Fixed RDF::Query::Algebra::Triple to correctly set binding_names when pre-binding is used.
Fixed use of pre-binding in execution of RDF::Trine optimized BasicGraphPatterns.
Fixed bug in SQL compilation when restricting left-joins to specific node types (based on functions like isIRI).
Fixed node identity computation based on owl:sameAs.
Fixed bitrotted livejournal example script to work with new 2.000 API.
Tests
Added expected result count test in t/34-servicedescription.t.
Added initial tests for algebra subsumes method.
Added logging and costmodel tests.
Added more example capabilities and patterns to the test service descriptions.
Added RDF::Trine::Store::Hexastore to test model construction list in t/models.pl.
Added sparql:pattern data to test service descriptions.
Added sse re-serialization test to t/29-serialize.t.
Added support for sparql:pattern in service description parsing.
Added t/plan-rdftrine.t to test QEP generation optimized for RDF::Trine BGPs.
Added test data for repeat patterns (e.g. { ?a ?a ?b}).
Added tests to t/plan.t for QEP sse serialization.
Cleaned up federation tests.
Commented out in-progress service description tests.
Fixed bug in t/23-model_bridge.t to allow two models from the same model class to be used in testing.
Fixed error handling in t/plan.t.
Fixed t/costmodel-naive.t to provide a serialized query to ::Plan::Service constructor.
Fixed test count in algebra-bgp.t.
Fixed test in t/31-service.t that relied on identity-reasoning support in bloom filters (which is now off by default).
Fixed use of RDFQUERY_NETWORK_TESTS in 31-service.t.
Improved use of temporary RDF::Trine stores in RDF::Query tests.
Marked tests TODO for federated query serialization.
Removed what looks like an accidentally pasted test in t/plan.t.
SERVICE tests involving bloom filter handling marked as TODO.
ServiceDescription parsing now gets entire sparql:patterns and not just arcs to depth one.
Silenced unfinished test debugging in t/logging.t.
Updated args to roqet call in failing_earl_tests.sh.
Updated costmodel and logging test expected results that changed due to changes to ::Plan::Join code.
Updated dawg-eval.t regex to recognize RDFTrine blank nodes.
Updated DBPedia test query in t/34-servicedescription.t to reflect new source data.
Updated expected cardinalities in t/logging.t for current plan choice.
Updated logging tests to use the new sparql serialization keys.
Updated SERVICE test in t/plan.t (still broken, but only runs when dev env var RDFQUERY_NETWORK_TESTS in effect).
Updated t/plan.t to be less dependent on the specific state of the kasei.us service endpoint.
Updated test service description RDF for new tests.
Updates to improve logging and test coverage.
Examples and Documentation
Added examples/query.pl to show a simple example of loading data and executing a query.
Added examples/create_query_api.pl for generating queries programatically (based on request from KjetilK).
Added bin/graph-bgp.pl to produce a png of a query's BGP variable connectivity graph.
Added bin/graph-query.pl to graph the (one chosen) QEP tree.
Added bin/graph-qeps.pl to vizualize all QEPs of a query with GraphViz.
Updated bin/parse.pl to emit the SSE serialization of the query algebra tree.
Updated bin/rdf_parse_turtle.pl to warn on any parser error.
Version 2.002 (2008-04-25)
Updated Bloom::Filter required version in RDF-Query's Makefile.PL.
Fixed bug in get_function() when called as a class method.
Updated sparql:logical-* functions to accept more than two operands.
Added code to make loading of Bloom::Filter optional.
Added Bloom::Filter to list of recommended modules.
Version 2.001 (2008-04-19)
Fixed use of "DESCRIBE <resource>" (instead of "DESCRIBE ?var").
Fixed SPARQL serialization of queries with DISTINCT.
Added ::Algebra::subpatterns_of_type method for retrieving all subpatterns of a particular type.
Moved sort_rows() into new ::Algebra classes Sort, Limit, Offset and Distinct.
Updated SQL compiler to handle new ::Algebra classes.
Bumped required RDF::Trine version to 0.106.
Added methods to RDF::Query for retrieving lists of supported SPARQL extensions and extension functions.
RDF::Trine pattern optimization now holds onto the original BGP object for forwarding of calls to as_sparql().
Removed use of Storable module. Query execution no longer clones parse tree before running.
Simplified project operation on query stream in RDF::Query::execute().
fixup() method in ::Algebra and ::Expression now passed the query object as an argument.
Replaced ::RDFTrine::unify_bgp with more general fixup() implementation.
::Algebra classes now defer to the bridge during fixup() to allow model-specific optimizations.
RDF::Trine::Iterator::smap now allows overriding default construct_args (e.g. binding names).
sparql:str now throws a TypeError if argument isn't bound.
Fixed referenced_variables in RDF::Query::Expression.
Fixed COUNT function to only count bound variables.
Fixed aggregation to work with expressions.
Added support for GROUP BY clauses to aggregation queries.
Removed now unused ::Algebra::OldFilter class.
Added serialization tests for aggregate and union patterns.
Moved as_sparql methods from RDF::Trine:: to RDF::Query:: classes.
Removed context- (quad-) specific code from RDF::Query::Algebra::Triple.
Fixed serialization of BOUND filter functions.
Fixed serialization of unary expressions.
Fixed call to join_streams to use ::Iterator::Bindings instead of ::Iterator.
var_or_expr_value now takes bridge object as an argument.
var_or_expr_value will now accept any RDF::Query::Expression object as an argument.
Added test for using AS syntax for variable renaming: "(?var AS ?newvar)".
Added support for MIN, MAX, COUNT and COUNT-DISTINCT aggregate operators to the SPARQLP parser.
Added COUNT DISTINCT variant aggregate operator.
Aggregates (MIN, MAX, COUNT, COUNT-DISTINCT) now return xsd:decimal values (this shouldn't really happen for non-numeric operands to MIN and MAX...)
Added as_sparql submethod to RDF::Query::Node::Literal to serialize numeric types unquoted.
Added var_or_expr_value method in RDF::Query.
Removed unused _true and _false methods in RDF::Query.
Fixed bug where triples from a FROM clause were loaded into the underlying persistent store.
Added POD to RDF::Query::Node classes.
Added equal method to RDF::Query::Node classes.
RDF::Query::Node::Blank constructor now optionally produces identifiers.
Merged tSPARQL parsing code into new SPARQLP parser.
Added definite_variables method to RDF::Query::Algebra classes.
Triple class now serializes rdf:type shortcut 'a' appropriately.
Removed 'VAR' type from ::Node::Variable object structure.
Updated code to always expect a HASH reference from ::Bindings iterator.
Added more (sparql and see) serialization tests.
Removed old fixup code, replaced by ::Algebra fixup methods.
Moved FROM clause data loading to its own method.
Started removing old code (RDF::Base, direct DBI use, AUTOLOAD, profiling).
Moved general count_statements() method into bridge superclass.
Fixed SQL compiler to work with ::Algebra and ::Node classes.
Added as_native method to bridge superclass for converting ::Node objects to bridge-native objects.
Updated document namespace declaration for SPARQL XML Results.
Added support for SERVICE queries (ala ARQ) with Bloom filter semijoins.
Moved Expression classes out of the Algebra hierarchy and into their own space (RDF::Query::Expression).
Version 1.501 (2007-11-15)
Fixed CONSTRUCT+OPTIONAL bug.
Added as_sparql methods to Algebra and Node classes to serialize patterns in SPARQL syntax.
Added deparse script.
Fixed jena:sha1sum tests when Digest::SHA1 isn't available.
Version 1.500 (2007-11-13)
Query Engine
URIs are now properly qualified with a BASE when present.
Base URI passed to constructor is now used if no BASE clause exists in the query.
Fixed BASE qualification when an IRI contains Unicode characters (Emulating IRI support with the URI module).
NAMED graph data is now seperated from the default model into new (temporary) models.
NAMED graphs now work with RDF::Core.
Added new RDF::Query::Algebra:: classes that are used to represent query ASTs.
Added new RDF::Query::Node:: classes that are used to represent RDF Nodes and Variables.
Major refactoring to RDF::Query::query_more() to enhance extensibility.
Added RDF::Query::query_more_triple() and RDF::Query::query_more_bgp() for triple and bgp matching.
Improved support of GGP pattern matching.
Added sgrep, smap, swatch and concat methods to RDF::Query::Stream class.
Refactored query_more() variants and sort_rows() to use new stream methods sgrep, smap, and concat.
Continued to fix bugs to more closely align with DAWG tests.
Updated DAWG tests to run with the RDF::Core backend.
Any DAWG tests with mf:requires are now automatically marked TODO.
DAWG tests graph equality is now punted to user verification.
Fixed bNode merging code in DAWG tests.
query_more() variants and sort_rows() now all return RDF::Query::Stream objects.
query_more() (and everything it calls) now expects bridge object as a method argument (to ensure NAMED graph querying works).
Added join_streams() to perform netsted-loop natural joins on two Stream objects.
Filters
Added call_function() method to abstract the generation of ['FUNCTION',...] blocks.
FILTER operator != is now negative for unknown datatypes.
Fixed exception handling in check_constraints().
Fixed type-promotion in arithmetic operations and added recognized xsd numeric types.
API Chnage: extension functions now take a bridge object as their second argument (after the query object).
Fixed equals() method in RDF::Core bridge to properly use the RDF::Core API.
Javascript function makeTerm now accepts language and datatype parameters.
toString() javascript funtion now returns just the literal value (not including language or datatype).
sop:str now will stringify blank nodes properly.
sparql:langmatches now properly differentiates between no language tag and an empty language tag.
Parsers
Parsers now generate ASTs using the Algebra and Node classes.
Fixed bugs in SPARQL tokenizer for some Unicode strings (with combining accents).
RDF::Query::Parser::new_literal() now canonicalizes language tags (to lowercase).
Fixed GGP verification in RDF::Query::Parser::SPARQL::fixup().
Merged GGPAtom changes from tSPARQL to SPARQL grammar.
Backends
Fixed bug in RDF::Query::Model::RDFCore::equals() when comparing two blank nodes.
Changed RDF::Query::Model::RDFCore::as_string to return strings where node type is identifiable (like Redland, URIs as [...], literal \"...\", bnodes (...)).
Model methods literal_value, literal_datatype and literal_value_langauge now return undef if argument isn't a literal.
Model methods uri_value and blank_identifier now return undef unless argument is of correct type.
Model add_string methods now normalize Unicode input.
Blank node prefix is now scoped to bridge, not lexically in RDF::Query::Model::RDFCore.
RDF::Query::Model::Redland::new_literal now forces argument to a string (XS code breaks on non-PVOK scalars).
RDF::Query::Model::Redland::add_uri now uses LWP instead of relying on Redland to fetch content.
Redland model class now recognizes DateTime objects as literals.
Updated add_uri() method in RDF::Core bridge to support named graphs (only one name per model for now).
Miscellaneous
Added rudimentary profiling code (Devel::DProf seems to crash on RDF::Query)
Added initial code for supporting property functions (using time:inside as an example).
Removed multi_get code.
Removed code for MULTI patterns. Will replace with algebra-based optimization in the future.
RDF::Query::Stream constructor now accepts an ARRAY reference.
Stopped using the peephole optimizers. Will replace with an algebra-based optimizer in the future.
Version 1.044 (2007-09-13)
DAWG tests now emit EARL reports.
Added test harness and temporal data importing scripts to new bin/ directory.
Added support for temporal queries in RDF::Query and optimizers.
Added support for CONSTRUCT queries in new YAPP-based SPARQL parsers.
Added TIMED graph tests for new SPARQL temporal extensions.
Added tests to SPARQL parser for bugs that were discovered with temporal extensions.
Added POD to new SPARQL parsers.
Added new Parse::Yapp-based SPARQL parser in preparation for temporal SPARQL extensions.
Added stub functions for temporal extension support.
Added model_as_stream() method to Redland bridge class.
Addded debug() method to RDF::Query::Model.
Added UNION tests.
Added a javascript debugging flag to RDF::Query.
Added RDF::Query::groupgraphpattern() for handling GGPs.
Added xsd:integer casting function.
Added <http://kasei.us/2007/09/functions/warn> as a FILTER tee that warns to STDERR.
Added Eyapp SPARQL grammer file and replaced parser with auto-generated code from eyapp.
Marked some SPARQL parser tests as TODO (due to incompatability with new YAPP-based parser).
Network tests are now run against all available models.
Stream tests are now run against all available models.
Query parser initialization code cleaned up (and now supports beta tSPARQL parser).
net_filter_function() now properly accesses nodes with bridge methods.
RDF::Query::Parser::new_blank now assigns default names if none is supplied.
Updated error messages in SPARQL parser to align with new YAPP-based parser.
SPARQL parse_predicate_object() fixed to support tripleNodes.
SPARQL parse_object() and parse_predicate() fixed for whitespace insensitivity.
Moved old hand-written SPARQL parser to now unused SPARQL-RD.pm.
Moved new YAPP-based SPARQL parser to SPARQL.pm.
Copied YAPP-based SPARQL parser for new temporal extension tSPARQL.pm.
Moved existing tests for hand-written SPARQL parser to 01-sparql_parser.t.rd-old.
Moved new YAPP-based SPARQL tests to t/01-sparql_parser.t.
Removed bad-syntax queries from optimizer and SQL compiler tests.
Fixed bad-syntax queries in stream and hook tests.
Made output of coverage tests easier to read by adding test names.
Fixed SPARQL parsers to allow keywords as variable names.
Fixed SPARQL parsers to allow dashes and underscores in variable names.
Fixed bad parser constructor call in SQL compiler tests.
Suppressed RDF::Base loading (again) during RDF::Query startup.
RDF::Query::Model::Redland::debug now shows contexts during iterator debugging.
Moved the old (hand written) SPARQL parser out of the way to make test harnesses happy.
SPARQL parser now respects spec regarding the reuse of blank node labels across BGPs.
SPARQL parser now does the right thing with NIL (the empty list).
SPARQL parser now handles embedded GGPs correctly.
Updated SPARQL parser and tests to pass (almost all) DAWG tests.
Fixed bug where results couldn't be sorted by a non-selected variable.
Removed the unused RDF::Query::timed_graph() method.
RDF::Query::qualify_uri is now more liberal in what it accepts.
Fixed xsd:boolean casting of integer values.
RDF::Query::Parser::new_variable can now generate private variable names.
Fixed test suite to work properly on systems without Redland.
Disabled loading of tSPARQL parser for release.
Removed function prototype definitions in Model base class (was causing loading problems when models are missing).
Version 1.043 (2007-06-14)
Fixed broken MANIFEST causing MakeMaker code to break.
Version 1.042 (2007-06-13)
Added support for Javascript URL-based extension functions.
Added GPG signing support for Javascript functions.
Added meta methods to model classes.
Added count_statements methods to model classes.
Added default format for stringifying query result streams.
Added SPARQL syntax coverage tests.
Added stream tests.
ISIRI() now returns a sop:isIRI function IRI.
Redland bridge add_uri strips off URI fragment from parser base URI.
Underlying models aren't loaded if turned off by environment variables.
Stopped using the (currently broken) multi-get code.
Model classes aren't used if turned off by environment variable.
Standardized node testing to is_node (replacing older isa_node).
GPG verification failure now throws exceptions.
GPG fingerprint handling is now whitespace insensitive.
Removed (currently) unused multiget tests.
Redland bridge uri_value returns undef if not called with a node.
Version 1.041 (2006-11-26)
Removed unwanted '+' signs on stringified bigints when running under perl 5.6.x.
Fixed unicode errors when running under perl 5.6.x.
Added tests for model bridge classes.
Fixed bugs in SQL bridge class.
RDFCore and Redland bridge classes now throw error when passed a bad model object.
Bridge class support() method now responds to feature requests for 'temp_model'.
Fixed bug in RDF::Query::Model::RDFCore::isa_resource returning true for blank nodes.
Fixed code in RDF::Query::Model::::SQL::equals().
Added partial support for new RDF::Storage::DBI storage class.
Added support for RDF::Query:::Model::SQL models in RDF::Query bridge code.
Removed RDF::Query::Model::SQL::* code that's now in RDF::Storage::DBI.
Added tests for backend bridge classes (RDF::Query::Model::*).
Added checks for which backends support XML serialization.
Fixed naive peephole tests in cases where model supports cost-based analysis.
Fixed bugs in tests that were relying on as_string() to act like literal_value().
Added RDF::Base support.
Fixed bug in fixup() that prevented running queries against multiple models.
Added SimpleQueryPatternError exception class for future work on multi-get optimizations.
Removed forced dependence on Digest::SHA1.
Makefile.PL now recommends Digest::SHA1 (for jena function) and Geo::Distance (for 07-filters.t).
Version 1.040 (2006-07-21)
Added support for BOUND() fiters in SQL compilation.
SQL compiler now produces valid SQL when query variable names are SQL reserved keywords.
Moved SPARQL parser test data into YAML.
Added YAML as a build-time prerequisite.
Fixed SPARQL parsing bug for blank nodes as statement objects.
Added peephole optimizer code with naive and cost-analysis strategies.
Added add_string method to RDF::Query::Model::Redland.
Added node_count method to RDF::Query::Model::Redland (only used for testing at this point).
RDF::Query::execute() now uses the peephole optimizer.
Removed punting code in RDF::Query::execute that tried to do JIT optimization.
Removed calls to getLabel() on model objects in test files.
Fixed dawg tests (was dying because of multiple plans being printed).
Fixed cost-based peephole optimizer tests (by forcing Redland to do node counting).
Version 1.039 (2006-07-14)
Removed dawg tests from distribution. Only used as developer tests now.
Updated package to use Module::Install instead of ExtUtils::MakeMaker.
Fixed a spurious uninitialized warning in RDF::Query::get_bridge.
Version 1.038 (2006-07-09)
Fixed DBI case-sensitivity for PostgreSQL support.
Cleaned up SQL syntax for easier debugging.
Removed extra parens in SQL that were causing postgresql to break.
Reference test foaf file using File::Spec->catfile() instead of directly.
Fixed SPARQL parsing bug for anonymous nodes in FILTER expressions.
Fixed major SQL compilation bugs for testing equality in FILTER expressions.
Fixed bug in hashing code for blank nodes in SQL compiler.
Version 1.037 (2006-07-06)
execute() method now takes optional 'bind' parameter for pre-binding query variables.
Updated code to support basic FILTERs in SQL compilation.
Fixed bug in SQL compilation where no WHERE clause was needed.
Fixed bug in SQL compilation when using model-specific Statements tables.
Added Storable to the list of required modules (was missing in the list).
Fixed typos in metadata about past versions in DOAP Changes.ttl.
Version 1.036 (2006-06-26)
Fixed memory leak in RDF::Query::Stream that resulted in too many database handles.
Initial support for OPTIONALs in SQL compiler.
Removed LWP requirement for systems without libwww.
Added support for class variable to hold parsing errors. (Beware under threads.)
RDF::Query now sets error variable upon parsing error. (Access with error().)
Fixed POD errors, and added tests for POD coverage.
Added model API methods to SQL model class.
Added close() method to RDF::Query::Stream.
Version 1.035 (2006-06-04)
Added DAWG tests and harness.
Rewrote core logic in OPTIONAL handling code.
Comparisons on literals now respect numeric datatypes.
Fixed outdated calling conventions in casting functions.
Added custom functions:
jena:sha1sum
jena:now
jena:langeq
jena:listMember
ldodds:Distance
Added new model methods: equals, subject, predicate, object.
Relocated external http-based test data to .Mac URLs.
Version 1.034 (2006-05-01)
Added JSON serialization for bindings and boolean queries.
Initial support for compiling RDF queries to SQL queries using the Redland schema.
Added to_string method to query results Stream class.
Model objects now store the query parse tree for access to data needed in serialization.
Unquoted number and boolean literals in SPARQL are now datatyped appropriately.
Fixed crashing bug when RDF::Query::Model::Redland::as_string was called with an undefined value.
Fixed bug parsing queries with predicate starting with 'a' (confused with { ?subj a ?type}).
Fixed bug parsing queries whose triple pattern ended with the optional dot.
Version 1.033 (2006-03-08)
Updated test suite to work if one of the model classes is missing.
Data-typed literals are now cast appropriately when used in a FILTER.
Added support for xsd:dateTime datatypes using the DateTime module.
Added support for LANG(), LANGMATCHES() and DATATYPE() built-in functions.
Updated TODO list.
Added more exception types to RDF::Query::Error.
Added POD coverage.
Fixed SPARQL parsing bug for logical operators <= and >=.
Version 1.032 (2006-03-03)
Replaced the Parse::RecDescent SPARQL parser with a much faster hand-written one.
Updated SPARQL parsing rules to be better about URI and QName character sets.
FILTER equality operator now '=', not '==' (to match SPARQL spec).
Initial support for FILTER constraints as part of the triple pattern structure (Will allow for nested FILTERs).
Implemented support for ordering query results by an expression.
Fixed bug in expresion handling of unary minus.
Fixed bug in Redland NAMED GRAPH parsing.
Fixed bug in RDF::Core parsing code where blank nodes would be accidentally smushed.
Version 1.031 (2006-02-08)
Added support for NAMED graphs.
Version 1.030 (2006-01-13)
Added support for SELECT * in SPARQL queries.
Added support for default namespaces in SPARQL queries.
Added tests for querying RDF collections in SPARQL (1 ?x 3)
Added tests for triple patterns of the form { ?a ?a ?b . }
Added tests for default namespaces in SPARQL.
Added tests for SELECT * SPARQL queries.
Bugfix where one of two identical triple variables would be ignored ({ ?a ?a ?b }).
RDF-Query-2.919/t/ 000755 000765 000024 00000000000 14632643202 013610 5 ustar 00greg staff 000000 000000 RDF-Query-2.919/xt/ 000755 000765 000024 00000000000 14632643202 014000 5 ustar 00greg staff 000000 000000 RDF-Query-2.919/PaxHeader/README 000644 000765 000024 00000002270 13647670321 016206 x ustar 00greg staff 000000 000000 30 mtime=1587507409.530594541
127 LIBARCHIVE.xattr.com.apple.metadata:kMDItemTextContentLanguage=YnBsaXN0MDBSZW4IAAAAAAAAAQEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAs
108 SCHILY.xattr.com.apple.metadata:kMDItemTextContentLanguage=bplist00Ren
123 LIBARCHIVE.xattr.com.apple.metadata:kMDItemKeyphraseVersion=YnBsaXN0MDAQDAgAAAAAAAABAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAACg
104 SCHILY.xattr.com.apple.metadata:kMDItemKeyphraseVersion=bplist00
226 LIBARCHIVE.xattr.com.apple.metadata:kMDItemKeyphraseLabels=YnBsaXN0MDCjAQIDXxAicmV0dXJuaW5nIHJvd3Mgb2YgbWF0Y2hpbmcgcmVzdWx0c18QFHF1ZXJ5IGltcGxlbWVudGF0aW9uXHJkcWwgcXVlcmllcwgMMUgAAAAAAAABAQAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAVQ
181 SCHILY.xattr.com.apple.metadata:kMDItemKeyphraseLabels=bplist00£_"returning rows of matching results_query implementation\rdql queries1H U
169 LIBARCHIVE.xattr.com.apple.metadata:kMDItemKeyphraseConfidences=YnBsaXN0MDCjAQIDIz+tHZSnnmQAI79rfPXxkwAAI7/Aedl9O7dQCAwVHgAAAAAAAAEBAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAn
140 SCHILY.xattr.com.apple.metadata:kMDItemKeyphraseConfidences=bplist00£#?”§žd #¿k|õñ“ #¿ÀyÙ};·P '
RDF-Query-2.919/README 000644 000765 000024 00000247477 13647670321 014261 0 ustar 00greg staff 000000 000000 RDF::Query - A SPARQL 1.1 Query implementation for use with RDF::Trine.
RDF::Query allows SPARQL 1.1 and RDQL queries to be run against an RDF model, returning rows of matching results.
REQUIREMENTS
To install RDF::Query you'll need the following perl modules installed:
* DateTime
* DateTime::Format::W3CDTF
* Digest::SHA
* Error
* I18N::LangTags
* JSON
* List::Util
* LWP
* Parse::RecDescent
* RDF::Trine
* Scalar::Util
* Set::Scalar
* Storable
* URI
The following additional modules are recommended for some functionality:
* Geo::Distance
INSTALLATION
To install, run:
perl Makefile.PL
make
make test
make install
VERSION HISTORY
Version 2.918 (2017-01-04)
* SECURITY FIX
Do not search modules in relative paths (#141 from @ppisar).
Version 2.917 (2016-05-22)
* ENHANCEMENTS
Change hashbang to use env (#137 from KjetilK).
Replaced Text::CSV by Text::CSV_XS (#127, #136; patch from jordivador).
* BUG FIXES
Fixed bug that didn't properly anchor the regex match in serializing prefixnames (#135).
Fixed SPARQL parsing bug causing filters to improperly appear inside of service blocks (github issue #134).
Fix SPARQL serialization of functions that have a prefix that is also a valid function name (#133).
Version 2.916 (2015-10-16)
* ENHANCEMENTS
Updated RDF::Query::Node::Resource->as_sparql to allow SPARQL 1.0 PN_LOCAL prefix names (GitHub issue #132).
Version 2.915 (2015-08-18)
* NEW FEATURES
Add RDF::Query::Node->from_attean method (PR #128 from Kjetil Kjernsmo).
* OTHER
Add default indentation to RDF::Query::Algebra::Limit->sse.
Version 2.914 (2015-05-17)
* BUG FIXES
Fixed bug in evaluation of SPARQL CONCAT function.
Version 2.913 (2015-02-14)
* BUG FIXES
Fix SPARQL 1.1 parsing bug that disallowed whitespace between an aggregate name and the following open-parenthesis.
Fix bug in RDF::Query::Algebra::NamedGraph->definite_variables.
Fix rqsh to use a pure memory model when requested (instead of a temporary model).
Fixed whitespace handling bug during parsing of VALUES clauses (github issue #120).
* ENHANCEMENTS
Merge adjacent service blocks if their endpoints and silent flags match (github issue #124).
Allow RDF::Query->new to accept an algebra object instead of a query string.
Updated node classes to allow overloaded comparisions with RDF::Trine::Node::Nil objects.
Improve coverage of as_hash function for variable bindings and expressions (github issue #121).
* OTHER
Documentation fixes (from Kjetil Kjernsmo).
Version 2.912 (2014-10-24)
* BUG FIXES
Fix bug in handling of SUM aggregates with non-literal data.
* ENHANCEMENTS
Improved performance of regular expression use in SPARQL parser (from Dorian Taylor; github pull request #111).
* OTHER
Added IRC resource to Makefile.PL.
Version 2.911 (2014-07-24)
* BUG FIXES
Fixed bug in RDF::Query::Plan::Join::PushDownNestedLoop that didn't allow 'aggregate' to appear in the RHS serialized text (github issue 101).
Fixed SPARQL 1.1 GGP parsing bug (github issue 100).
Fixed RDF::Query::Algebra->subpatterns_of_type to support descent into sub-queries.
Disabled pushing full updates down into the store object (only meant to be full queries at this point).
Fixed as_hash method in RDF::Query::Algebra::Aggregate, RDF::Query::Algebra::Sort, and RDF::Query::Expression::Alias.
Updated RDF::Query::Compiler::SQL to respect node class encapsulation.
* ENHANCEMENTS
Modularized implementation of explain method in algebra and plan classes.
Updated rqsh script to use env perl instead of hardcoded bin path.
Added JSON output to bin/parse.pl script.
Added RDF::Query::ExecutionContext->bind_variable method.
* OTHER
Added :all export tag to RDF::Trine::Node.
Remove Crypt::GPG and Bloom::Filter from list of recommended modules (no longer used in code).
Version 2.910 (2013-07-22)
* BUG FIXES
Updated RDQL parser to work with recent RDF::Trine releases.
Version 2.909 (2012-11-24)
* BUG FIXES
Fixed bad sparql serialization of filters with equality tests; was using '==' instead of '=' (github issue 53).
Fixed bug in RDF::Query::Algebra::Service->referenced_variables.
Fixed bug that wasn't passing the active graph to EXISTS filter evaluation.
Fixed RDF::Query prepare and execute methods to properly localize the model object.
Fixed bug in RDQL parser that mistakenly required a USING clause (github issue 70).
Fixed handling of aggregates over empty groups.
* NEW FEATURES
Added support for VALUES graph pattern (in-place BINDINGS).
Added support for UUID() and STRUUID() functions.
Added is_update() and specifies_update_dataset() methods to RDF::Query.
Accept common typo of SEPARATOR in SPARQL 1.1 parser ("SEPERATOR") with constructor arg 'allow_typos' in RDF::Query::Parser::SPARQL11.
* ENHANCEMENTS
Fixed SPARQL 1.1 parsing to enforce not using shared bnode labels between update data operations.
Improved SPARQL 1.1 parser detection of invalid use of BIND() (when binding already in-scope variables).
Fixed bug in SPARQL 1.1 parser to recognize legal Update operations.
Updated SPARQL 1.1 parser to allow colon in local part of a prefixname.
Updated STRBEFORE() and STRAFTER() implementations to track SPARQL 1.1 standard.
Updated property path implementation to track W3C standard (changed counting semantics and dropped {m,n} form).
Added support to passthrough query eval to the model if supported and the 'allow_passthrough' option is set on the query object.
Added 'canonicalize' option to RDF::Query constructor to canonicalize literal values.
* OTHER
Updated handling of BIND() in the SPARQL 1.1 parser to match the latest spec semantics.
Added ability to run tests of type mf:CSVResultFormatTest.
Fixed config handling in rqsh to allow the use of hexastore backends.
Merged Log4perl initialization cleanup patches (from github/kba).
Use $plan->explain instead of $plan->sse for "explain" rqsh command.
Updated EARL IRIs in bin/failing_earl_tests.sh and bin/passing_earl_tests.sh.
Removed RDF::Redland recommendation in Makefile.PL.
Added doap:implements statements, and updated release data to doap.rdf.
Updated RDF::Query::Util::cli_parse_args to allow no-argument setup.
Updated xt/dawg/earl.pl to use new EARL IRIs earl:passed and earl:failed.
Added POD to bin/rqsh.
Updated DAWG test harnesses to support expected query bindings results in RDF/XML format.
Fixed xt/dawg-eval11.t to emit TAP failures when query parsing fails.
Require RDF::Endpoint 0.05 in xt/dawg-eval11.t.
Removed values from test directory list in xt/dawg-eval11.t.
Added values to list of test directories in xt/dawg-eval11.t.
Added exists test directory to xt/dawg-eval11.t.
Added test case confirming bad sparql serialization of equality testing filters (github issue 53).
Removed tests for {m,n} property path forms.
Fixed RDF::Query::Algebra::Project to throw exception on bad constructor arguments.
Added bugtracker info to Makefile.PL.
Added POD marking modules as unstable: RDF::Query::BGPOptimizer, RDF::Query::Compiler::SQL, RDF::Query::Federate, RDF::Query::Federate::Plan
Improved expected/actual results output when encountering failing tests.
Removed old bloom-filter federation code.
Removed RDF::Query::ExecutionContext->base method.
Fix POD in RDF::Query::Algebra::Table.
Version 2.908 (2012-01-31)
* BUG FIXES
Fixed SPARQL serialization of expressions using && and ||.
Fixed SPARQL 1.1 parser to support "GRAPH" without whitespace.
Fixed bug resulting in false positive error when projecting expressions with aggregates.
Fixed aggregate evaluation to result in unbound variables on error (instead of dropping the result).
Fixed numeric divide operation to return xsd:decimal when operands are xsd:integers.
Fixed RDF::Query::Expression::Binary->evaluate to properly throw on div-by-zero.
Fixed RDF::Query::Expression::Function->evaluate to propogate type errors in IF().
Fixed bin/rqsh to handle queries that use BASE.
Fixed bug in RDF::Query::Plan::Join::PushDownNestedLoop that produced invalid results when the RHS was a subselect.
Fixed RDF::Query::Algebra::Filter->as_sparql to handle variation of serialization of the child pattern.
Fixed bug in SPARQL 1.1 parser that mistakenly introduced aggregate operations in non-aggregate queries.
* NEW FEATURES
Added support for Service as a binary op (allowing variable-endpoint SERVICE blocks).
Added implementations for functions STRBEFORE, STRAFTER, and REPLACE.
Added RDF::Query->prepare_with_named_graphs method.
Added support for COPY and MOVE operations.
Allow percent encoding and backslash escaping in prefix names.
* ENHANCEMENTS
Fixed RDF::Query::Expression::Binary to canonicalize numeric literal results.
Added syntax support for SILENT form of LOAD.
Added support for SILENT and variable endpoint handling for SERVICE patterns.
Added syntax support for optional GRAPH keyword on SPARQL 1.1 update shortcuts.
Updated RDF::Query::Plan::Extend to copy variable bindings instead of using the existing reference.
Added RDF::Query::Plan::Extend->explain.
Changed explain() syntax of plan quads.
Updated plan classes to optionally register intermediate results with a execution delegate object.
Made RDF::Query::Plan::Construct uniq the returned triples.
Added custom RDF::Query::Plan::Construct->explain method.
Normalize language tags used in SPARQL query syntax to lowercase.
Modularize RDF::Query::Plan::Service to allow mock testing.
Added exception handling in RDF::Query->set_error.
Added subplans_of_type method to Plan classes.
Fixed use of '__DEFAULT__' sentinel value in RDF::Query::Plan, RDF::Query::Plan::Service, RDF::Query::Node::Resource->as_sparql, and RDF::Query->as_sparql.
Force the planner to avoid using a bind-join when the RHS contains a Service subplan (to avoid a DOS attack on the remote endpoint).
Updated DATATYPE() to return rdf:langString on language-tagged literals (per RDF 1.1 change).
Fixed sse serialization in RDF::Query::Algebra::Service to handle binary op (variable endpoint) form.
Croak rather than die in some places, confess and use logdie in one place
Allow aggregates in ORDER BY clause.
* OTHER
Added examples/query_url.pl.
Added RDF::Trine::Error::UnimplementedError exception class.
Updated required version of RDF::Trine to 0.138.
Version 2.907 (2011-06-04)
* BUG FIXES
Fixed bug in SPARQL 1.1 parser for DESCRIBE queries without a WHERE clause.
Fixed join ordering bug for queries with a BINDINGS clause and several joins.
Fixed RDF::Query->as_sparql for DESCRIBE queries which project URI terms, not variables.
* OTHER
Fixed expected test results for DESCRIBE queries without a WHERE clause.
examples/query.pl now emits a warning if the query object cannot be constructed.
Version 2.906 (2011-05-14)
* API CHANGES
Globally changed 'base' to 'base_uri' in code and API.
* BUG FIXES
Fixed SPARQL serialization in RDF::Query::Plan generation of SERVICE blocks to always include braces around the query body.
Fixed SPARQL 1.1 parsing bug in property paths using alternatives ('|').
Fixed SPARQL 1.1 bug in parsing prefixnames where a graph term is expected.
Fixed bug in ZeroOrMore reverse path handling (patterns matching { var path* term }).
Fixed bug in RDF::Query::Node::Literal::_cmp that was causing wrong node comparison results.
Fixed bug in parsing solution modifiers in CONSTRUCT and DESCRIBE queries.
Fixed bug in handling of unbound variables in delete templates in RDF::Query::Plan::Update.
Fixed bug in calls to RDF::Query->var_or_expr_value that was preventing use of EXISTS filters in project expressions.
* NEW FEATURES
Updated RDF::Query::Plan::Iterator->new to allow passing in a callback that will return an iterator, instead of an iterator directly.
Updated RDF::Query->query_plan to delegate entire queries to the RDF::Trine::Model when possible.
Updated bin/deparse.pl to allow specifying an endpoint url for SPARQL-backed models (which can affect the query plan).
Added support for empty SPARQL 1.1 Update sequence operations (allowing no-op updates).
Added options to RDF::Query->new to allow forcing RDF::Query to disable query delegation to the underlying store.
Added option to RDF::Query::Util::cli_parse_args to specify arbitrary options to be supplied to the RDF::Query->new constructor.
Added new, cleaner line-based "explain" format for serializing query Plan and Algebra objects.
Added bindings accessor and is_unit method to RDF::Query::Plan::Constant.
Added ability to forcibly remove a particular join algorithm from consideration in plan generation.
Added 'execute' command in rqsh to allow loading a query from a file or URL.
* ENHANCEMENTS
Updated SPARQL 1.1 parser to prevent bnode use in DELETE blocks.
Updated rqsh to associate common filename extensions with media types (helps in loading local files).
Updated RDF::Query::Plan::Path to align with new ALP algorithm from the spec text.
Added some simple statistics generation code in RDF::Query::Plan::Join subclasses.
Added missing implementation for property paths using {n,} modifier syntax.
Added code to guard against mishandling unbound/blank/variable nodes in DELETE templates in RDF::Query::Plan::Update.
* OTHER
Updated tests to use new RDF::Trine::Iterator->seen_count method instead of deprecated count method.
Updated serialization text for zero-length paths in RDF::Query::Plan::Path->plan_node_data.
Removed warning of unknown options passed to RDF::Query->new.
Removed unused projection code in RDF::Query->execute_plan.
Removed Digest::SHA1 from prereq modules, and updated code to use Digest::SHA instead.
Remove the meaningless "All rights reserved" copyright text.
Fixed test count in t/sparql11-propery_paths.t.
Commented out noisy debugging output in RDF::Query::Plan::Path.
Added trace debugging in RDF::Query::Plan::Sort.
Added options instance variable to RDF::Query::ExecutionContext.
Added Module::Pluggable to list of required modules in Makefile.PL.
Added mappings from file extensions to media types in dawg test scripts.
Various updates to SPARQL 1.1 dawg test harness scripts.
Version 2.905 (2011-02-18)
* BUG FIXES
Fixed mistaken case sensitivity of COALESCE, BNODE, CONCAT, and SUBSTR keywords in SPARQL 1.1 parser.
Fixed parsing ambiguity between MIN aggregate and MINUTES function.
Fixed Xpath fn:timezone-from-dateTime function return for UTC timezones.
Fixed RDF::Query::Algebra::Project->as_sparql handling of binary select expressions.
Fixed RDF::Query::Algebra::Construct->sse serialization to include construct triples.
Updated handling of BIND() to not close group scope (which was applying filters in the wrong place).
Fixed RDF::Query::Parser::SPARQL11 to handle whitespace between tokens in 'INSERT DATA' and 'DELETE DATA'.
Fixed RDF::Query::Parser::SPARQL11 to handle empty ModifyTemplates.
Fixed SPARQL 1.1 parser to properly set relevant datasets for update operations.
Fixed plan code for zero-length paths to return RDF::Query::Node-based results (not Trine-based).
Fixed bug in RDF::Query::Plan::Clear when attempting to clear the default graph.
Fixed exception throwing on numeric binary expression eval without numeric literal arguments.
Updated RDF::Query::Plan to handle update operations with different datasets for matching (USING clause).
* NEW FEATURES
Added SPARQL 1.1 numeric functions: ABS, CEIL, FLOOR, ROUND, RAND
Added SPARQL 1.1 string functions: CONCAT, SUBSTR, STRLEN, UCASE, LCASE, ENCODE_FOR_URI, CONTAINS, STRSTARTS, STRENDS
Added SPARQL 1.1 date functions: NOW, TIMEZONE, TZ, YEAR, MONTH, DAY, HOURS, MINUTES, SECONDS
Added SPARQL 1.1 hashing functions: MD5, SHA1, SHA224, SHA256, SHA384, and SHA512
Added RDF::Query::Functions->install_function method, and implementations for fn:compare, fn:concat, and fn:substring.
Updated RDF::Query->execute_with_named_graphs to accept optional arguments to be passed to C<< execute >>.
Added support for CONSTRUCT WHERE syntax shortcut.
Added support for SILENT modifier to SERVICE patterns.
Added SILENT flag in RDF::Query::Algebra::Service.
Added initial code to create SPIN serializations of queries.
Added RDF::Query::Node::Literal->type_list method.
* ENHANCEMENTS
Updated xt/dawg-syntax11.t to find more syntax queries in the dawg test data.
SPARQL 1.1 parser now throws errors for more classes of syntactically invalid queries (repeated expression aliases, wrong number of BINDINGS values, SELECT * with use of grouping).
Added support for non-strict comparisons of xsd:strings in RDF::Query::Node::Literal (based on $LAZY_COMPARISONS variable).
* OTHER
Major refactor of xt/dawg-eval11.t test harness.
Updated required version of Test::More to 0.88 (0.86 doesn't have done_testing() used in t/store-config.t).
Updated RDF::Query::Expression::Function->evaluate to throw an error if no function coderef is found.
Version 2.904 (2010-11-23)
* Added SPARQL 1.1 Update shortcut syntax support for COPY, MOVE, and ADD graph operations.
* Added 'set prefix' and 'time' commands to rqsh.
* Added string concatenation overloading of binary +.
* Added xpath function implementations.
* Fixed bug in property path evaluation on encountering blank path nodes.
* Fixed use of binary '*' in FILTER without numeric data in t/resultforms.t.
* Fixed bin/dawg11-status.pl to only load SPARQL 1.1 earl result files.
* Fixed RDF::Query::Plan::Update to ignore non-ground triples (unbound variables don't act as wildcards).
* Fixed handling of named graph data in insert/delete patterns of update operations.
* Updated RDF::Query::Util to use RDF::Trine::Model->temporary_model and guess an appropriate parser based on filenames.
* Fixed bug in RDF::Query::Plan::Construct that wasn't giving each result a new set of blank nodes (RT 63155).
* Updated SYNOPSIS and execute() and execute_plan() methods POD (RT 63153 comment from Ivan Shmakov).
* Updated documentation to explicitly discuss inherited methods due to subclassing.
* Fixed RDF::Query::Algebra::Sequence->sse to serialize operations in proper order.
* Added $silent argument to RDF::Query::Algebra::Clear constructor.
* Updated namespace URI in RDF::Query::Functions::Jena to .
* Updated namespace URI in RDF::Query::Functions::Xpath to .
* Updated xt/dawg-eval11.t to align with updated test case manifest schemas.
* Updated xt/dawg-eval11.t to prevent test cases with missing files from emitting failures (now skipped).
Version 2.903 (2010-11-03)
* SPARQL 1.1
* New features
* Added support for BIND(expr AS ?var) operator.
* Added isNumeric built-in function, checking for proper datatype and valid lexical forms for numerics.
* Updates
* Updated SPARQL 1.1 parser to handle WITH clauses with PrefixedNames.
* SPARQL 1.1 parser now sets error and returns if no query string is supplied.
* Added more exception handling in RDF::Query::Parser::SPARQL11.
* Updated CLEAR and DROP handling in SPARQL 1.1 parser and engine to handle 'NAMED' and 'ALL' variants.
* Renamed 'binding_variables' methods to 'potentially_bound' to align with current SPARQL 1.1 terminology.
* Results returned by property path plans are now RDF::Query::VariableBindings objects and are properly projected.
* The query planner now interprets simple paths as basic graph patterns.
* Removed Algebra and Plan classes for Not and Exists operations (now handled in other classes).
* Updated RDF::Query::Plan::Extend to drop the extended variable binding if evaluating the extension yields an error.
* Updated RDF::Query::Plan::Update to accept delete patterns with variables.
* Updated subquery plan objects to use a sub-plan, not a full query object.
* Bug fixes
* Fixed SPARQL 1.1 parser bug that was returning partial data from a failed parse call.
* Fixed SPARQL 1.1 parser bug for queries with multiple FILTERs in a GGP including an EXISTS filter.
* Fixed SPARQL 1.1 parser bug for DROP/CLEAR queries.
* Fixed SPARQL 1.1 parser typo of 'SEPARATOR' argument to GROUP_CONCAT aggregate.
* Fixed SPARQL 1.1 parser to handle FITLERS to the left of MINUS/OPTIONAL and allow projecting '*' with other vars/epressions.
* Fixed SPARQL 1.1 parser case sensitivity of project expression 'AS' token.
* Fixed SPARQL 1.1 parser handling of of subqueries within GRAPH blocks.
* Fixed miscellaneous bugs and improved performance of parsing SPARQL 1.1 queries.
* Made parsing of very large triple blocks non-recursive in SPARQL 1.1 parser.
* Fixed COALESCE function to handle errors properly.
* Fixed RDF::Query::Plan::Aggregate to extend results using AliasExpressions from HAVING clauses.
* Fixed bug that was ignoring GROUP BY clauses when no aggregate operations were present.
* Fixed bad looping on start node of unbounded property paths.
* Fixed bug in query planning of '^' property paths.
* Fixed zero-length property path evaluation within GRAPH blocks.
* Removed plan duplication of zero-length case in '*' property paths.
* Fixed handling of named graphs within subqueries (changes to active graph handling in the query planner).
* Fixed type-promotion and handling of numeric types in aggregate handling.
* Fixed RDF::Query::Algebra::Update->as_sparql to handle INSERT/DELETE updates properly.
* Fixed RDF::Query::Plan::Aggregate->sse to allow handling of (non-blessed, scalar) '*' columns.
* Query Engine
* Added ability to pass through arguments to the query planner in RDF::Query->prepare.
* Updated RDF::Query::Node::Literal::_cmp to handle literals that fail to parse as DateTime objects.
* Updated RDF::Query::Plan::Limit to use the limit accessor internally.
* RDF::Query::Plan::NamedGraph now uses lazy iterator for graph names.
* Updated RDF::Query::VariableBindings to subclass the new RDF::Trine::VariableBindings.
* RDF::Query::Algebra::Project now implements bind_variables().
* Updated RDF::Query->describe to use $model->bounded_description instead of simply outgoing arcs.
* Fixed bug in evaluation of function expressions in which the execution context object was lost (causing EXISTS filters to fail).
* Fixed optimization of COUNT(*) over 1-triple BGPs to keep the variable binding for the pseudo-variable ?COUNT(*).
* Fixed sse serialization in RDF::Query::Algebra::Distinct.
* Fixed RDF::Query::Plan::Join::PushDownNestedLoop to close sub-plans in close() method.
* rqsh - RDF::Query Shell
* Added ability to show the parsed algebra with 'parse' command.
* Added abiility to show the query execution plan with the 'explain' command.
* Added ability to change the RDF serializer with the 'serializer' command.
* Added ability to initialize new stores with the 'init' command.
* Added ability to change underlying store with the 'use' command.
* Added 'help' command.
* Updated packaging to install rqsh script (renamed from old bin/rqsh.pl).
* Updated to catch errors thrown while trying to create new storage backends (e.g. DBI->connect failing).
* rqsh now defaults to read-write models.
* rqsh now sets a base URI for the current working directory.
* Password input now doesn't echo to the terminal.
* Filename input now autocompletes via Term::ReadLine.
* Warning and Error Handling
* Replaced calls to die with throwing exceptions.
* RDF::Query->new now warns about unrecognized options.
* DATATYPE() now throws an exception unless passed a valid node object.
* RDF::Query::Expresion::Binary now throws exceptions on numeric comparisions with non-numeric operands.
* Fixed error message in RDF::Query::Plan::NamedGraph.
* Added trace debugging to RDF::Query::Plan::Union.
* Added trace debugging to RDF::Query::Plan::Project.
* Added trace debugging to RDF::Query::Plan::Path.
* Tests and Miscellany
* Added SPARQL 1.1 syntax and eval test harnesses.
* Fixed bug in xt/dawg-eval11.t parsing of srx files containing literal values that evaluate to false in perl (e.g. '0').
* Fixed turtle output for rdfs:comments in xt/dawg/earl.pl.
* Moved developer tests from t/ to xt/.
* Refactored RDF::Query::Functions into several auto-loaded sub-packages via Module::Pluggable (patch from tobyink).
* Removed references to the now-deprecated mac.com in network-based tests.
* Updated expected values in t/queryform-describe.t for results using bounded descriptions.
* Updated RDF::Query::Util to look for .prefix-cmd cache of common namespace names.
* Updated RDF::Query::Util::cli_parse_args to accept '-r' as a read-only flag.
* Updated required version of RDF::Trine to 0.126.
* Updated to use URI 1.52 to allow direct usage of IRIs without unicode workarounds.
* Made code updates to improve performance based on profiling.
Version 2.902 (2010-07-02)
* Fixed bug in requiring prerequisite modules.
Version 2.901 (2010-06-29)
* Added support for SPARQL 1.1 CREATE/DROP GRAPH update operations.
* Fixed named graph handling.
* Fixed bug in handling of * aggregates.
* Simplified code to create new temporary models when FROM clauses dereference graph data.
* Fixed infinite loop bug on parsing certain invalid SPARQL 1.1 update queries.
* Fixed handling of BGPs within named graphs in RDF::Query::Plan::BasicGraphPattern.
* Updated syntax error exception messages in SPARQL parsers.
* Fixed property path evaluation within named graphs.
* Converted Makefile.PL to properly use Module::Install.
Version 2.900 (2010-06-23)
* Major Changes
* SPARQL 1.1 is now the default query parser.
* RDF::Core is no longer supported as a backend triplestore.
* Redland is still supported as a backend store, but updated handling of default and named graphs means that existing triples stored in Redland without a context (named graph) will not be accessible from RDF::Query.
* SPARQL Language Updates
* Added support for SPARQL 1.1 Query features:
* Basic Query Federation with BINDINGS and UNDEF support.
* Functions: IF, STRDT, STRLANG, IRI, URI, BNODE.
* Infix operators IN and NOT IN.
* Aggregates COUNT, SUM, MIN, MAX, AVG, GROUP_CONCAT, and SAMPLE.
* Property paths.
* Negation with MINUS graph patterns and NOT EXISTS filters.
* Added support for SPARQL 1.1 Update features:
* INSERT/DELETE DATA, INSERT/DELETE WHERE, LOAD, and CLEAR
* Added support for multi-statement updates.
* API Updates
* Removed all bridge classes (RDF::Query::Model::*).
* Removed RDF::Query::Logger class.
* Removed net filter function code from RDF::Query.
* Added as_hash method to Query, Algebra, and Node classes.
* Removed SPARUL and SPARQLP parsers.
* RDF::Query no longer loads URIs in FROM and FROM NAMED clauses with SPARQL 1.1 by default.
* Added ability for RDF::Query::Plan::Iterator to fire a callback when execute() is called.
* Added new RDF::Query::Plan::ComputedStatement class.
* Added new RDF::Query::Plan::Iterator class.
* Bugfixes
* Fixed whitespace unescaping bug in SPARQL (1.0 and 1.1) parsers.
* Scripts
* Added bin/json.pl to print a JSON-formatted representation of the query algebra.
* Added bin/rqsh.pl CLI interface to executing updates and queries.
* Added ability to serialize algebra and plan in bin/deparse.pl.
* bin/deparse.pl now catches parsing errors and prints stacktrace.
* Optimizations
* Implemented optimization for COUNT(*) over a single triplepattern.
Version 2.202 (2010-05-22)
* Added initial SPARQL 1.1 syntax and eval support for select expressions, subqueries, negation, aggregates, subqueries, and basic federation.
* Added RDF::Query::VariableBindings.pm->set method.
* Added RDF::Query::_new constructor without any sanity or setup code (used for subquery construction).
* Added RDF::Query::Node::Blank::new constructor to avoid RDF::Trine's N-Triples syntax requirements.
* Added SAMPLE and GROUP_CONCAT aggregate support.
* Added shortcut functions for constructing RDF::Query::Node objects and Algebra Triples, BGPs and GGPs.
* Added warning to RDF::Query::Algebra::Project constructor for improper variable lists.
* Updated DAWG tests to use SPARQL 1.1 parser.
* Removed SPARQLP aggregate tests that don't align with new SPARQL 1.1 semantics.
* Updated DAWG eval tests to skip non-approved tests.
* Fixed handling of unicode decoding in DAWG eval tests.
* Bumped required version of RDF::Trine to 0.123.
* Updated t/models.pl to use RDF::Trine::Parser->parse_url_into_model method and redland's 'guess' parser.
* Fixed logging key name in RDF::Query::Plan::Exists.
* Fixed sse and as_sparql methods in RDF::Query::Algebra::Exists.
* Implemented RDF::Query::Algebra::Exists::binding_variables.
* Updated BGPOptimizer to estimate selectivity directly instead of using costmodel code.
* Removed costmodel code.
* Removed unused fixup and execute methods in Algebra classes.
* Updated RDF::Query to only instantiate DateTime parser and LWP::UserAgent if needed.
* Changed DBPedia network test to align with recent DBPedia update in t/dev-service-description.
* Updated SPARQLP parser tests to align with internal changes in RDF::Query::Algebra::Aggregate.
* Updated RDF::Query::Algebra::Aggregate and RDF::Query::Plan::Aggregate to syntactically handle HAVING clauses.
* Fixed bin/graph-bgp.pl (had bitrotted).
* Changed bnodes to named variables in examples/queries/sparql-bgp-people-knows.rq.
* RDF::Query::Util::cli_make_query now defaults the 'class' parameter to 'RDF::Query'.
* Removed dependency list and added perlrdf link to POD in RDF::Trine and RDF::Query.
Version 2.201 (2010-01-30)
* Added benchmark/lubm.pl.
* Added examples/queries/sparql-ask-people.rq.
* Added RDFa tests.
* Added Data::UUID prerequisite to META.yml and Makefile.PL.
* Updated ::Model::RDFTrine::add_uri and ::add_string to use new RDF::Trine::Parser methods.
* Updated as_sparql and sse code to work with more recent RDF::Trine versions.
* Removed as_sparql caching in RDF::Query::Algebra::Triple.
* Renamed RDF::Query test files to remove old-style numbering.
* Updated parser tests to track new RDF::Trine::Node::Literal internal structure.
* Updated prereq version of RDF::Trine to 0.114.
* Fixed NAME POD section in RDF::Query::ServiceDescription (RT52264 from KjetilK).
Version 2.200 (2009-08-06)
* Federation / Service Descriptions:
* Rewrote the optimistic plan generator in RDF::Query::Federate::Plan.
* Added threshold timeout argument to RDF::Query::Plan::ThresholdUnion and support for it in RDF::Query::Federate::Plan.
* Simplified logging in RDF::Query::Federate::Plan (now only logs to category 'rdf.query.federate.plan').
* RDF::Query::ServiceDescription now adds an 'origin' label annotations to RDF::Query::Algebra::Triple objects.
* Removed check of the sd:definitive property in RDF::Query::ServiceDescription (was based on wrong assumptions).
* Updated RDF::Query::ServiceDescription::answers_triple_pattern() to recognize wildcard capabilities, constructor now adds wildcard by default.
* Added new RDF::Query::ServiceDescription::new_with_model constructor.
* RDF::Query::ServiceDescription::computed_statement_generator now returns empty iterators when passed triple patterns with bound blank nodes.
* Added test data in data/federation_data/.
* RDF::Query::Plan::Service now adds an 'origin' label annotation to the RDF::Query::VariableBindings object.
* Added 'optimistic_threshold_time' query flag to RDF::Query::ExecutionContext and RDF::Query constructor.
* RDF::Query::Federate::add_service() now adds the appropriate computed statement generators to the query object.
* Removed optimistic query rewriting test from t/34-servicedescription.t (now covered by t/federate.t).
* Added t/federate.t with tests for optimistic federated query optimization using ::Plan::ThresholdUnion and RDF::Endpoint::Server.
* Aggregates:
* Fixed serialization quoting issue in RDF::Query::Algebra::Aggregate::sse().
* RDF::Query::Plan::Aggregate now attempts plain string comparisons for MIN,MAX when strict_errors is not set.
* Added support for average aggregates, and fixed datatype support in aggregates.
* Command Line Inferface:
* Added bin/query.pl, a fork of examples/query.pl, to support simple query execution.
* Added RDF::Query::Util as home to helper functions (added CLI args parsing functions to create queries and models).
* Simplified CLI argument parsing in bin/ and examples/ programs.
* Refactoring, Code Cleanup, and Documentation:
* Added and updated POD to RDF::Query::Util, RDF::Query::Node and RDF::Query::Plan and RDF::Query::Federate::Plan.
* Added check for RDFQUERY_THROW_ON_SERVICE environment variable in RDF::Query::Plan::Service.
* Cleaned up code in RDF::Query::Model::get_computed_statements().
* Updated SSE formatting and uninitialized warning in RDF::Query::Plan, RDF::Query::Algebra::Filter, RDF::Query::Algebra::Distinct and RDF::Query::Algebra::Sort.
* Moved shared RDF::Trine-related model methods into RDF::Query::Model from subclasses.
* Raised required RDF::Trine version to 0.111 which brings RDF::Trine::Graph support.
* RDF::Query::Model::RDFTrine::BasicGraphPattern::execute now returns $self.
* Removed dependency on Test::JSON, List::MoreUtils, and XML::Parser.
* Removed TODO on test in t/29-serialize.t.
* Removed unnecessary code in RDF::Query::Plan subclasses, bin/query.pl, bin/graph-bgp.pl and bin/graph-query.pl.
* Logging:
* Added logging in RDF::Query::Plan::ThresholdUnion, and RDF::Query::Model.
* Changed logging level from debug to trace in RDF::Query::Plan::Triple, RDF::Query::Plan::Project, RDF::Query::Plan::Filter, RDF::Query::Plan::Join::NestedLoop, RDF::Query::Plan::PushDownNestedLoop, and RDF::Query::Model::RDFTrine.
* Added calls to Log::Log4perl::is_debug to eliminate unnecessary serialization of logging when not in use.
* Made error message more useful when SERVICE calls fail in RDF::Query::Plan::Service.
* Bugfixes:
* Fixed bug in RDF::Query::Plan::Offset in cases where the offset was beyond the end of the result set.
* Fixed testing for Bloom::Filter in t/31-service.t.
* Fixed test expectations when making remote DBPedia query in t/34-servicedescription.t.
* Fixed check of $ENV{RDFQUERY_NETWORK_TESTS} to test boolean value, not just existence.
* Fixed (bad) expected serializations in t/29-serialize.t.
* Fixed bug in RDF::Query::Plan::ThresholdUnion attempting to close an iterator twice.
* Fixed sse serialization issues in RDF::Query::Algebra::BasicGraphPattern and RDF::Query::Algebra::Project.
* Fixed bug in RDF::Query::Node::from_trine() that up-cast blank nodes to variables.
* Fixed quoting issue in RDF::Query::Algebra::Service::sse().
* Fixed parameter handling in bin/graph-qeps.pl:prune_plans().
* Fixed handling of 'GRAPH ?g {}' (empty GraphGraphPatterns) to return all graph names.
* Added check for ref($node) in RDF::Query::VariableBindings::new (broke code after previous removal of blessed() check).
* Added use of defined() in code that had been testing boolean value of objects (and causing expensive string overloading).
* Miscellaneous Changes:
* Added examples of queries and service descriptions in examples/.
* Updated dawg-eval.t to actually test graph equivalence.
* Clarified graph labels in RDF::Query::Model::RDFTrine::BasicGraphPattern::graph().
* Added the ability to add label annotations to RDF::Query::VariableBindings, RDF::Query::Algebra::Triple and RDF::Query::Algebra::Quad objects.
* RDF::Query::Plan::Quad and RDF::Query::Plan::Triple now add an 'origin' label annotation to the RDF::Query::VariableBindings object if the underlying statement has one.
* RDF::Query::Plan::prune_plans now uses a stable sort when comparing plan costs.
* RDF::Query::Algebra::Triple::new now up-casts to RDF::Query node objects, if necessary.
* RDF::Query::Model::RDFTrine::generate_plans now respects the force_no_optimization query flag.
* RDF::Query::Algebra::BasicGraphPattern::sse() now sorts triples for output.
* Added distinguish_bnode_variables method to RDF::Query::Algebra::Quad and RDF::Query::Algebra::Triple.
* Added RDF::Query::Node::Blank::make_distinguished_variable method.
* Added caching of sparql serializations to RDF::Query::Algebra::BasicGraphPattern and RDF::Query::Algebra::Triple.
* Added code to RDF::Query::VariableBindings::new to up-cast any RDF::Trine::Node objects to their RDF::Query equivalents.
* RDF::Query::new() now looks for $args{ defines }, and adds them to the internal %options HASH.
* Added hook in RDF::Query::execute_plan() to print the query plan to STDERR if $options{plan} is set (can be set if defines).
* Updated RDF::Query::Plan to only consider model-specific plans (if there are any).
Version 2.100 (2009-03-18)
* API:
* Added ::Algebra::BasicGraphPattern::connected method.
* Added 'node_counts' as a recognized key to ::Model::RDFTrine::suports().
* Added ::Model::node_count method.
* Added ::Model::RDFTrine::count_statements() and ::Model::RDFTrine::node_count() methods.
* Added 'store' field to the data returned by the meta() method in the ::Model::* classes.
* Added a peek method to ::Iterator to support execution deferment like in ::Algebra::Service.
* Added ability to force SERVICE calls to abort using $ENV{RDFQUERY_THROW_ON_SERVICE} and RequestedInterruptError.
* Added bf methods to ::Triple and ::BasicGraphPattern to describe the BGP in terms of bound/free.
* Added bind_variables method to RDF::Query::Algebra.
* Added caching to ::Algebra::Service::_names_for_node.
* Added code to count (and warn) the rate of false positives from a bloomjoin.
* Added cost model hooks in RDF::Query and ::Algebra::BasicGraphPattern.
* Added FeDeRate BINDINGS to the list of supported extensions.
* Added get_basic_graph_pattern to ::Model::RDFTrine (not used yet).
* Added is_solution_modifier() methods to ::Algebra classes.
* Added labels and common patterns to service description template.
* Added more logic and debugging to aggregating triples into BGPs for SERVICE calls.
* Added optional restriction argument to ::Algebra::subpatterns_of_type.
* Added RDF::Query::Model::RDFTrine::BasicGraphPattner::graph() method.
* Added RDF::Query::Node::compare for sorting (either Trine or Query) node objects.
* Added RDF::Query::plan_class so that ::Federate can overload calls to ::Plan methods.
* Added support for computed statement generators (like ARQ's computed property support [e.g. list:member]).
* Added trial subsumes() methods to ::Algebra::BasicGraphPattern and ::Algebra::Triple.
* Algebra classes now call RDF::Query::algebra_fixup for optimization before falling back on normal fixup code.
* Allow equality test and disjunction filters in patterns that can be compiled to SQL.
* Fixed ::Algebra::GroupGraphPattern to use join_bnode_streams in cases where the bloom filter wasn't automatically created but instead provided by the user.
* Fixed ::Model::RDFTrine::as_string use with Quads.
* Fixed argument list for RDF::Query::Algebra::Service::_names_for_node called from bloom function.
* Fixed bug so ::Model::RDFTrine::meta may be called as a class method.
* Fixed RDF::Query::algebra_fixup to ignore service capabilities that would result in empty BGPs.
* Modified code for aggregate queries (though they are currently broken).
* Moved construction of bloom-filter-optimized patterns to RDF::Query::Algebra::GroupGraphPattern::_bloom_optimized_pattern().
* Moved initial federated service code into RDF::Query::fixup and ::algebra_fixup.
* Moved QEP generation code to RDF::Query::query_plan so it can be overloaded.
* Moved RDF::Query::add_service() to RDF::Query::Federate::add_service().
* Parsing service descriptions now more forgiving in the face of missing values.
* RDF::Query::Algebra::Triple::new now adds RDF::Query::Node::Variable objects for undefined nodes.
* RDF::Query::fixup() now only returns a construct pattern (the query pattern now being returned by RDF::Query::query_plan()).
* RDF::Query::Model::get_computed_statements now doesn't die if there's no query object present.
* RDF::Query::new() now accepts two-argument form with just $query and \%options.
* RDF::Query::Node::Literal objects now can compare as equal when they're of numeric type but the lexical values aren't numeric.
* RDF::Query::prune_plans now takes ExecutionContext as an argument, and in turn calls ::Plan::prune_plans.
* RDF::Query::query_plan() now returns all possible query plans when called in list context.
* RDF::Query::query_plans now calls RDF::Query::prune_plans to select from the list of possible QEPs.
* RDF::Trine::Node::Resource now escapes unicode in base URIs (now just relative URI part) before calling URI->new_abs.
* Removed now unused RDF::Query::construct() and RDF::Query::fixup().
* Removed old execute() code from ::Algebra classes.
* Removed unused redland fallback code from RDF::Query::Model::RDFTrine.
* Split RDF::Query::execute into prepare() and execute_plan() methods.
* Converted RDF::Query::execute() to use ::Plan classes.
* Updated ::Compiler::SQL to recognize ::Algebra::Project objects.
* Updates to RDF::Query::execute() to support explicit pre-binding lists (instead of just scalar values).
* ::Algebra::GroupGraphPattern now throws an exception if passed unblessed values as patterns.
* ::Federate now labels nodes in the QEP tree with applicable services.
* ::Model::debug() now shows data from the named graph model.
* ::Model::RDFTrine::add_uri now decodes resulting content as utf8 before proceeding.
* ::Model::RDFTrine::meta() probes the underlying store object to declare the proper 'store' class.
* ::Service::_names_for_node updated to use ::Plan classes for query execution (fixes use of the k:bloom filter).
* CLASSES:
* Added algebra classes for solution modifiers and query forms (construct, project).
* Added code and tests for Query Execution Plan classes RDF::Query::Plan::*.
* Added RDF::Query::Federate::Plan for federation-specific code.
* Added RDF::Query::BGPOptimizer implementing a basic optimizer for basic selectivity-based join ordering.
* Added RDF::Query::CostModel classes for computing/estimating the cost of executing a specific pattern.
* Added RDF::Query::ExecutionContext to hold all necessary information for query execution (query, model, bound variables).
* Added RDF::Query::ServiceDescription for parsing DARQ-style service descriptions.
* Added RDF::Query::VariableBindings to wrap existing HASH-based variable binding structure.
* Added stub ::Plan::ThresholdUnion class for running optimistic queries.
* Added workaround to RDFCore bridge so that RDF::Core doesn't die if getStmts is called with a Literal in the subj or pred position.
* Added a RequestedInterruptError exception class.
* Added code for RDF-Trine specific BGP query plans.
* Changed debugging in RDF::Query modules to use Log::Log4perl.
* Made SERVICE work again by rolling back streaming socket work (now commented out).
* Moved federation code to new RDF::Query::Federate class.
* Plan generation now includes any plans the model object can provide.
* RDF::Query now always uses a cost model (defaulting to ::Naive).
* RDF::Query::Federate now defaults to SPARQLP parser.
* Removed logging/warn calls from forked process in ::Service (was screwing up the parent-child IO pipe).
* Removed use of "DISTINCT" queries in SERVICE calls (for pipelining).
* ServiceDescription now only runs sofilter if ?subject/?object are bound.
* Started work on a more holistic approach to supporting service descriptions (instead of using add_computed_statement_generator()).
* Updated ::Algebra::Service to fork and use LWP's callback mechanism for concurrency.
* ::Algebra::Service now defers loading of content until the first result is requested.
* ::Model::RDFTrine now only produces BGP plans if there is no get_computed_statement_generators in the query object.
* Code now materializes all node identities before creating the Bloom filter (so capacity arg is accurate).
* Bloom filter use is now only attempted on SERVICE blocks that don't immediately contain a FILTER.
* Re-ordered conditionals so that the service-bloom-filter try block is called less frequently.
* SERVICE execution now uses non-identity reasoning Bloom filter function.
* SYNTAX and SERIALIZATION:
* Added from_sse method to ::Statement, ::Node.
* Added initial code for ARQ-style property paths.
* Added initial parser code for SPARQL Update (SPARUL) extension.
* Added new 'UNSAID' syntax for SPARQLP, implementing negation.
* Added parse_expr method to RDF::Query::Parser::SPARQL.
* Added RDF::Query::Algebra::Quad::bf() method.
* Fixed RDQL parser to qualify URIs before returning from parse().
* Fixed SSE serialization of Aggregates using '*' instead of a variable as the column.
* Removed (now unused) parser generator script.
* SPARQL parser now always adds a ::Algebra::Project (even when the query selects '*').
* SPARQL parser now creates ::Algebra::Construct objects for CONSTRUCT queries.
* SPARQL parser now puts ::Distinct above ::Sort algebras in the parse tree.
* SPARQLP parser now creates ::Project object as parent of any ::Aggregate.
* Turtle parser now doesn't modify the lexical value of numeric typed literals.
* Turtle parser now makes universal IDs for all blank node (even those with given IDs like _:xyz).
* Updated ::Algebra SSE serializations to conform to Jena's serialization syntax.
* Updated ::Algebra::Limit::sse to emit 'slice' serialization if its child is a ::Algebra::Offset.
* Updated as_sparql() methods to support the new ::Construct classes.
* Updated RDF::Query::sse to emit base and prefix serializations.
* Updated SPARQL parser and serializer tests to always assume an ::Algebra::Project on SELECT queries.
* Updated SSE serialization of ::Join::PushDownNestedLoop to use 'bind-join' terminology.
* Updates to SPARQLP parser to support FeDeRate BINDINGS keyword.
* ::Algebra::Distinct now does proper serialization in as_sparql().
* ::GroupGraphPattern::sse() updated to output the '(join ...)' only if the GGP has more than one pattern.
* OPTIMIZER:
* Added benchmark/plans.pl to show the runtimes of the available QEPs for a query.
* Added benchmark/costmodel.pl for testing the RDF::Query::CostModel.
* Added logging for execution time (time to construct iterator) of Triples, BGPs, GGPs and sorting.
* Added logging of cardinalities in ::Algebra::Triple, ::Algebra::BasicGraphPattern and ::Algebra::Service.
* Added logging to plan classes ::NestedLoop, ::Service, ::Triple.
* Naive plan is used in ::Federate::Plan::generate_plans only if no optimistic plans are available.
* Updated cost model code to work with ::Plan classes instead of ::Algebra classes.
* Logging code now uses sse serialization as log keys (because of expressions that can't be serialized as SPARQL).
* Logging object can now be passed to RDF::Query constructor.
* Updated logging of algebra execution to use SPARQL serialization as logging key.
* MISC:
* SPARQL parser now constructs ::Algebra::Project objects (had been in RDF::Query::execute).
* Updated RDF::Query to require version 0.108 of RDF::Trine.
* Added new bloom:filter function variant that doesn't use identity reasoning.
* Added debugging information when RDFQUERY_THROW_ON_SERVICE is in effect.
* Fixed test plan for t/optimizer.t in cases where no appropriate model is available.
* Updated plan generation code to use ::BGPOptimizer when the model supports node_counts.
* Fixed SSE serialization bug in ::Algebra::Sort.
* Fixed bugs in RDF::Query and RDF::Query::Expression classes that insisted variables be RDF::Query objects (and not simply RDF::Trine objects).
* Fixed propogation of iterator binding_names when pre-bound values are used in ::Algebra execution.
* Fixed RDF::Query::Algebra::Triple to correctly set binding_names when pre-binding is used.
* Fixed use of pre-binding in execution of RDF::Trine optimized BasicGraphPatterns.
* Fixed bug in SQL compilation when restricting left-joins to specific node types (based on functions like isIRI).
* Fixed node identity computation based on owl:sameAs.
* Fixed bitrotted livejournal example script to work with new 2.000 API.
* TESTS:
* Added expected result count test in t/34-servicedescription.t.
* Added initial tests for algebra subsumes method.
* Added logging and costmodel tests.
* Added more example capabilities and patterns to the test service descriptions.
* Added RDF::Trine::Store::Hexastore to test model construction list in t/models.pl.
* Added sparql:pattern data to test service descriptions.
* Added sse re-serialization test to t/29-serialize.t.
* Added support for sparql:pattern in service description parsing.
* Added t/plan-rdftrine.t to test QEP generation optimized for RDF::Trine BGPs.
* Added test data for repeat patterns (e.g. { ?a ?a ?b}).
* Added tests to t/plan.t for QEP sse serialization.
* Cleaned up federation tests.
* Commented out in-progress service description tests.
* Fixed bug in t/23-model_bridge.t to allow two models from the same model class to be used in testing.
* Fixed error handling in t/plan.t.
* Fixed t/costmodel-naive.t to provide a serialized query to ::Plan::Service constructor.
* Fixed test count in algebra-bgp.t.
* Fixed test in t/31-service.t that relied on identity-reasoning support in bloom filters (which is now off by default).
* Fixed use of RDFQUERY_NETWORK_TESTS in 31-service.t.
* Improved use of temporary RDF::Trine stores in RDF::Query tests.
* Marked tests TODO for federated query serialization.
* Removed what looks like an accidentally pasted test in t/plan.t.
* SERVICE tests involving bloom filter handling marked as TODO.
* ServiceDescription parsing now gets entire sparql:patterns and not just arcs to depth one.
* Silenced unfinished test debugging in t/logging.t.
* Updated args to roqet call in failing_earl_tests.sh.
* Updated costmodel and logging test expected results that changed due to changes to ::Plan::Join code.
* Updated dawg-eval.t regex to recognize RDFTrine blank nodes.
* Updated DBPedia test query in t/34-servicedescription.t to reflect new source data.
* Updated expected cardinalities in t/logging.t for current plan choice.
* Updated logging tests to use the new sparql serialization keys.
* Updated SERVICE test in t/plan.t (still broken, but only runs when dev env var RDFQUERY_NETWORK_TESTS in effect).
* Updated t/plan.t to be less dependent on the specific state of the kasei.us service endpoint.
* Updated test service description RDF for new tests.
* Updates to improve logging and test coverage.
* EXAMPLES and DOCS:
* Added examples/query.pl to show a simple example of loading data and executing a query.
* Added examples/create_query_api.pl for generating queries programatically (based on request from KjetilK).
* Added bin/graph-bgp.pl to produce a png of a query's BGP variable connectivity graph.
* Added bin/graph-query.pl to graph the (one chosen) QEP tree.
* Added bin/graph-qeps.pl to vizualize all QEPs of a query with GraphViz.
* Updated bin/parse.pl to emit the SSE serialization of the query algebra tree.
* Updated bin/rdf_parse_turtle.pl to warn on any parser error.
Version 2.002 (2008-04-25)
* Updated Bloom::Filter required version in RDF-Query's Makefile.PL.
* Fixed bug in get_function() when called as a class method.
* Updated sparql:logical-* functions to accept more than two operands.
* Added code to make loading of Bloom::Filter optional.
* Added Bloom::Filter to list of recommended modules.
Version 2.001 (2008-04-19)
* Fixed use of "DESCRIBE " (instead of "DESCRIBE ?var").
* Fixed SPARQL serialization of queries with DISTINCT.
* Added ::Algebra::subpatterns_of_type method for retrieving all subpatterns of a particular type.
* Moved sort_rows() into new ::Algebra classes Sort, Limit, Offset and Distinct.
* Updated SQL compiler to handle new ::Algebra classes.
* Bumped required RDF::Trine version to 0.106.
* Added methods to RDF::Query for retrieving lists of supported SPARQL extensions and extension functions.
* RDF::Trine pattern optimization now holds onto the original BGP object for forwarding of calls to as_sparql().
* Removed use of Storable module. Query execution no longer clones parse tree before running.
* Simplified project operation on query stream in RDF::Query::execute().
* fixup() method in ::Algebra and ::Expression now passed the query object as an argument.
* Replaced ::RDFTrine::unify_bgp with more general fixup() implementation.
* ::Algebra classes now defer to the bridge during fixup() to allow model-specific optimizations.
* RDF::Trine::Iterator::smap now allows overriding default construct_args (e.g. binding names).
* sparql:str now throws a TypeError if argument isn't bound.
* Fixed referenced_variables in RDF::Query::Expression.
* Fixed COUNT function to only count bound variables.
* Fixed aggregation to work with expressions.
* Added support for GROUP BY clauses to aggregation queries.
* Removed now unused ::Algebra::OldFilter class.
* Added serialization tests for aggregate and union patterns.
* Moved as_sparql methods from RDF::Trine:: to RDF::Query:: classes.
* Removed context- (quad-) specific code from RDF::Query::Algebra::Triple.
* Fixed serialization of BOUND filter functions.
* Fixed serialization of unary expressions.
* Fixed call to join_streams to use ::Iterator::Bindings instead of ::Iterator.
* var_or_expr_value now takes bridge object as an argument.
* var_or_expr_value will now accept any RDF::Query::Expression object as an argument.
* Added test for using AS syntax for variable renaming: "(?var AS ?newvar)".
* Added support for MIN, MAX, COUNT and COUNT-DISTINCT aggregate operators to the SPARQLP parser.
* Added COUNT DISTINCT variant aggregate operator.
* Aggregates (MIN, MAX, COUNT, COUNT-DISTINCT) now return xsd:decimal values (this shouldn't really happen for non-numeric operands to MIN and MAX...)
* Added as_sparql submethod to RDF::Query::Node::Literal to serialize numeric types unquoted.
* Added var_or_expr_value method in RDF::Query.
* Removed unused _true and _false methods in RDF::Query.
* Fixed existing aggregates code and tests.
* Removed unused (and bitrotted) t/05-stress.t test.
* Made all tests that access the network opt-in with the RDFQUERY_NETWORK_TESTS environment variable.
* Updated POD for ::Expression::Alias.
* Added tests for select expressions.
* Added initial support for selecting expression values.
Version 2.000 (2008-03-19)
* RDF::Query now uses RDF::Trine package for common classes (nodes, statements, iterators).
* Moved RDF::Query::Stream into RDF::Trine::Iterator namespace.
* Reshuffled SPARQL parsers tests.
* Added support for RDF::Trine::Model.
* RDF::Trine::Iterator can serialize to XML and JSON natively; Updated tests accordingly.
* rdf namespace is only added by default for RDQL.
* Fixed bug where the wrong bridge object would be returned for queries with FROM clauses.
* Moved query_more code to Algebra classes.
* Added RDF::Query::pattern method to return the GGP algebra pattern for the query.
* Added RDF::Query::as_sparql method to serialize query as SPARQL string.
* Removed unused RDF::Query::set_named_graph_query method.
* Fixed bug where triples from a FROM clause were loaded into the underlying persistent store.
* Added POD to RDF::Query::Node classes.
* Added equal method to RDF::Query::Node classes.
* RDF::Query::Node::Blank constructor now optionally produces identifiers.
* Merged tSPARQL parsing code into new SPARQLP parser.
* Added definite_variables method to RDF::Query::Algebra classes.
* Triple class now serializes rdf:type shortcut 'a' appropriately.
* Removed 'VAR' type from ::Node::Variable object structure.
* Updated code to always expect a HASH reference from ::Bindings iterator.
* Added more (sparql and see) serialization tests.
* Removed old fixup code, replaced by ::Algebra fixup methods.
* Moved FROM clause data loading to its own method.
* Started removing old code (RDF::Base, direct DBI use, AUTOLOAD, profiling).
* Moved general count_statements() method into bridge superclass.
* Fixed SQL compiler to work with ::Algebra and ::Node classes.
* Added as_native method to bridge superclass for converting ::Node objects to bridge-native objects.
* Updated document namespace declaration for SPARQL XML Results.
* Added support for SERVICE queries (ala ARQ) with Bloom filter semijoins.
* Moved Expression classes out of the Algebra hierarchy and into their own space (RDF::Query::Expression).
Version 1.501 (2007-11-15)
* Fixed CONSTRUCT+OPTIONAL bug.
* Added as_sparql methods to Algebra and Node classes to serialize patterns in SPARQL syntax.
* Added deparse script.
* Fixed jena:sha1sum tests when Digest::SHA1 isn't available.
Version 1.500 (2007-11-13)
* Query Engine:
* URIs are now properly qualified with a BASE when present.
* Base URI passed to constructor is now used if no BASE clause exists in the query.
* Fixed BASE qualification when an IRI contains Unicode characters (Emulating IRI support with the URI module).
* NAMED graph data is now seperated from the default model into new (temporary) models.
* NAMED graphs now work with RDF::Core.
* Added new RDF::Query::Algebra:: classes that are used to represent query ASTs.
* Added new RDF::Query::Node:: classes that are used to represent RDF Nodes and Variables.
* Major refactoring to RDF::Query::query_more() to enhance extensibility.
* Added RDF::Query::query_more_triple() and RDF::Query::query_more_bgp() for triple and bgp matching.
* Improved support of GGP pattern matching.
* Added sgrep, smap, swatch and concat methods to RDF::Query::Stream class.
* Refactored query_more() variants and sort_rows() to use new stream methods sgrep, smap, and concat.
* Continued to fix bugs to more closely align with DAWG tests.
* Updated DAWG tests to run with the RDF::Core backend.
* Any DAWG tests with mf:requires are now automatically marked TODO.
* DAWG tests graph equality is now punted to user verification.
* Fixed bNode merging code in DAWG tests.
* query_more() variants and sort_rows() now all return RDF::Query::Stream objects.
* query_more() (and everything it calls) now expects bridge object as a method argument (to ensure NAMED graph querying works).
* Added join_streams() to perform netsted-loop natural joins on two Stream objects.
* Filters:
* Added call_function() method to abstract the generation of ['FUNCTION',...] blocks.
* FILTER operator != is now negative for unknown datatypes.
* Fixed exception handling in check_constraints().
* Fixed type-promotion in arithmetic operations and added recognized xsd numeric types.
* API Chnage: extension functions now take a bridge object as their second argument (after the query object).
* Fixed equals() method in RDF::Core bridge to properly use the RDF::Core API.
* Javascript function makeTerm now accepts language and datatype parameters.
* toString() javascript funtion now returns just the literal value (not including language or datatype).
* sop:str now will stringify blank nodes properly.
* sparql:langmatches now properly differentiates between no language tag and an empty language tag.
* Parsers:
* Parsers now generate ASTs using the Algebra and Node classes.
* Fixed bugs in SPARQL tokenizer for some Unicode strings (with combining accents).
* RDF::Query::Parser::new_literal() now canonicalizes language tags (to lowercase).
* Fixed GGP verification in RDF::Query::Parser::SPARQL::fixup().
* Merged GGPAtom changes from tSPARQL to SPARQL grammar.
* Backends:
* Fixed bug in RDF::Query::Model::RDFCore::equals() when comparing two blank nodes.
* Changed RDF::Query::Model::RDFCore::as_string to return strings where node type is identifiable (like Redland, URIs as [...], literal \"...\", bnodes (...)).
* Model methods literal_value, literal_datatype and literal_value_langauge now return undef if argument isn't a literal.
* Model methods uri_value and blank_identifier now return undef unless argument is of correct type.
* Model add_string methods now normalize Unicode input.
* Blank node prefix is now scoped to bridge, not lexically in RDF::Query::Model::RDFCore.
* RDF::Query::Model::Redland::new_literal now forces argument to a string (XS code breaks on non-PVOK scalars).
* RDF::Query::Model::Redland::add_uri now uses LWP instead of relying on Redland to fetch content.
* Redland model class now recognizes DateTime objects as literals.
* Updated add_uri() method in RDF::Core bridge to support named graphs (only one name per model for now).
* Miscellaneous:
* Added rudimentary profiling code (Devel::DProf seems to crash on RDF::Query)
* Added initial code for supporting property functions (using time:inside as an example).
* Removed multi_get code.
* Removed code for MULTI patterns. Will replace with algebra-based optimization in the future.
* RDF::Query::Stream constructor now accepts an ARRAY reference.
* Stopped using the peephole optimizers. Will replace with an algebra-based optimizer in the future.
Version 1.044 (2007-09-13)
* DAWG tests now emit EARL reports.
* Added test harness and temporal data importing scripts to new bin/ directory.
* Added support for temporal queries in RDF::Query and optimizers.
* Added support for CONSTRUCT queries in new YAPP-based SPARQL parsers.
* Added TIMED graph tests for new SPARQL temporal extensions.
* Added tests to SPARQL parser for bugs that were discovered with temporal extensions.
* Added POD to new SPARQL parsers.
* Added new Parse::Yapp-based SPARQL parser in preparation for temporal SPARQL extensions.
* Added stub functions for temporal extension support.
* Added model_as_stream() method to Redland bridge class.
* Addded debug() method to RDF::Query::Model.
* Added UNION tests.
* Added a javascript debugging flag to RDF::Query.
* Added RDF::Query::groupgraphpattern() for handling GGPs.
* Added xsd:integer casting function.
* Added as a FILTER tee that warns to STDERR.
* Added Eyapp SPARQL grammer file and replaced parser with auto-generated code from eyapp.
* Marked some SPARQL parser tests as TODO (due to incompatability with new YAPP-based parser).
* Network tests are now run against all available models.
* Stream tests are now run against all available models.
* Query parser initialization code cleaned up (and now supports beta tSPARQL parser).
* net_filter_function() now properly accesses nodes with bridge methods.
* RDF::Query::Parser::new_blank now assigns default names if none is supplied.
* Updated error messages in SPARQL parser to align with new YAPP-based parser.
* SPARQL parse_predicate_object() fixed to support tripleNodes.
* SPARQL parse_object() and parse_predicate() fixed for whitespace insensitivity.
* Moved old hand-written SPARQL parser to now unused SPARQL-RD.pm.
* Moved new YAPP-based SPARQL parser to SPARQL.pm.
* Copied YAPP-based SPARQL parser for new temporal extension tSPARQL.pm.
* Moved existing tests for hand-written SPARQL parser to 01-sparql_parser.t.rd-old.
* Moved new YAPP-based SPARQL tests to t/01-sparql_parser.t.
* Removed bad-syntax queries from optimizer and SQL compiler tests.
* Fixed bad-syntax queries in stream and hook tests.
* Made output of coverage tests easier to read by adding test names.
* Fixed SPARQL parsers to allow keywords as variable names.
* Fixed SPARQL parsers to allow dashes and underscores in variable names.
* Fixed bad parser constructor call in SQL compiler tests.
* Suppressed RDF::Base loading (again) during RDF::Query startup.
* RDF::Query::Model::Redland::debug now shows contexts during iterator debugging.
* Moved the old (hand written) SPARQL parser out of the way to make test harnesses happy.
* SPARQL parser now respects spec regarding the reuse of blank node labels across BGPs.
* SPARQL parser now does the right thing with NIL (the empty list).
* SPARQL parser now handles embedded GGPs correctly.
* Updated SPARQL parser and tests to pass (almost all) DAWG tests.
* Fixed bug where results couldn't be sorted by a non-selected variable.
* Removed the unused RDF::Query::timed_graph() method.
* RDF::Query::qualify_uri is now more liberal in what it accepts.
* Fixed xsd:boolean casting of integer values.
* RDF::Query::Parser::new_variable can now generate private variable names.
* Fixed test suite to work properly on systems without Redland.
* Disabled loading of tSPARQL parser for release.
* Removed function prototype definitions in Model base class (was causing loading problems when models are missing).
Version 1.043 (2007-06-14)
* Fixed broken MANIFEST causing MakeMaker code to break.
Version 1.042 (2007-06-13)
* Added support for Javascript URL-based extension functions.
* Added GPG signing support for Javascript functions.
* Added meta methods to model classes.
* Added count_statements methods to model classes.
* Added default format for stringifying query result streams.
* Added SPARQL syntax coverage tests.
* Added stream tests.
* ISIRI() now returns a sop:isIRI function IRI.
* Redland bridge add_uri strips off URI fragment from parser base URI.
* Underlying models aren't loaded if turned off by environment variables.
* Stopped using the (currently broken) multi-get code.
* Model classes aren't used if turned off by environment variable.
* Standardized node testing to is_node (replacing older isa_node).
* GPG verification failure now throws exceptions.
* GPG fingerprint handling is now whitespace insensitive.
* Removed (currently) unused multiget tests.
* Redland bridge uri_value returns undef if not called with a node.
Version 1.041 (2006-11-26)
* Removed unwanted '+' signs on stringified bigints when running under perl 5.6.x.
* Fixed unicode errors when running under perl 5.6.x.
* Added tests for model bridge classes.
* Fixed bugs in SQL bridge class.
* RDFCore and Redland bridge classes now throw error when passed a bad model object.
* Bridge class support() method now responds to feature requests for 'temp_model'.
* Fixed bug in RDF::Query::Model::RDFCore::isa_resource returning true for blank nodes.
* Fixed code in RDF::Query::Model::::SQL::equals().
* Added partial support for new RDF::Storage::DBI storage class.
* Added support for RDF::Query:::Model::SQL models in RDF::Query bridge code.
* Removed RDF::Query::Model::SQL::* code that's now in RDF::Storage::DBI.
* Added tests for backend bridge classes (RDF::Query::Model::*).
* Added checks for which backends support XML serialization.
* Fixed naive peephole tests in cases where model supports cost-based analysis.
* Fixed bugs in tests that were relying on C to act like C.
* Added RDF::Base support.
* Fixed bug in C that prevented running queries against multiple models.
* Added SimpleQueryPatternError exception class for future work on multi-get optimizations.
* Removed forced dependence on Digest::SHA1.
* Makefile.PL now recommends Digest::SHA1 (for jena function) and Geo::Distance (for 07-filters.t).
Version 1.040 (2006-07-21)
* Added support for BOUND() fiters in SQL compilation.
* SQL compiler now produces valid SQL when query variable names are SQL reserved keywords.
* Moved SPARQL parser test data into YAML.
* Added YAML as a build-time prerequisite.
* Fixed SPARQL parsing bug for blank nodes as statement objects.
* Added peephole optimizer code with naive and cost-analysis strategies.
* Added add_string method to RDF::Query::Model::Redland.
* Added node_count method to RDF::Query::Model::Redland (only used for testing at this point).
* RDF::Query::execute() now uses the peephole optimizer.
* Removed punting code in RDF::Query::execute that tried to do JIT optimization.
* Removed calls to getLabel() on model objects in test files.
* Fixed dawg tests (was dying because of multiple plans being printed).
* Fixed cost-based peephole optimizer tests (by forcing Redland to do node counting).
Version 1.039 (2006-07-14)
* Removed dawg tests from distribution. Only used as developer tests now.
* Updated package to use Module::Install instead of ExtUtils::MakeMaker.
* Fixed a spurious uninitialized warning in RDF::Query::get_bridge.
Version 1.038 (2006-07-09)
* Fixed DBI case-sensitivity for PostgreSQL support.
* Cleaned up SQL syntax for easier debugging.
* Removed extra parens in SQL that were causing postgresql to break.
* Reference test foaf file using File::Spec->catfile() instead of directly.
* Fixed SPARQL parsing bug for anonymous nodes in FILTER expressions.
* Fixed major SQL compilation bugs for testing equality in FILTER expressions.
* Fixed bug in hashing code for blank nodes in SQL compiler.
Version 1.037 (2006-07-06)
* execute() method now takes optional 'bind' parameter for pre-binding query variables.
* Updated code to support basic FILTERs in SQL compilation.
* Fixed bug in SQL compilation where no WHERE clause was needed.
* Fixed bug in SQL compilation when using model-specific Statements tables.
* Added Storable to the list of required modules (was missing in the list).
* Fixed typos in metadata about past versions in DOAP Changes.ttl.
Version 1.036 (2006-06-26)
* Fixed memory leak in RDF::Query::Stream that resulted in too many database handles.
* Initial support for OPTIONALs in SQL compiler.
* Removed LWP requirement for systems without libwww.
* Added support for class variable to hold parsing errors. (Beware under threads.)
* RDF::Query now sets error variable upon parsing error. (Access with C.)
* Fixed POD errors, and added tests for POD coverage.
* Added model API methods to SQL model class.
* Added C method to RDF::Query::Stream.
Version 1.035 (2006-06-04)
* Added DAWG tests and harness.
* Rewrote core logic in OPTIONAL handling code.
* Comparisons on literals now respect numeric datatypes.
* Fixed outdated calling conventions in casting functions.
* Added custom functions:
+ jena:sha1sum
+ jena:now
+ jena:langeq
+ jena:listMember
+ ldodds:Distance
* Added new model methods: equals, subject, predicate, object.
* Relocated external http-based test data to .Mac URLs.
Version 1.034 (2006-05-01)
* Added JSON serialization for bindings and boolean queries.
* Initial support for compiling RDF queries to SQL queries using the Redland schema.
* Added to_string method to query results Stream class.
* Model objects now store the query parse tree for access to data needed in serialization.
* Unquoted number and boolean literals in SPARQL are now datatyped appropriately.
* Fixed crashing bug when RDF::Query::Model::Redland::as_string was called with an undefined value.
* Fixed bug parsing queries with predicate starting with 'a' (confused with { ?subj a ?type}).
* Fixed bug parsing queries whose triple pattern ended with the optional dot.
Version 1.033 (2006-03-08)
* Updated test suite to work if one of the model classes is missing.
* Data-typed literals are now cast appropriately when used in a FILTER.
* Added support for xsd:dateTime datatypes using the DateTime module.
* Added support for LANG(), LANGMATCHES() and DATATYPE() built-in functions.
* Updated TODO list.
* Added more exception types to RDF::Query::Error.
* Added POD coverage.
* Fixed SPARQL parsing bug for logical operators <= and >=.
Version 1.032 (2006-03-03)
* Replaced the Parse::RecDescent SPARQL parser with a much faster hand-written one.
* Updated SPARQL parsing rules to be better about URI and QName character sets.
* FILTER equality operator now '=', not '==' (to match SPARQL spec).
* Initial support for FILTER constraints as part of the triple pattern structure (Will allow for nested FILTERs).
* Implemented support for ordering query results by an expression.
* Fixed bug in expresion handling of unary minus.
* Fixed bug in Redland NAMED GRAPH parsing.
* Fixed bug in RDF::Core parsing code where blank nodes would be accidentally smushed.
Version 1.031 (2006-02-08)
* Added support for NAMED graphs.
Version 1.030 (2006-01-13)
* Added support for SELECT * in SPARQL queries.
* Added support for default namespaces in SPARQL queries.
* Added tests for querying RDF collections in SPARQL (1 ?x 3)
* Added tests for triple patterns of the form { ?a ?a ?b . }
* Added tests for default namespaces in SPARQL.
* Added tests for SELECT * SPARQL queries.
* Bugfix where one of two identical triple variables would be ignored ({ ?a ?a ?b }).
Version 1.028 (2005-11-18)
* Added SPARQL functions: BOUND, isURI, isBLANK, isLITERAL.
* Updated SPARQL REGEX syntax.
* Updated SPARQL FILTER syntax.
* Added SPARQL RDF Collections syntactic forms.
* Fixed FILTER support in OPTIONAL queries.
* Added binding_value_by_name method to Query results stream class.
* Added isa_blank methods to RDF::Redland and RDF::Core model classes.
* Fixed RDF literal datatyping when using Redland versions >= 1.00_02.
* Updated SPARQL grammar to make 'WHERE' token optional.
* Added directives to SPARQL grammar.
* Updated SPARQL 'ORDER BY' syntax to use parenthesis.
* Fixed SPARQL FILTER logical-and support for more than two operands.
* Fixed SPARQL FILTER equality operator syntax to use '=' instead of '=='.
* Now requires Test::More 0.52 because of changes to is_deeply().
Version 1.027 (2005-07-28)
* Updated to follow SPARQL Draft 2005.07.21:
+ ORDER BY arguments now use parenthesis.
+ SPARQL parser now supports ORDER BY operands:
variable, expression, or function call.
* Added binding_value_by_name() method to query result streams.
Version 1.026 (2005-06-05)
* Added new DBI model bridge (accesses Redland's mysql storage directly).
* Added built-in SPARQL functions and operators (not connected to grammar yet).
* Added bridge methods for accessing typed literal information.
Version 1.024 (2005-06-02)
* Added missing SPARQL OFFSET grammar rules.
* Added XML Results support for graph and boolean queries (DESCRIBE, CONSTRUCT, ASK).
* Fixed major bugs in RDF::Core bridge:
+ Bridge wasn't using passed model.
+ Literal construction was broken.
+ Blank node construction was broken when no identifier was specified.
* Stream::bindings_count now returns the right number even if there is no data.
* XML Result format now works with RDF::Core models.
* The Model bridge object is now passed to the Stream constructor.
* Internal code now uses the variables method.
* Removed redundant code from ORDER BY/LIMIT/OFFSET handling.
* Removed unused count method.
* Removed unused delegating AUTOLOAD.
* Removed unused parse_files method.
* Removed usused add_file method.
* Removed duplicate net test file.
* Added test file for local file-based SPARQL 'FROM' queries.
* Added test file for SPARQL Result Forms (LIMIT, ORDER BY, OFFSET, DISTINCT).
* Added test file for SPARQL Protocol for RDF (XML Results).
* Added new tests based on Devel::Cover results.
* Some test files now run against both Redland and RDF::Core:
+ 00-simple.t
+ 03-coverage.t
+ 10-sparql_protocol.t
* All debugging is now centrally located in the _debug method.
* Moved Stream class to lib/RDF/Query/Stream.pm.
* Fixed tests that broke with previous fix to CONSTRUCT queries.
* Fixed tests that broke with previous change to ASK query results.
Version 1.021 (2005-06-01)
* Added SPARQL UNION support.
* Broke OPTIONAL handling code off into a seperate method.
* Added new debugging code to trace errors in the twisty web of closures.
Version 1.020 (2005-05-18)
* Added support for SPARQL OPTIONAL graph patterns.
* Calling bindings_count on a stream now returns 0 with no data.
* Added Stream methods:
+ is_bindings
+ binding_name
+ binding_values
+ binding_names
* Added as_xml method to Stream class for XML Binding Results format.
Version 1.016 (2005-05-08)
* Added initial support for SPARQL ASK, DESCRIBE and CONSTRUCT queries.
+ Added new test files for new query types.
* Added methods to bridge classes for creating statements and blank nodes.
* Added as_string method to bridge classes for getting string versions of nodes.
* Broke out triple fixup code into fixup_triple_bridge_variables().
* Updated FILTER test to use new Geo::Distance API.
Version 1.015 (2005-05-03)
* Fixes to the arguments passed to FILTERs.
* Filter tests now show example of two custom filters:
+ Transitive subClassOf testing.
+ Logical comparison operators (range testing lat/lon values).
* Added literal_value, uri_value, and blank_identifier methods to bridges.
* Redland bridge now calls sources/arcs/targets when only one field is missing.
* Fixes to stream code. Iterators are now destroyed in a timely manner.
+ Complex queries no longer max out mysql connections under Redland.
* Cleaned up node sorting code.
+ Removed dependency on Sort::Naturally.
+ Added new node sorting function ncmp().
* check_constraints now calls ncmp() for logical comparisons.
* Added get_value method to make bridge calls and return a scalar value.
* Fixed node creation in Redland bridge.
* Moved DISTINCT handling code to occur before LIMITing.
* Added variables method to retrieve bound variable names.
* Added binding_count and get_all methods to streams.
* get_statments bridge methods now return RDF::Query::Stream objects.
Version 1.014 (2005-04-26)
* Made FILTERs work in SPARQL.
* Added initial SPARQL support for custom function constraints.
* SPARQL variables may now begin with the '$' sigil.
* Added direction support for ORDER BY (ascending/descending).
* Added 'next', 'current', and 'end' to Stream API.
Version 1.012 (2005-04-24)
* Stream objects now handle being constructed with an undef coderef.
* Streams are now objects usinig the Redland QueryResult API.
* RDF namespace is now always available in queries.
* row() now uses a stream when calling execute().
* Added ORDER BY support to RDQL parser.
* SPARQL constraints now properly use the 'FILTER' keyword.
* SPARQL constraints can now use '&&' as an operator.
* SPARQL namespace declaration is now optional.
* Updated tests.
Version 1.010 (2005-04-21)
* execute now returns an iterator.
* Added core support for DISTINCT, LIMIT, OFFSET.
* Added initial core support for ORDER BY (only works on one column right now).
* Broke out the query parser into it's own RDQL class.
* Added initial support for a SPARQL parser.
+ Added support for blank nodes.
+ Added lots of syntactic sugar (with blank nodes, multiple predicates and objects).
+ Added SPARQL support for DISTINCT and ORDER BY.
* Moved model-specific code into RDF::Query::Model::*.
* Moving over to redland's query API (pass in the model when query is executed).
COPYRIGHT
Copyright (C) 2005-2015 Gregory Williams. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
AUTHOR
Gregory Todd Williams
RDF-Query-2.919/PaxHeader/Changes.ttl 000644 000765 000024 00000000225 14632642752 017423 x ustar 00greg staff 000000 000000 30 mtime=1718306282.259297425
64 LIBARCHIVE.xattr.com.apple.TextEncoding=VVRGLTg7MTM0MjE3OTg0
55 SCHILY.xattr.com.apple.TextEncoding=UTF-8;134217984
RDF-Query-2.919/Changes.ttl 000644 000765 000024 00000401677 14632642752 015472 0 ustar 00greg staff 000000 000000 # -*-n3-*-
@prefix dc: .
@prefix dcterms: .
@prefix doap: .
@prefix asc: .
<>
dc:description "Changes for RDF::Query" ;
dcterms:references .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.919" ;
doap:created "2024-06-13" ;
];
asc:changes [
asc:update "Fixed XPath Constructor (cast) functions." ;
asc:update "Fix case-sensitivity bug in parser for IN expression (#165)." ;
asc:update "Removed RDF::Query::Util::start_endpoint as it required unreleased/unsupported code (#139)." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.918" ;
doap:created "2017-01-04" ;
];
asc:changes [
asc:update "Do not search modules in relative paths (#141 from @ppisar)." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.917" ;
doap:created "2016-05-22" ;
];
asc:changes [
asc:update "Change hashbang to use env (#137 from KjetilK)." ;
asc:update "Replaced Text::CSV by Text::CSV_XS (#127, #136; patch from jordivador)." ;
asc:update "Fixed bug that didn't properly anchor the regex match in serializing prefixnames (#135)." ;
asc:update "Fixed SPARQL parsing bug causing filters to improperly appear inside of service blocks (github issue #134)." ;
asc:update "Fix SPARQL serialization of functions that have a prefix that is also a valid function name (#133)." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.916" ;
doap:created "2015-10-16" ;
];
asc:changes [
asc:update "Updated RDF::Query::Node::Resource->as_sparql to allow SPARQL 1.0 PN_LOCAL prefix names (GitHub issue #132)." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.915" ;
doap:created "2015-08-18" ;
];
asc:changes [
asc:addition "Add RDF::Query::Node->from_attean method (PR #128 from Kjetil Kjernsmo)." ;
asc:update "Add default indentation to RDF::Query::Algebra::Limit->sse." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.914" ;
doap:created "2015-05-17" ;
];
asc:changes [
asc:update "Fixed bug in evaluation of SPARQL CONCAT function." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.913" ;
doap:created "2015-02-14" ;
];
asc:changes [
asc:update "Merge adjacent service blocks if their endpoints and silent flags match (github issue #124)." ;
asc:update "Allow RDF::Query->new to accept an algebra object instead of a query string." ;
asc:update "Fix SPARQL 1.1 parsing bug that disallowed whitespace between an aggregate name and the following open-parenthesis." ;
asc:update "Updated node classes to allow overloaded comparisions with RDF::Trine::Node::Nil objects." ;
asc:update "Fix bug in RDF::Query::Algebra::NamedGraph->definite_variables." ;
asc:update "Fix rqsh to use a pure memory model when requested (instead of a temporary model)." ;
asc:update "Improve coverage of as_hash function for variable bindings and expressions (github issue #121)." ;
asc:update "Fixed whitespace handling bug during parsing of VALUES clauses (github issue #120)." ;
asc:update "Documentation fixes (from Kjetil Kjernsmo)." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.912" ;
doap:created "2014-10-24" ;
];
asc:changes [
asc:addition "Added IRC resource to Makefile.PL." ;
asc:update "Fix bug in handling of SUM aggregates with non-literal data." ;
asc:update "Improved performance of regular expression use in SPARQL parser (from Dorian Taylor; github pull request #111)." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.911" ;
doap:created "2014-07-24" ;
];
asc:changes [
asc:addition "Added RDF::Query::ExecutionContext->bind_variable method." ;
asc:addition "Added :all export tag to RDF::Trine::Node." ;
asc:update "Fixed bug in RDF::Query::Plan::Join::PushDownNestedLoop that didn't allow 'aggregate' to appear in the RHS serialized text (github issue 101)." ;
asc:update "Fixed SPARQL 1.1 GGP parsing bug (github issue 100)." ;
asc:update "Fixed RDF::Query::Algebra->subpatterns_of_type to support descent into sub-queries." ;
asc:update "Disabled pushing full updates down into the store object (only meant to be full queries at this point)." ;
asc:update "Fixed as_hash method in RDF::Query::Algebra::Aggregate, RDF::Query::Algebra::Sort, and RDF::Query::Expression::Alias." ;
asc:update "Updated RDF::Query::Compiler::SQL to respect node class encapsulation." ;
asc:update "Modularized implementation of explain method in algebra and plan classes." ;
asc:update "Updated rqsh script to use env perl instead of hardcoded bin path." ;
asc:update "Added JSON output to bin/parse.pl script." ;
asc:update "Remove Crypt::GPG and Bloom::Filter from list of recommended modules (no longer used in code)." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.910" ;
doap:created "2013-07-22" ;
];
asc:changes [
asc:update "Updated RDQL parser to work with recent RDF::Trine releases." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.909" ;
doap:created "2012-11-24" ;
];
asc:changes [
asc:addition "Added support for VALUES graph pattern (in-place BINDINGS)." ;
asc:addition "Added support for UUID() and STRUUID() functions." ;
asc:addition "Added is_update() and specifies_update_dataset() methods to RDF::Query." ;
asc:update "Accept common typo of SEPARATOR in SPARQL 1.1 parser ('SEPERATOR') with constructor arg 'allow_typos' in RDF::Query::Parser::SPARQL11." ;
asc:update "Fixed bad sparql serialization of filters with equality tests; was using '==' instead of '=' (github issue 53)." ;
asc:update "Fixed bug in RDF::Query::Algebra::Service->referenced_variables." ;
asc:update "Fixed bug that wasn't passing the active graph to EXISTS filter evaluation." ; asc:update " Fixed bug that wasn't passing the active graph to EXISTS filter evaluation." ;
asc:update "Fixed RDF::Query prepare and execute methods to properly localize the model object." ;
asc:update "Fixed bug in RDQL parser that mistakenly required a USING clause (github issue 70)." ;
asc:update "Fixed handling of aggregates over empty groups." ;
asc:update "Fixed SPARQL 1.1 parsing to enforce not using shared bnode labels between update data operations." ;
asc:update "Improved SPARQL 1.1 parser detection of invalid use of BIND() (when binding already in-scope variables)." ;
asc:update "Fixed bug in SPARQL 1.1 parser to recognize legal Update operations." ;
asc:update "Updated SPARQL 1.1 parser to allow colon in local part of a prefixname." ;
asc:update "Updated STRBEFORE() and STRAFTER() implementations to track SPARQL 1.1 standard." ;
asc:update "Updated property path implementation to track W3C standard (changed counting semantics and dropped {m,n} form)." ;
asc:update "Added support to passthrough query eval to the model if supported and the 'allow_passthrough' option is set on the query object." ;
asc:update "Added 'canonicalize' option to RDF::Query constructor to canonicalize literal values." ;
asc:update "Updated handling of BIND() in the SPARQL 1.1 parser to match the latest spec semantics." ;
asc:update "Added ability to run tests of type mf:CSVResultFormatTest." ;
asc:update "Fixed config handling in rqsh to allow the use of hexastore backends." ;
asc:update "Merged Log4perl initialization cleanup patches (from github/kba)." ;
asc:update "Use $plan->explain instead of $plan->sse for 'explain' rqsh command." ;
asc:update "Updated EARL IRIs in bin/failing_earl_tests.sh and bin/passing_earl_tests.sh." ;
asc:update "Removed RDF::Redland recommendation in Makefile.PL." ;
asc:update "Added doap:implements statements, and updated release data to doap.rdf." ;
asc:update "Updated RDF::Query::Util::cli_parse_args to allow no-argument setup." ;
asc:update "Updated xt/dawg/earl.pl to use new EARL IRIs earl:passed and earl:failed." ;
asc:update "Added POD to bin/rqsh." ;
asc:update "Updated DAWG test harnesses to support expected query bindings results in RDF/XML format." ;
asc:update "Fixed xt/dawg-eval11.t to emit TAP failures when query parsing fails." ;
asc:update "Require RDF::Endpoint 0.05 in xt/dawg-eval11.t." ;
asc:update "Removed values from test directory list in xt/dawg-eval11.t." ;
asc:update "Added values to list of test directories in xt/dawg-eval11.t." ;
asc:update "Added exists test directory to xt/dawg-eval11.t." ;
asc:update "Added test case confirming bad sparql serialization of equality testing filters (github issue 53)." ;
asc:update "Removed tests for {m,n} property path forms." ;
asc:update "Fixed RDF::Query::Algebra::Project to throw exception on bad constructor arguments." ;
asc:update "Added bugtracker info to Makefile.PL." ;
asc:update "Added POD marking modules as unstable: RDF::Query::BGPOptimizer, RDF::Query::Compiler::SQL, RDF::Query::Federate, RDF::Query::Federate::Plan" ;
asc:update "Improved expected/actual results output when encountering failing tests." ;
asc:update "Removed old bloom-filter federation code." ;
asc:update "Removed RDF::Query::ExecutionContext->base method." ;
asc:update "Fix POD in RDF::Query::Algebra::Table." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.908" ;
doap:created "2012-01-31" ;
];
asc:changes [
asc:addition "Added support for Service as a binary op (allowing variable-endpoint SERVICE blocks)." ;
asc:addition "Added implementations for functions STRBEFORE, STRAFTER, and REPLACE." ;
asc:addition "Added RDF::Query->prepare_with_named_graphs method." ;
asc:addition "Added support for COPY and MOVE operations." ;
asc:addition "Allow percent encoding and backslash escaping in prefix names." ;
asc:update "Fixed SPARQL serialization of expressions using && and ||." ;
asc:update "Fixed SPARQL 1.1 parser to support 'GRAPH' without whitespace." ;
asc:update "Fixed bug resulting in false positive error when projecting expressions with aggregates." ;
asc:update "Fixed aggregate evaluation to result in unbound variables on error (instead of dropping the result)." ;
asc:update "Fixed numeric divide operation to return xsd:decimal when operands are xsd:integers." ;
asc:update "Fixed RDF::Query::Expression::Binary->evaluate to properly throw on div-by-zero." ;
asc:update "Fixed RDF::Query::Expression::Function->evaluate to propogate type errors in IF()." ;
asc:update "Fixed bin/rqsh to handle queries that use BASE." ;
asc:update "Fixed bug in RDF::Query::Plan::Join::PushDownNestedLoop that produced invalid results when the RHS was a subselect." ;
asc:update "Fixed RDF::Query::Algebra::Filter->as_sparql to handle variation of serialization of the child pattern." ;
asc:update "Fixed bug in SPARQL 1.1 parser that mistakenly introduced aggregate operations in non-aggregate queries." ;
asc:update "Fixed RDF::Query::Expression::Binary to canonicalize numeric literal results." ;
asc:update "Added syntax support for SILENT form of LOAD." ;
asc:update "Added support for SILENT and variable endpoint handling for SERVICE patterns." ;
asc:update "Added syntax support for optional GRAPH keyword on SPARQL 1.1 update shortcuts." ;
asc:update "Updated RDF::Query::Plan::Extend to copy variable bindings instead of using the existing reference." ;
asc:update "Added RDF::Query::Plan::Extend->explain." ;
asc:update "Changed explain() syntax of plan quads." ;
asc:update "Updated plan classes to optionally register intermediate results with a execution delegate object." ;
asc:update "Made RDF::Query::Plan::Construct uniq the returned triples." ;
asc:update "Added custom RDF::Query::Plan::Construct->explain method." ;
asc:update "Normalize language tags used in SPARQL query syntax to lowercase." ;
asc:update "Modularize RDF::Query::Plan::Service to allow mock testing." ;
asc:update "Added exception handling in RDF::Query->set_error." ;
asc:update "Added subplans_of_type method to Plan classes." ;
asc:update "Fixed use of '__DEFAULT__' sentinel value in RDF::Query::Plan, RDF::Query::Plan::Service, RDF::Query::Node::Resource->as_sparql, and RDF::Query->as_sparql." ;
asc:update "Force the planner to avoid using a bind-join when the RHS contains a Service subplan (to avoid a DOS attack on the remote endpoint)." ;
asc:update "Updated DATATYPE() to return rdf:langString on language-tagged literals (per RDF 1.1 change)." ;
asc:update "Fixed sse serialization in RDF::Query::Algebra::Service to handle binary op (variable endpoint) form." ;
asc:update "Croak rather than die in some places, confess and use logdie in one place" ;
asc:update "Allow aggregates in ORDER BY clause." ;
asc:update "Added examples/query_url.pl." ;
asc:update "Added RDF::Trine::Error::UnimplementedError exception class." ;
asc:update "Updated required version of RDF::Trine to 0.138." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.907" ;
doap:created "2011-06-04" ;
];
asc:changes [
asc:addition "Fixed bug in SPARQL 1.1 parser for DESCRIBE queries without a WHERE clause." ;
asc:addition "Fixed join ordering bug for queries with a BINDINGS clause and several joins." ;
asc:addition "Fixed RDF::Query->as_sparql for DESCRIBE queries which project URI terms, not variables." ;
asc:addition "Fixed expected test results for DESCRIBE queries without a WHERE clause." ;
asc:addition "examples/query.pl now emits a warning if the query object cannot be constructed." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.906" ;
doap:created "2011-05-14" ;
];
asc:changes [
asc:addition "Added support for empty SPARQL 1.1 Update sequence operations (allowing no-op updates)." ;
asc:addition "Added options to RDF::Query->new to allow forcing RDF::Query to disable query delegation to the underlying store." ;
asc:addition "Added option to RDF::Query::Util::cli_parse_args to specify arbitrary options to be supplied to the RDF::Query->new constructor." ;
asc:addition "Added new, cleaner line-based 'explain' format for serializing query Plan and Algebra objects." ;
asc:addition "Added bindings accessor and is_unit method to RDF::Query::Plan::Constant." ;
asc:addition "Added ability to forcibly remove a particular join algorithm from consideration in plan generation." ;
asc:addition "Added 'execute' command in rqsh to allow loading a query from a file or URL." ;
asc:update "Globally changed 'base' to 'base_uri' in code and API." ;
asc:update "Fixed SPARQL serialization in RDF::Query::Plan generation of SERVICE blocks to always include braces around the query body." ;
asc:update "Fixed SPARQL 1.1 parsing bug in property paths using alternatives ('|')." ;
asc:update "Fixed SPARQL 1.1 bug in parsing prefixnames where a graph term is expected." ;
asc:update "Fixed bug in ZeroOrMore reverse path handling (patterns matching { var path* term })." ;
asc:update "Fixed bug in RDF::Query::Node::Literal::_cmp that was causing wrong node comparison results." ;
asc:update "Fixed bug in parsing solution modifiers in CONSTRUCT and DESCRIBE queries." ;
asc:update "Fixed bug in handling of unbound variables in delete templates in RDF::Query::Plan::Update." ;
asc:update "Fixed bug in calls to RDF::Query->var_or_expr_value that was preventing use of EXISTS filters in project expressions." ;
asc:update "Updated RDF::Query::Plan::Iterator->new to allow passing in a callback that will return an iterator, instead of an iterator directly." ;
asc:update "Updated RDF::Query->query_plan to delegate entire queries to the RDF::Trine::Model when possible." ;
asc:update "Updated bin/deparse.pl to allow specifying an endpoint url for SPARQL-backed models (which can affect the query plan)." ;
asc:update "Updated SPARQL 1.1 parser to prevent bnode use in DELETE blocks." ;
asc:update "Updated rqsh to associate common filename extensions with media types (helps in loading local files)." ;
asc:update "Updated RDF::Query::Plan::Path to align with new ALP algorithm from the spec text." ;
asc:update "Added some simple statistics generation code in RDF::Query::Plan::Join subclasses." ;
asc:update "Added missing implementation for property paths using {n,} modifier syntax." ;
asc:update "Added code to guard against mishandling unbound/blank/variable nodes in DELETE templates in RDF::Query::Plan::Update." ;
asc:update "Updated tests to use new RDF::Trine::Iterator->seen_count method instead of deprecated count method." ;
asc:update "Updated serialization text for zero-length paths in RDF::Query::Plan::Path->plan_node_data." ;
asc:update "Removed warning of unknown options passed to RDF::Query->new." ;
asc:update "Removed unused projection code in RDF::Query->execute_plan." ;
asc:update "Removed Digest::SHA1 from prereq modules, and updated code to use Digest::SHA instead." ;
asc:update "Remove the meaningless 'All rights reserved' copyright text." ;
asc:update "Fixed test count in t/sparql11-propery_paths.t." ;
asc:update "Commented out noisy debugging output in RDF::Query::Plan::Path." ;
asc:update "Added trace debugging in RDF::Query::Plan::Sort." ;
asc:update "Added options instance variable to RDF::Query::ExecutionContext." ;
asc:update "Added Module::Pluggable to list of required modules in Makefile.PL." ;
asc:update "Added mappings from file extensions to media types in dawg test scripts." ;
asc:update "Various updates to SPARQL 1.1 dawg test harness scripts." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.905" ;
doap:created "2011-02-18" ;
];
asc:changes [
asc:addition "Added SPARQL 1.1 numeric functions: ABS, CEIL, FLOOR, ROUND, RAND" ;
asc:addition "Added SPARQL 1.1 string functions: CONCAT, SUBSTR, STRLEN, UCASE, LCASE, ENCODE_FOR_URI, CONTAINS, STRSTARTS, STRENDS" ;
asc:addition "Added SPARQL 1.1 date functions: NOW, TIMEZONE, TZ, YEAR, MONTH, DAY, HOURS, MINUTES, SECONDS" ;
asc:addition "Added SPARQL 1.1 hashing functions: MD5, SHA1, SHA224, SHA256, SHA384, and SHA512" ;
asc:addition "Added RDF::Query::Functions->install_function method, and implementations for fn:compare, fn:concat, and fn:substring." ;
asc:addition "Updated RDF::Query->execute_with_named_graphs to accept optional arguments to be passed to C<< execute >>." ;
asc:addition "Added support for CONSTRUCT WHERE syntax shortcut." ;
asc:addition "Added support for SILENT modifier to SERVICE patterns." ;
asc:addition "Added SILENT flag in RDF::Query::Algebra::Service." ;
asc:addition "Added initial code to create SPIN serializations of queries." ;
asc:addition "Added RDF::Query::Node::Literal->type_list method." ;
asc:update "Fixed mistaken case sensitivity of COALESCE, BNODE, CONCAT, and SUBSTR keywords in SPARQL 1.1 parser." ;
asc:update "Fixed parsing ambiguity between MIN aggregate and MINUTES function." ;
asc:update "Fixed Xpath fn:timezone-from-dateTime function return for UTC timezones." ;
asc:update "Fixed RDF::Query::Algebra::Project->as_sparql handling of binary select expressions." ;
asc:update "Fixed RDF::Query::Algebra::Construct->sse serialization to include construct triples." ;
asc:update "Updated handling of BIND() to not close group scope (which was applying filters in the wrong place)." ;
asc:update "Fixed RDF::Query::Parser::SPARQL11 to handle whitespace between tokens in 'INSERT DATA' and 'DELETE DATA'." ;
asc:update "Fixed RDF::Query::Parser::SPARQL11 to handle empty ModifyTemplates." ;
asc:update "Fixed SPARQL 1.1 parser to properly set relevant datasets for update operations." ;
asc:update "Fixed plan code for zero-length paths to return RDF::Query::Node-based results (not Trine-based)." ;
asc:update "Fixed bug in RDF::Query::Plan::Clear when attempting to clear the default graph." ;
asc:update "Fixed exception throwing on numeric binary expression eval without numeric literal arguments." ;
asc:update "Updated RDF::Query::Plan to handle update operations with different datasets for matching (USING clause)." ;
asc:update "Updated xt/dawg-syntax11.t to find more syntax queries in the dawg test data." ;
asc:update "SPARQL 1.1 parser now throws errors for more classes of syntactically invalid queries (repeated expression aliases, wrong number of BINDINGS values, SELECT * with use of grouping)." ;
asc:update "Added support for non-strict comparisons of xsd:strings in RDF::Query::Node::Literal (based on $LAZY_COMPARISONS variable)." ;
asc:update "Major refactor of xt/dawg-eval11.t test harness." ;
asc:update "Updated required version of Test::More to 0.88 (0.86 doesn't have done_testing() used in t/store-config.t)." ;
asc:update "Updated RDF::Query::Expression::Function->evaluate to throw an error if no function coderef is found." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.904" ;
doap:created "2010-11-23" ;
];
asc:changes [
asc:addition "Added 'results' command to rqsh to allow serializing query results in SPARQL XML format." ;
asc:addition "Added 'set prefix' and 'time' commands to rqsh." ;
asc:addition "Added string concatenation overloading of binary +." ;
asc:addition "Added xpath function implementations." ;
asc:addition "Added SPARQL 1.1 Update shortcut syntax support for COPY, MOVE, and ADD graph operations." ;
asc:update "Fixed bug in property path evaluation on encountering blank path nodes." ;
asc:update "Fixed use of binary '*' in FILTER without numeric data in t/resultforms.t." ;
asc:update "Fixed bin/dawg11-status.pl to only load SPARQL 1.1 earl result files." ;
asc:update "Fixed RDF::Query::Plan::Update to ignore non-ground triples (unbound variables don't act as wildcards)." ;
asc:update "Fixed handling of named graph data in insert/delete patterns of update operations." ;
asc:update "Updated RDF::Query::Util to use RDF::Trine::Model->temporary_model and guess an appropriate parser based on filenames." ;
asc:update "Updated namespace URI in RDF::Query::Functions::Jena to ." ;
asc:update "Updated namespace URI in RDF::Query::Functions::Xpath to ." ;
asc:update "Updated xt/dawg-eval11.t to align with updated test case manifest schemas." ;
asc:update "Updated xt/dawg-eval11.t to prevent test cases with missing files from emitting failures (now skipped)." ;
asc:update "Updated documentation to explicitly discuss inherited methods due to subclassing." ;
asc:update "Fixed bug in RDF::Query::Plan::Construct that wasn't giving each result a new set of blank nodes (RT 63155)." ;
asc:update "Updated SYNOPSIS and execute() and execute_plan() methods POD (RT 63153 comment from Ivan Shmakov)." ;
asc:update "Fixed RDF::Query::Algebra::Sequence->sse to serialize operations in proper order." ;
asc:update "Added $silent argument to RDF::Query::Algebra::Clear constructor." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.903" ;
doap:created "2010-11-03" ;
];
asc:changes [
asc:addition "Added support for BIND(expr AS ?var) operator." ;
asc:addition "Added isNumeric built-in function, checking for proper datatype and valid lexical forms for numerics." ;
asc:addition "Added ability to show the parsed algebra with 'parse' command in rqsh." ;
asc:addition "Added abiility to show the query execution plan with the 'explain' command in rqsh." ;
asc:addition "Added ability to change the RDF serializer with the 'serializer' command in rqsh." ;
asc:addition "Added ability to initialize new stores with the 'init' command in rqsh." ;
asc:addition "Added ability to change underlying store with the 'use' command in rqsh." ;
asc:addition "Added 'help' command in rqsh." ;
asc:addition "Added trace debugging to RDF::Query::Plan::Union." ;
asc:addition "Added trace debugging to RDF::Query::Plan::Project." ;
asc:addition "Added trace debugging to RDF::Query::Plan::Path." ;
asc:addition "Added SPARQL 1.1 syntax and eval test harnesses." ;
asc:update "Updated packaging to install rqsh script (renamed from old bin/rqsh.pl)." ;
asc:update "Updated rqsh to catch errors thrown while trying to create new storage backends (e.g. DBI->connect failing)." ;
asc:update "rqsh now defaults to read-write models." ;
asc:update "rqsh now sets a base URI for the current working directory." ;
asc:update "Password input now doesn't echo to the terminal in rqsh." ;
asc:update "Filename input now autocompletes via Term::ReadLine in rqsh." ;
asc:update "Updated SPARQL 1.1 parser to handle WITH clauses with PrefixedNames." ;
asc:update "SPARQL 1.1 parser now sets error and returns if no query string is supplied." ;
asc:update "Added more exception handling in RDF::Query::Parser::SPARQL11." ;
asc:update "Updated CLEAR and DROP handling in SPARQL 1.1 parser and engine to handle 'NAMED' and 'ALL' variants." ;
asc:update "Renamed 'binding_variables' methods to 'potentially_bound' to align with current SPARQL 1.1 terminology." ;
asc:update "Results returned by property path plans are now RDF::Query::VariableBindings objects and are properly projected." ;
asc:update "The query planner now interprets simple paths as basic graph patterns." ;
asc:update "Removed Algebra and Plan classes for Not and Exists operations (now handled in other classes)." ;
asc:update "Updated RDF::Query::Plan::Extend to drop the extended variable binding if evaluating the extension yields an error." ;
asc:update "Updated RDF::Query::Plan::Update to accept delete patterns with variables." ;
asc:update "Updated subquery plan objects to use a sub-plan, not a full query object." ;
asc:update "Fixed SPARQL 1.1 parser bug that was returning partial data from a failed parse call." ;
asc:update "Fixed SPARQL 1.1 parser bug for queries with multiple FILTERs in a GGP including an EXISTS filter." ;
asc:update "Fixed SPARQL 1.1 parser bug for DROP/CLEAR queries." ;
asc:update "Fixed SPARQL 1.1 parser typo of 'SEPARATOR' argument to GROUP_CONCAT aggregate." ;
asc:update "Fixed SPARQL 1.1 parser to handle FITLERS to the left of MINUS/OPTIONAL and allow projecting '*' with other vars/epressions." ;
asc:update "Fixed SPARQL 1.1 parser case sensitivity of project expression 'AS' token." ;
asc:update "Fixed SPARQL 1.1 parser handling of of subqueries within GRAPH blocks." ;
asc:update "Fixed miscellaneous bugs and improved performance of parsing SPARQL 1.1 queries." ;
asc:update "Made parsing of very large triple blocks non-recursive in SPARQL 1.1 parser." ;
asc:update "Fixed COALESCE function to handle errors properly." ;
asc:update "Fixed RDF::Query::Plan::Aggregate to extend results using AliasExpressions from HAVING clauses." ;
asc:update "Fixed bug that was ignoring GROUP BY clauses when no aggregate operations were present." ;
asc:update "Fixed bad looping on start node of unbounded property paths." ;
asc:update "Fixed bug in query planning of '^' property paths." ;
asc:update "Fixed zero-length property path evaluation within GRAPH blocks." ;
asc:update "Removed plan duplication of zero-length case in '*' property paths." ;
asc:update "Fixed handling of named graphs within subqueries (changes to active graph handling in the query planner)." ;
asc:update "Fixed type-promotion and handling of numeric types in aggregate handling." ;
asc:update "Fixed RDF::Query::Algebra::Update->as_sparql to handle INSERT/DELETE updates properly." ;
asc:update "Fixed RDF::Query::Plan::Aggregate->sse to allow handling of (non-blessed, scalar) '*' columns." ;
asc:update "Added ability to pass through arguments to the query planner in RDF::Query->prepare." ;
asc:update "Updated RDF::Query::Node::Literal::_cmp to handle literals that fail to parse as DateTime objects." ;
asc:update "Updated RDF::Query::Plan::Limit to use the limit accessor internally." ;
asc:update "RDF::Query::Plan::NamedGraph now uses lazy iterator for graph names." ;
asc:update "Updated RDF::Query::VariableBindings to subclass the new RDF::Trine::VariableBindings." ;
asc:update "RDF::Query::Algebra::Project now implements bind_variables()." ;
asc:update "Updated RDF::Query->describe to use $model->bounded_description instead of simply outgoing arcs." ;
asc:update "Fixed bug in evaluation of function expressions in which the execution context object was lost (causing EXISTS filters to fail)." ;
asc:update "Fixed optimization of COUNT(*) over 1-triple BGPs to keep the variable binding for the pseudo-variable ?COUNT(*)." ;
asc:update "Fixed sse serialization in RDF::Query::Algebra::Distinct." ;
asc:update "Fixed RDF::Query::Plan::Join::PushDownNestedLoop to close sub-plans in close() method." ;
asc:update "Replaced calls to die with throwing exceptions." ;
asc:update "RDF::Query->new now warns about unrecognized options." ;
asc:update "DATATYPE() now throws an exception unless passed a valid node object." ;
asc:update "RDF::Query::Expresion::Binary now throws exceptions on numeric comparisions with non-numeric operands." ;
asc:update "Fixed error message in RDF::Query::Plan::NamedGraph." ;
asc:update "Fixed bug in xt/dawg-eval11.t parsing of srx files containing literal values that evaluate to false in perl (e.g. '0')." ;
asc:update "Fixed turtle output for rdfs:comments in xt/dawg/earl.pl." ;
asc:update "Moved developer tests from t/ to xt/." ;
asc:update "Refactored RDF::Query::Functions into several auto-loaded sub-packages via Module::Pluggable (patch from tobyink)." ;
asc:update "Removed references to the now-deprecated mac.com in network-based tests." ;
asc:update "Updated expected values in t/queryform-describe.t for results using bounded descriptions." ;
asc:update "Updated RDF::Query::Util to look for .prefix-cmd cache of common namespace names." ;
asc:update "Updated RDF::Query::Util::cli_parse_args to accept '-r' as a read-only flag." ;
asc:update "Updated required version of RDF::Trine to 0.126." ;
asc:update "Updated to use URI 1.52 to allow direct usage of IRIs without unicode workarounds." ;
asc:update "Made code updates to improve performance based on profiling." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.902" ;
doap:created "2010-07-02" ;
];
asc:changes [
asc:update "Fixed bug in requiring prerequisite modules." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.901" ;
doap:created "2010-06-29" ;
];
asc:changes [
asc:addition "Added support for SPARQL 1.1 CREATE/DROP GRAPH update operations." ;
asc:update "Fixed named graph handling." ;
asc:update "Fixed bug in handling of * aggregates." ;
asc:update "Simplified code to create new temporary models when FROM clauses dereference graph data." ;
asc:update "Fixed infinite loop bug on parsing certain invalid SPARQL 1.1 update queries." ;
asc:update "Fixed handling of BGPs within named graphs in RDF::Query::Plan::BasicGraphPattern." ;
asc:update "Updated syntax error exception messages in SPARQL parsers." ;
asc:update "Fixed property path evaluation within named graphs." ;
asc:update "Converted Makefile.PL to properly use Module::Install." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.900" ;
doap:created "2010-06-23" ;
];
asc:changes [
asc:addition "Added bin/json.pl to print a JSON-formatted representation of the query algebra." ;
asc:addition "Added bin/rqsh.pl CLI interface to executing updates and queries." ;
asc:addition "Added ability to serialize algebra and plan in bin/deparse.pl." ;
asc:addition "Added support for SPARQL 1.1 Basic Query Federation with BINDINGS and UNDEF support." ;
asc:addition "Added support for SPARQL 1.1 functions: IF, STRDT, STRLANG, IRI, URI, BNODE." ;
asc:addition "Added support for SPARQL 1.1 infix operators IN and NOT IN." ;
asc:addition "Added support for SPARQL 1.1 Aggregates COUNT, SUM, MIN, MAX, AVG, GROUP_CONCAT, and SAMPLE." ;
asc:addition "Added support for SPARQL 1.1 Property paths." ;
asc:addition "Added support for SPARQL 1.1 Negation with MINUS graph patterns and NOT EXISTS filters." ;
asc:addition "Added support for SPARQL 1.1 INSERT/DELETE DATA, INSERT/DELETE WHERE, LOAD, and CLEAR operations." ;
asc:addition "Added support for multi-statement SPARQL 1.1 Updates." ;
asc:addition "Added as_hash method to Query, Algebra, and Node classes." ;
asc:addition "Added new RDF::Query::Plan::ComputedStatement class." ;
asc:addition "Added new RDF::Query::Plan::Iterator class." ;
asc:addition "Implemented optimization for COUNT(*) over a single triplepattern." ;
asc:update "SPARQL 1.1 is now the default query parser." ;
asc:update "RDF::Core is no longer supported as a backend triplestore." ;
asc:update "Redland is still supported as a backend store, but updated handling of default and named graphs means that existing triples stored in Redland without a context (named graph) will not be accessible from RDF::Query." ;
asc:update "Removed all bridge classes (RDF::Query::Model::*)." ;
asc:update "Removed RDF::Query::Logger class." ;
asc:update "Removed net filter function code from RDF::Query." ;
asc:update "Removed SPARUL and SPARQLP parsers." ;
asc:update "RDF::Query no longer loads URIs in FROM and FROM NAMED clauses with SPARQL 1.1 by default." ;
asc:update "Added ability for RDF::Query::Plan::Iterator to fire a callback when execute() is called." ;
asc:update "Fixed whitespace unescaping bug in SPARQL (1.0 and 1.1) parsers." ;
asc:update "bin/deparse.pl now catches parsing errors and prints stacktrace." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.202" ;
doap:created "2010-05-22" ;
];
asc:changes [
asc:addition "Added initial SPARQL 1.1 syntax and eval support for select expressions, subqueries, negation, aggregates, subqueries, and basic federation." ;
asc:addition "Added RDF::Query::VariableBindings.pm->set method." ;
asc:addition "Added RDF::Query::_new constructor without any sanity or setup code (used for subquery construction)." ;
asc:addition "Added RDF::Query::Node::Blank::new constructor to avoid RDF::Trine's N-Triples syntax requirements." ;
asc:addition "Added SAMPLE and GROUP_CONCAT aggregate support." ;
asc:addition "Added shortcut functions for constructing RDF::Query::Node objects and Algebra Triples, BGPs and GGPs." ;
asc:addition "Added warning to RDF::Query::Algebra::Project constructor for improper variable lists." ;
asc:update "Updated DAWG tests to use SPARQL 1.1 parser." ;
asc:update "Removed SPARQLP aggregate tests that don't align with new SPARQL 1.1 semantics." ;
asc:update "Updated DAWG eval tests to skip non-approved tests." ;
asc:update "Fixed handling of unicode decoding in DAWG eval tests." ;
asc:update "Bumped required version of RDF::Trine to 0.123." ;
asc:update "Updated t/models.pl to use RDF::Trine::Parser->parse_url_into_model method and redland's 'guess' parser." ;
asc:update "Fixed logging key name in RDF::Query::Plan::Exists." ;
asc:update "Fixed sse and as_sparql methods in RDF::Query::Algebra::Exists." ;
asc:update "Implemented RDF::Query::Algebra::Exists::binding_variables." ;
asc:update "Updated BGPOptimizer to estimate selectivity directly instead of using costmodel code." ;
asc:update "Removed costmodel code." ;
asc:update "Removed unused fixup and execute methods in Algebra classes." ;
asc:update "Updated RDF::Query to only instantiate DateTime parser and LWP::UserAgent if needed." ;
asc:update "Changed DBPedia network test to align with recent DBPedia update in t/dev-service-description." ;
asc:update "Updated SPARQLP parser tests to align with internal changes in RDF::Query::Algebra::Aggregate." ;
asc:update "Updated RDF::Query::Algebra::Aggregate and RDF::Query::Plan::Aggregate to syntactically handle HAVING clauses." ;
asc:update "Fixed bin/graph-bgp.pl (had bitrotted)." ;
asc:update "Changed bnodes to named variables in examples/queries/sparql-bgp-people-knows.rq." ;
asc:update "RDF::Query::Util::cli_make_query now defaults the 'class' parameter to 'RDF::Query'." ;
asc:update "Removed dependency list and added perlrdf link to POD in RDF::Trine and RDF::Query." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.201" ;
doap:created "2010-01-30" ;
];
asc:changes [
asc:addition "Added benchmark/lubm.pl." ;
asc:addition "Added examples/queries/sparql-ask-people.rq." ;
asc:addition "Added RDFa tests." ;
asc:addition "Added Data::UUID prerequisite to META.yml and Makefile.PL." ;
asc:update "Updated ::Model::RDFTrine::add_uri and ::add_string to use new RDF::Trine::Parser methods." ;
asc:update "Updated as_sparql and sse code to work with more recent RDF::Trine versions." ;
asc:update "Removed as_sparql caching in RDF::Query::Algebra::Triple." ;
asc:update "Renamed RDF::Query test files to remove old-style numbering." ;
asc:update "Updated parser tests to track new RDF::Trine::Node::Literal internal structure." ;
asc:update "Updated prereq version of RDF::Trine to 0.114." ;
asc:update "Fixed NAME POD section in RDF::Query::ServiceDescription (RT52264 from KjetilK)." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.200" ;
doap:created "2009-08-06" ;
];
asc:changes [
asc:addition "Added support for average aggregates, and fixed datatype support in aggregates." ;
asc:addition "Added RDF::Query::Util as home to helper functions (added CLI args parsing functions to create queries and models)." ;
asc:addition "Added examples of queries and service descriptions in examples/." ;
asc:addition "Added new RDF::Query::ServiceDescription::new_with_model constructor." ;
asc:addition "Added test data in data/federation_data/." ;
asc:addition "Added t/federate.t with tests for optimistic federated query optimization using ::Plan::ThresholdUnion and RDF::Endpoint::Server." ;
asc:addition "Added the ability to add label annotations to RDF::Query::VariableBindings, RDF::Query::Algebra::Triple and RDF::Query::Algebra::Quad objects." ;
asc:addition "Added distinguish_bnode_variables method to RDF::Query::Algebra::Quad and RDF::Query::Algebra::Triple." ;
asc:addition "Added RDF::Query::Node::Blank::make_distinguished_variable method." ;
asc:addition "Added caching of sparql serializations to RDF::Query::Algebra::BasicGraphPattern and RDF::Query::Algebra::Triple." ;
asc:addition "Added code to RDF::Query::VariableBindings::new to up-cast any RDF::Trine::Node objects to their RDF::Query equivalents." ;
asc:addition "Added hook in RDF::Query::execute_plan() to print the query plan to STDERR if $options{plan} is set (can be set if defines)." ;
asc:addition "Added threshold timeout argument to RDF::Query::Plan::ThresholdUnion and support for it in RDF::Query::Federate::Plan." ;
asc:addition "Added 'optimistic_threshold_time' query flag to RDF::Query::ExecutionContext and RDF::Query constructor." ;
asc:addition "Added bin/query.pl, a fork of examples/query.pl, to support simple query execution." ;
asc:addition "Added and updated POD to RDF::Query::Util, RDF::Query::Node and RDF::Query::Plan and RDF::Query::Federate::Plan." ;
asc:addition "Added check for RDFQUERY_THROW_ON_SERVICE environment variable in RDF::Query::Plan::Service." ;
asc:addition "Added logging in RDF::Query::Plan::ThresholdUnion, and RDF::Query::Model." ;
asc:addition "Added calls to Log::Log4perl::is_debug to eliminate unnecessary serialization of logging when not in use." ;
asc:addition "Added check for ref($node) in RDF::Query::VariableBindings::new (broke code after previous removal of blessed() check)." ;
asc:addition "Added use of defined() in code that had been testing boolean value of objects (and causing expensive string overloading)." ;
asc:update "Fixed bug in RDF::Query::Plan::Offset in cases where the offset was beyond the end of the result set." ;
asc:update "Fixed testing for Bloom::Filter in t/31-service.t." ;
asc:update "Fixed test expectations when making remote DBPedia query in t/34-servicedescription.t." ;
asc:update "Fixed check of $ENV{RDFQUERY_NETWORK_TESTS} to test boolean value, not just existence." ;
asc:update "Fixed (bad) expected serializations in t/29-serialize.t." ;
asc:update "Fixed bug in RDF::Query::Plan::ThresholdUnion attempting to close an iterator twice." ;
asc:update "Fixed sse serialization issues in RDF::Query::Algebra::BasicGraphPattern and RDF::Query::Algebra::Project." ;
asc:update "Fixed bug in RDF::Query::Node::from_trine() that up-cast blank nodes to variables." ;
asc:update "Fixed quoting issue in RDF::Query::Algebra::Service::sse()." ;
asc:update "Fixed parameter handling in bin/graph-qeps.pl:prune_plans()." ;
asc:update "Fixed handling of 'GRAPH ?g {}' (empty GraphGraphPatterns) to return all graph names." ;
asc:update "Fixed serialization quoting issue in RDF::Query::Algebra::Aggregate::sse()." ;
asc:update "RDF::Query::Plan::Aggregate now attempts plain string comparisons for MIN,MAX when strict_errors is not set." ;
asc:update "Simplified CLI argument parsing in bin/ and examples/ programs." ;
asc:update "Cleaned up code in RDF::Query::Model::get_computed_statements()." ;
asc:update "Updated SSE formatting and uninitialized warning in RDF::Query::Plan, RDF::Query::Algebra::Filter, RDF::Query::Algebra::Distinct and RDF::Query::Algebra::Sort." ;
asc:update "Moved shared RDF::Trine-related model methods into RDF::Query::Model from subclasses." ;
asc:update "Raised required RDF::Trine version to 0.111 which brings RDF::Trine::Graph support." ;
asc:update "RDF::Query::Model::RDFTrine::BasicGraphPattern::execute now returns $self." ;
asc:update "Removed dependency on Test::JSON, List::MoreUtils, and XML::Parser." ;
asc:update "Removed TODO on test in t/29-serialize.t." ;
asc:update "Removed unnecessary code in RDF::Query::Plan subclasses, bin/query.pl, bin/graph-bgp.pl and bin/graph-query.pl." ;
asc:update "Changed logging level from debug to trace in RDF::Query::Plan::Triple, RDF::Query::Plan::Project, RDF::Query::Plan::Filter, RDF::Query::Plan::Join::NestedLoop, RDF::Query::Plan::PushDownNestedLoop, and RDF::Query::Model::RDFTrine." ;
asc:update "Made error message more useful when SERVICE calls fail in RDF::Query::Plan::Service." ;
asc:update "Rewrote the optimistic plan generator in RDF::Query::Federate::Plan." ;
asc:update "Simplified logging in RDF::Query::Federate::Plan (now only logs to category 'rdf.query.federate.plan')." ;
asc:update "RDF::Query::ServiceDescription now adds an 'origin' label annotations to RDF::Query::Algebra::Triple objects." ;
asc:update "Removed check of the sd:definitive property in RDF::Query::ServiceDescription (was based on wrong assumptions)." ;
asc:update "Updated RDF::Query::ServiceDescription::answers_triple_pattern() to recognize wildcard capabilities, constructor now adds wildcard by default." ;
asc:update "RDF::Query::ServiceDescription::computed_statement_generator now returns empty iterators when passed triple patterns with bound blank nodes." ;
asc:update "RDF::Query::Plan::Service now adds an 'origin' label annotation to the RDF::Query::VariableBindings object." ;
asc:update "RDF::Query::Federate::add_service() now adds the appropriate computed statement generators to the query object." ;
asc:update "Removed optimistic query rewriting test from t/34-servicedescription.t (now covered by t/federate.t)." ;
asc:update "Updated dawg-eval.t to actually test graph equivalence." ;
asc:update "Clarified graph labels in RDF::Query::Model::RDFTrine::BasicGraphPattern::graph()." ;
asc:update "RDF::Query::Plan::Quad and RDF::Query::Plan::Triple now add an 'origin' label annotation to the RDF::Query::VariableBindings object if the underlying statement has one." ;
asc:update "RDF::Query::Plan::prune_plans now uses a stable sort when comparing plan costs." ;
asc:update "RDF::Query::Algebra::Triple::new now up-casts to RDF::Query node objects, if necessary." ;
asc:update "RDF::Query::Model::RDFTrine::generate_plans now respects the force_no_optimization query flag." ;
asc:update "RDF::Query::Algebra::BasicGraphPattern::sse() now sorts triples for output." ;
asc:update "RDF::Query::new() now looks for $args{ defines }, and adds them to the internal %options HASH." ;
asc:update "Updated RDF::Query::Plan to only consider model-specific plans (if there are any)." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.100" ;
doap:created "2009-03-18" ;
];
asc:changes [
asc:addition "Added ::Algebra::BasicGraphPattern::connected method." ;
asc:addition "Added ::Model::node_count method." ;
asc:addition "Added ::Model::RDFTrine::count_statements() and ::Model::RDFTrine::node_count() methods." ;
asc:addition "Added 'node_counts' as a recognized key to ::Model::RDFTrine::suports()." ;
asc:addition "Added 'store' field to the data returned by the meta() method in the ::Model::* classes." ;
asc:addition "Added a peek method to ::Iterator to support execution deferment like in ::Algebra::Service." ;
asc:addition "Added a RequestedInterruptError exception class." ;
asc:addition "Added ability to force SERVICE calls to abort using $ENV{RDFQUERY_THROW_ON_SERVICE} and RequestedInterruptError." ;
asc:addition "Added algebra classes for solution modifiers and query forms (construct, project)." ;
asc:addition "Added benchmark/costmodel.pl for testing the RDF::Query::CostModel." ;
asc:addition "Added benchmark/plans.pl to show the runtimes of the available QEPs for a query." ;
asc:addition "Added bf methods to ::Triple and ::BasicGraphPattern to describe the BGP in terms of bound/free." ;
asc:addition "Added bin/graph-bgp.pl to produce a png of a query's BGP variable connectivity graph." ;
asc:addition "Added bin/graph-qeps.pl to vizualize all QEPs of a query with GraphViz." ;
asc:addition "Added bin/graph-query.pl to graph the (one chosen) QEP tree." ;
asc:addition "Added bind_variables method to RDF::Query::Algebra." ;
asc:addition "Added caching to ::Algebra::Service::_names_for_node." ;
asc:addition "Added code and tests for Query Execution Plan classes RDF::Query::Plan::*." ;
asc:addition "Added code for RDF-Trine specific BGP query plans." ;
asc:addition "Added code to count (and warn) the rate of false positives from a bloomjoin." ;
asc:addition "Added cost model hooks in RDF::Query and ::Algebra::BasicGraphPattern." ;
asc:addition "Added debugging information when RDFQUERY_THROW_ON_SERVICE is in effect." ;
asc:addition "Added examples/create_query_api.pl for generating queries programatically (based on request from KjetilK)." ;
asc:addition "Added examples/query.pl to show a simple example of loading data and executing a query." ;
asc:addition "Added expected result count test in t/34-servicedescription.t." ;
asc:addition "Added FeDeRate BINDINGS to the list of supported extensions." ;
asc:addition "Added from_sse method to ::Statement, ::Node." ;
asc:addition "Added get_basic_graph_pattern to ::Model::RDFTrine (not used yet)." ;
asc:addition "Added initial code for ARQ-style property paths." ;
asc:addition "Added initial parser code for SPARQL Update (SPARUL) extension." ;
asc:addition "Added initial tests for algebra subsumes method." ;
asc:addition "Added is_solution_modifier() methods to ::Algebra classes." ;
asc:addition "Added labels and common patterns to service description template." ;
asc:addition "Added logging and costmodel tests." ;
asc:addition "Added logging for execution time (time to construct iterator) of Triples, BGPs, GGPs and sorting." ;
asc:addition "Added logging of cardinalities in ::Algebra::Triple, ::Algebra::BasicGraphPattern and ::Algebra::Service." ;
asc:addition "Added logging to plan classes ::NestedLoop, ::Service, ::Triple." ;
asc:addition "Added more example capabilities and patterns to the test service descriptions." ;
asc:addition "Added more logic and debugging to aggregating triples into BGPs for SERVICE calls." ;
asc:addition "Added new 'UNSAID' syntax for SPARQLP, implementing negation." ;
asc:addition "Added new bloom:filter function variant that doesn't use identity reasoning." ;
asc:addition "Added optional restriction argument to ::Algebra::subpatterns_of_type." ;
asc:addition "Added parse_expr method to RDF::Query::Parser::SPARQL." ;
asc:addition "Added RDF::Query::Algebra::Quad::bf() method." ;
asc:addition "Added RDF::Query::BGPOptimizer implementing a basic optimizer for basic selectivity-based join ordering." ;
asc:addition "Added RDF::Query::CostModel classes for computing/estimating the cost of executing a specific pattern." ;
asc:addition "Added RDF::Query::ExecutionContext to hold all necessary information for query execution (query, model, bound variables)." ;
asc:addition "Added RDF::Query::Federate::Plan for federation-specific code." ;
asc:addition "Added RDF::Query::Model::RDFTrine::BasicGraphPattner::graph() method." ;
asc:addition "Added RDF::Query::Node::compare for sorting (either Trine or Query) node objects." ;
asc:addition "Added RDF::Query::plan_class so that ::Federate can overload calls to ::Plan methods." ;
asc:addition "Added RDF::Query::ServiceDescription for parsing DARQ-style service descriptions." ;
asc:addition "Added RDF::Query::VariableBindings to wrap existing HASH-based variable binding structure." ;
asc:addition "Added RDF::Trine::Store::Hexastore to test model construction list in t/models.pl." ;
asc:addition "Added sparql:pattern data to test service descriptions." ;
asc:addition "Added sse re-serialization test to t/29-serialize.t." ;
asc:addition "Added stub ::Plan::ThresholdUnion class for running optimistic queries." ;
asc:addition "Added support for computed statement generators (like ARQ's computed property support [e.g. list:member])." ;
asc:addition "Added support for sparql:pattern in service description parsing." ;
asc:addition "Added t/plan-rdftrine.t to test QEP generation optimized for RDF::Trine BGPs." ;
asc:addition "Added test data for repeat patterns (e.g. { ?a ?a ?b})." ;
asc:addition "Added tests to t/plan.t for QEP sse serialization." ;
asc:addition "Added trial subsumes() methods to ::Algebra::BasicGraphPattern and ::Algebra::Triple." ;
asc:addition "Added workaround to RDFCore bridge so that RDF::Core doesn't die if getStmts is called with a Literal in the subj or pred position." ;
asc:update "Algebra classes now call RDF::Query::algebra_fixup for optimization before falling back on normal fixup code." ;
asc:update "Allow equality test and disjunction filters in patterns that can be compiled to SQL." ;
asc:update "Bloom filter use is now only attempted on SERVICE blocks that don't immediately contain a FILTER." ;
asc:update "Changed debugging in RDF::Query modules to use Log::Log4perl." ;
asc:update "Cleaned up federation tests." ;
asc:update "Code now materializes all node identities before creating the Bloom filter (so capacity arg is accurate)." ;
asc:update "Commented out in-progress service description tests." ;
asc:update "Converted RDF::Query::execute() to use ::Plan classes." ;
asc:update "Fixed ::Algebra::GroupGraphPattern to use join_bnode_streams in cases where the bloom filter wasn't automatically created but instead provided by the user." ;
asc:update "Fixed ::Model::RDFTrine::as_string use with Quads." ;
asc:update "Fixed argument list for RDF::Query::Algebra::Service::_names_for_node called from bloom function." ;
asc:update "Fixed bitrotted livejournal example script to work with new 2.000 API." ;
asc:update "Fixed bug in SQL compilation when restricting left-joins to specific node types (based on functions like isIRI)." ;
asc:update "Fixed bug in t/23-model_bridge.t to allow two models from the same model class to be used in testing." ;
asc:update "Fixed bug so ::Model::RDFTrine::meta may be called as a class method." ;
asc:update "Fixed bugs in RDF::Query and RDF::Query::Expression classes that insisted variables be RDF::Query objects (and not simply RDF::Trine objects)." ;
asc:update "Fixed error handling in t/plan.t." ;
asc:update "Fixed node identity computation based on owl:sameAs." ;
asc:update "Fixed propogation of iterator binding_names when pre-bound values are used in ::Algebra execution." ;
asc:update "Fixed RDF::Query::algebra_fixup to ignore service capabilities that would result in empty BGPs." ;
asc:update "Fixed RDF::Query::Algebra::Triple to correctly set binding_names when pre-binding is used." ;
asc:update "Fixed RDQL parser to qualify URIs before returning from parse()." ;
asc:update "Fixed SSE serialization bug in ::Algebra::Sort." ;
asc:update "Fixed SSE serialization of Aggregates using '*' instead of a variable as the column." ;
asc:update "Fixed t/costmodel-naive.t to provide a serialized query to ::Plan::Service constructor." ;
asc:update "Fixed test count in algebra-bgp.t." ;
asc:update "Fixed test in t/31-service.t that relied on identity-reasoning support in bloom filters (which is now off by default)." ;
asc:update "Fixed test plan for t/optimizer.t in cases where no appropriate model is available." ;
asc:update "Fixed use of pre-binding in execution of RDF::Trine optimized BasicGraphPatterns." ;
asc:update "Fixed use of RDFQUERY_NETWORK_TESTS in 31-service.t." ;
asc:update "Improved use of temporary RDF::Trine stores in RDF::Query tests." ;
asc:update "Logging code now uses sse serialization as log keys (because of expressions that can't be serialized as SPARQL)." ;
asc:update "Logging object can now be passed to RDF::Query constructor." ;
asc:update "Made SERVICE work again by rolling back streaming socket work (now commented out)." ;
asc:update "Marked tests TODO for federated query serialization." ;
asc:update "Modified code for aggregate queries (though they are currently broken)." ;
asc:update "Moved construction of bloom-filter-optimized patterns to RDF::Query::Algebra::GroupGraphPattern::_bloom_optimized_pattern()." ;
asc:update "Moved federation code to new RDF::Query::Federate class." ;
asc:update "Moved initial federated service code into RDF::Query::fixup and ::algebra_fixup." ;
asc:update "Moved QEP generation code to RDF::Query::query_plan so it can be overloaded." ;
asc:update "Moved RDF::Query::add_service() to RDF::Query::Federate::add_service()." ;
asc:update "Naive plan is used in ::Federate::Plan::generate_plans only if no optimistic plans are available." ;
asc:update "Parsing service descriptions now more forgiving in the face of missing values." ;
asc:update "Plan generation now includes any plans the model object can provide." ;
asc:update "RDF::Query now always uses a cost model (defaulting to ::Naive)." ;
asc:update "RDF::Query::Algebra::Triple::new now adds RDF::Query::Node::Variable objects for undefined nodes." ;
asc:update "RDF::Query::Federate now defaults to SPARQLP parser." ;
asc:update "RDF::Query::fixup() now only returns a construct pattern (the query pattern now being returned by RDF::Query::query_plan())." ;
asc:update "RDF::Query::Model::get_computed_statements now doesn't die if there's no query object present." ;
asc:update "RDF::Query::new() now accepts two-argument form with just $query and \\%options." ;
asc:update "RDF::Query::Node::Literal objects now can compare as equal when they're of numeric type but the lexical values aren't numeric." ;
asc:update "RDF::Query::prune_plans now takes ExecutionContext as an argument, and in turn calls ::Plan::prune_plans." ;
asc:update "RDF::Query::query_plan() now returns all possible query plans when called in list context." ;
asc:update "RDF::Query::query_plans now calls RDF::Query::prune_plans to select from the list of possible QEPs." ;
asc:update "RDF::Trine::Node::Resource now escapes unicode in base URIs (now just relative URI part) before calling URI->new_abs." ;
asc:update "Re-ordered conditionals so that the service-bloom-filter try block is called less frequently." ;
asc:update "Removed (now unused) parser generator script." ;
asc:update "Removed logging/warn calls from forked process in ::Service (was screwing up the parent-child IO pipe)." ;
asc:update "Removed now unused RDF::Query::construct() and RDF::Query::fixup()." ;
asc:update "Removed old execute() code from ::Algebra classes." ;
asc:update "Removed unused redland fallback code from RDF::Query::Model::RDFTrine." ;
asc:update "Removed use of \"DISTINCT\" queries in SERVICE calls (for pipelining)." ;
asc:update "Removed what looks like an accidentally pasted test in t/plan.t." ;
asc:update "SERVICE execution now uses non-identity reasoning Bloom filter function." ;
asc:update "SERVICE tests involving bloom filter handling marked as TODO." ;
asc:update "ServiceDescription now only runs sofilter if ?subject/?object are bound." ;
asc:update "ServiceDescription parsing now gets entire sparql:patterns and not just arcs to depth one." ;
asc:update "Silenced unfinished test debugging in t/logging.t." ;
asc:update "SPARQL parser now always adds a ::Algebra::Project (even when the query selects '*')." ;
asc:update "SPARQL parser now constructs ::Algebra::Project objects (had been in RDF::Query::execute)." ;
asc:update "SPARQL parser now creates ::Algebra::Construct objects for CONSTRUCT queries." ;
asc:update "SPARQL parser now puts ::Distinct above ::Sort algebras in the parse tree." ;
asc:update "SPARQLP parser now creates ::Project object as parent of any ::Aggregate." ;
asc:update "Split RDF::Query::execute into prepare() and execute_plan() methods." ;
asc:update "Started work on a more holistic approach to supporting service descriptions (instead of using add_computed_statement_generator())." ;
asc:update "Turtle parser now doesn't modify the lexical value of numeric typed literals." ;
asc:update "Turtle parser now makes universal IDs for all blank node (even those with given IDs like _:xyz)." ;
asc:update "Updated ::Algebra SSE serializations to conform to Jena's serialization syntax." ;
asc:update "Updated ::Algebra::Limit::sse to emit 'slice' serialization if its child is a ::Algebra::Offset." ;
asc:update "Updated ::Algebra::Service to fork and use LWP's callback mechanism for concurrency." ;
asc:update "Updated ::Compiler::SQL to recognize ::Algebra::Project objects." ;
asc:update "Updated args to roqet call in failing_earl_tests.sh." ;
asc:update "Updated as_sparql() methods to support the new ::Construct classes." ;
asc:update "Updated bin/parse.pl to emit the SSE serialization of the query algebra tree." ;
asc:update "Updated bin/rdf_parse_turtle.pl to warn on any parser error." ;
asc:update "Updated cost model code to work with ::Plan classes instead of ::Algebra classes." ;
asc:update "Updated costmodel and logging test expected results that changed due to changes to ::Plan::Join code." ;
asc:update "Updated dawg-eval.t regex to recognize RDFTrine blank nodes." ;
asc:update "Updated DBPedia test query in t/34-servicedescription.t to reflect new source data." ;
asc:update "Updated expected cardinalities in t/logging.t for current plan choice." ;
asc:update "Updated logging of algebra execution to use SPARQL serialization as logging key." ;
asc:update "Updated logging tests to use the new sparql serialization keys." ;
asc:update "Updated plan generation code to use ::BGPOptimizer when the model supports node_counts." ;
asc:update "Updated RDF::Query to require version 0.108 of RDF::Trine." ;
asc:update "Updated RDF::Query::sse to emit base and prefix serializations." ;
asc:update "Updated SERVICE test in t/plan.t (still broken, but only runs when dev env var RDFQUERY_NETWORK_TESTS in effect)." ;
asc:update "Updated SPARQL parser and serializer tests to always assume an ::Algebra::Project on SELECT queries." ;
asc:update "Updated SSE serialization of ::Join::PushDownNestedLoop to use 'bind-join' terminology." ;
asc:update "Updated t/plan.t to be less dependent on the specific state of the kasei.us service endpoint." ;
asc:update "Updated test service description RDF for new tests." ;
asc:update "Updates to improve logging and test coverage." ;
asc:update "Updates to RDF::Query::execute() to support explicit pre-binding lists (instead of just scalar values)." ;
asc:update "Updates to SPARQLP parser to support FeDeRate BINDINGS keyword." ;
asc:update "::Algebra::Distinct now does proper serialization in as_sparql()." ;
asc:update "::Algebra::GroupGraphPattern now throws an exception if passed unblessed values as patterns." ;
asc:update "::Algebra::Service now defers loading of content until the first result is requested." ;
asc:update "::Federate now labels nodes in the QEP tree with applicable services." ;
asc:update "::GroupGraphPattern::sse() updated to output the '(join ...)' only if the GGP has more than one pattern." ;
asc:update "::Model::debug() now shows data from the named graph model." ;
asc:update "::Model::RDFTrine now only produces BGP plans if there is no get_computed_statement_generators in the query object." ;
asc:update "::Model::RDFTrine::add_uri now decodes resulting content as utf8 before proceeding." ;
asc:update "::Model::RDFTrine::meta() probes the underlying store object to declare the proper 'store' class." ;
asc:update "::Service::_names_for_node updated to use ::Plan classes for query execution (fixes use of the k:bloom filter)." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.002" ;
doap:created "2008-04-25" ;
];
asc:changes [
asc:update "Updated Bloom::Filter required version in RDF-Query's Makefile.PL." ;
asc:update "Fixed bug in get_function() when called as a class method." ;
asc:update "Updated sparql:logical-* functions to accept more than two operands." ;
asc:addition "Added code to make loading of Bloom::Filter optional." ;
asc:addition "Added Bloom::Filter to list of recommended modules." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.001" ;
doap:created "2008-04-19" ;
];
asc:changes [
asc:addition "Added test for using AS syntax for variable renaming: \"(?var AS ?newvar)\"." ;
asc:addition "Added support for MIN, MAX, COUNT and COUNT-DISTINCT aggregate operators to the SPARQLP parser." ;
asc:addition "Added COUNT DISTINCT variant aggregate operator." ;
asc:addition "Added as_sparql submethod to RDF::Query::Node::Literal to serialize numeric types unquoted." ;
asc:addition "Added var_or_expr_value method in RDF::Query." ;
asc:addition "Added serialization tests for aggregate and union patterns." ;
asc:addition "Added support for GROUP BY clauses to aggregation queries." ;
asc:addition "Added methods to RDF::Query for retrieving lists of supported SPARQL extensions and extension functions." ;
asc:addition "Added ::Algebra::subpatterns_of_type method for retrieving all subpatterns of a particular type." ;
asc:addition "Added tests for select expressions." ;
asc:addition "Added initial support for selecting expression values." ;
asc:update "Fixed use of \"DESCRIBE \" (instead of \"DESCRIBE ?var\")." ;
asc:update "Fixed SPARQL serialization of queries with DISTINCT." ;
asc:update "Moved sort_rows() into new ::Algebra classes Sort, Limit, Offset and Distinct." ;
asc:update "Updated SQL compiler to handle new ::Algebra classes." ;
asc:update "Bumped required RDF::Trine version to 0.106." ;
asc:update "RDF::Trine pattern optimization now holds onto the original BGP object for forwarding of calls to as_sparql()." ;
asc:update "Removed use of Storable module. Query execution no longer clones parse tree before running." ;
asc:update "Simplified project operation on query stream in RDF::Query::execute()." ;
asc:update "fixup() method in ::Algebra and ::Expression now passed the query object as an argument." ;
asc:update "Replaced ::RDFTrine::unify_bgp with more general fixup() implementation." ;
asc:update "::Algebra classes now defer to the bridge during fixup() to allow model-specific optimizations." ;
asc:update "RDF::Trine::Iterator::smap now allows overriding default construct_args (e.g. binding names)." ;
asc:update "sparql:str now throws a TypeError if argument isn't bound." ;
asc:update "Fixed referenced_variables in RDF::Query::Expression." ;
asc:update "Fixed COUNT function to only count bound variables." ;
asc:update "Fixed aggregation to work with expressions." ;
asc:update "Removed now unused ::Algebra::OldFilter class." ;
asc:update "Moved as_sparql methods from RDF::Trine:: to RDF::Query:: classes." ;
asc:update "Removed context- (quad-) specific code from RDF::Query::Algebra::Triple." ;
asc:update "Fixed serialization of BOUND filter functions." ;
asc:update "Fixed serialization of unary expressions." ;
asc:update "Fixed call to join_streams to use ::Iterator::Bindings instead of ::Iterator." ;
asc:update "var_or_expr_value now takes bridge object as an argument." ;
asc:update "var_or_expr_value will now accept any RDF::Query::Expression object as an argument." ;
asc:update "Aggregates (MIN, MAX, COUNT, COUNT-DISTINCT) now return xsd:decimal values (this shouldn't really happen for non-numeric operands to MIN and MAX...)" ;
asc:update "Removed unused _true and _false methods in RDF::Query." ;
asc:update "Fixed existing aggregates code and tests." ;
asc:update "Removed unused (and bitrotted) t/05-stress.t test." ;
asc:update "Made all tests that access the network opt-in with the RDFQUERY_NETWORK_TESTS environment variable." ;
asc:update "Updated POD for ::Expression::Alias." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "2.000" ;
doap:created "2008-03-19" ;
];
asc:changes [
asc:addition "RDF::Query now uses RDF::Trine package for common classes (nodes, statements, iterators)." ;
asc:addition "Added support for RDF::Trine::Model." ;
asc:addition "RDF::Trine::Iterator can serialize to XML and JSON natively; Updated tests accordingly." ;
asc:addition "Added RDF::Query::pattern method to return the GGP algebra pattern for the query." ;
asc:addition "Added RDF::Query::as_sparql method to serialize query as SPARQL string." ;
asc:addition "Added POD to RDF::Query::Node classes." ;
asc:addition "Added equal method to RDF::Query::Node classes." ;
asc:addition "Added definite_variables method to RDF::Query::Algebra classes." ;
asc:addition "Added more (sparql and see) serialization tests." ;
asc:addition "Added as_native method to bridge superclass for converting ::Node objects to bridge-native objects." ;
asc:addition "Added support for SERVICE queries (ala ARQ) with Bloom filter semijoins." ;
asc:update "Moved RDF::Query::Stream into RDF::Trine::Iterator namespace." ;
asc:update "Reshuffled SPARQL parsers tests." ;
asc:update "rdf namespace is only added by default for RDQL." ;
asc:update "Fixed bug where the wrong bridge object would be returned for queries with FROM clauses." ;
asc:update "Moved query_more code to Algebra classes." ;
asc:update "Removed unused RDF::Query::set_named_graph_query method." ;
asc:update "Fixed bug where triples from a FROM clause were loaded into the underlying persistent store." ;
asc:update "RDF::Query::Node::Blank constructor now optionally produces identifiers." ;
asc:update "Merged tSPARQL parsing code into new SPARQLP parser." ;
asc:update "Triple class now serializes rdf:type shortcut 'a' appropriately." ;
asc:update "Removed 'VAR' type from ::Node::Variable object structure." ;
asc:update "Updated code to always expect a HASH reference from ::Bindings iterator." ;
asc:update "Removed old fixup code, replaced by ::Algebra fixup methods." ;
asc:update "Moved FROM clause data loading to its own method." ;
asc:update "Started removing old code (RDF::Base, direct DBI use, AUTOLOAD, profiling)." ;
asc:update "Moved general count_statements() method into bridge superclass." ;
asc:update "Fixed SQL compiler to work with ::Algebra and ::Node classes." ;
asc:update "Updated document namespace declaration for SPARQL XML Results." ;
asc:update "Moved Expression classes out of the Algebra hierarchy and into their own space (RDF::Query::Expression)." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.501" ;
doap:created "2007-11-15" ;
];
asc:changes [
asc:addition "Added as_sparql methods to Algebra and Node classes to serialize patterns in SPARQL syntax." ;
asc:addition "Added deparse script." ;
asc:update "Fixed CONSTRUCT+OPTIONAL bug." ;
asc:update "Fixed jena:sha1sum tests when Digest::SHA1 isn't available." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.500" ;
doap:created "2007-11-13" ;
];
asc:changes [
asc:addition "Added new RDF::Query::Algebra:: classes that are used to represent query ASTs." ;
asc:addition "Added new RDF::Query::Node:: classes that are used to represent RDF Nodes and Variables." ;
asc:addition "Added RDF::Query::query_more_triple() and RDF::Query::query_more_bgp() for triple and bgp matching." ;
asc:addition "Added sgrep, smap, swatch and concat methods to RDF::Query::Stream class." ;
asc:addition "Added join_streams() to perform netsted-loop natural joins on two Stream objects." ;
asc:addition "Added call_function() method to abstract the generation of ['FUNCTION',...] blocks." ;
asc:addition "Added rudimentary profiling code (Devel::DProf seems to crash on RDF::Query)" ;
asc:addition "Added initial code for supporting property functions (using time:inside as an example)." ;
asc:update "URIs are now properly qualified with a BASE when present." ;
asc:update "Base URI passed to constructor is now used if no BASE clause exists in the query." ;
asc:update "Fixed BASE qualification when an IRI contains Unicode characters (Emulating IRI support with the URI module)." ;
asc:update "NAMED graph data is now seperated from the default model into new (temporary) models." ;
asc:update "NAMED graphs now work with RDF::Core." ;
asc:update "Major refactoring to RDF::Query::query_more() to enhance extensibility." ;
asc:update "Improved support of GGP pattern matching." ;
asc:update "Refactored query_more() variants and sort_rows() to use new stream methods sgrep, smap, and concat." ;
asc:update "Continued to fix bugs to more closely align with DAWG tests." ;
asc:update "Updated DAWG tests to run with the RDF::Core backend." ;
asc:update "Any DAWG tests with mf:requires are now automatically marked TODO." ;
asc:update "DAWG tests graph equality is now punted to user verification." ;
asc:update "Fixed bNode merging code in DAWG tests." ;
asc:update "query_more() variants and sort_rows() now all return RDF::Query::Stream objects." ;
asc:update "query_more() (and everything it calls) now expects bridge object as a method argument (to ensure NAMED graph querying works)." ;
asc:update "Parsers now generate ASTs using the Algebra and Node classes." ;
asc:update "FILTER operator != is now negative for unknown datatypes." ;
asc:update "Fixed exception handling in check_constraints()." ;
asc:update "Fixed type-promotion in arithmetic operations and added recognized xsd numeric types." ;
asc:update "API Chnage: extension functions now take a bridge object as their second argument (after the query object)." ;
asc:update "Fixed equals() method in RDF::Core bridge to properly use the RDF::Core API." ;
asc:update "Javascript function makeTerm now accepts language and datatype parameters." ;
asc:update "toString() javascript funtion now returns just the literal value (not including language or datatype)." ;
asc:update "sop:str now will stringify blank nodes properly." ;
asc:update "sparql:langmatches now properly differentiates between no language tag and an empty language tag." ;
asc:update "Fixed bugs in SPARQL tokenizer for some Unicode strings (with combining accents)." ;
asc:update "RDF::Query::Parser::new_literal() now canonicalizes language tags (to lowercase)." ;
asc:update "Fixed GGP verification in RDF::Query::Parser::SPARQL::fixup()." ;
asc:update "Merged GGPAtom changes from tSPARQL to SPARQL grammar." ;
asc:update "Fixed bug in RDF::Query::Model::RDFCore::equals() when comparing two blank nodes." ;
asc:update "Changed RDF::Query::Model::RDFCore::as_string to return strings where node type is identifiable (like Redland, URIs as [...], literal \"...\", bnodes (...))." ;
asc:update "Model methods literal_value, literal_datatype and literal_value_langauge now return undef if argument isn't a literal." ;
asc:update "Model methods uri_value and blank_identifier now return undef unless argument is of correct type." ;
asc:update "Model add_string methods now normalize Unicode input." ;
asc:update "Blank node prefix is now scoped to bridge, not lexically in RDF::Query::Model::RDFCore." ;
asc:update "RDF::Query::Model::Redland::new_literal now forces argument to a string (XS code breaks on non-PVOK scalars)." ;
asc:update "RDF::Query::Model::Redland::add_uri now uses LWP instead of relying on Redland to fetch content." ;
asc:update "Redland model class now recognizes DateTime objects as literals." ;
asc:update "Updated add_uri() method in RDF::Core bridge to support named graphs (only one name per model for now)." ;
asc:update "RDF::Query::Stream constructor now accepts an ARRAY reference." ;
asc:update "Stopped using the peephole optimizers. Will replace with an algebra-based optimizer in the future." ;
asc:update "Removed code for MULTI patterns. Will replace with algebra-based optimization in the future." ;
asc:update "Removed multi_get code." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.044" ;
doap:created "2007-09-13" ;
];
asc:changes [
asc:addition "DAWG tests now emit EARL reports." ;
asc:addition "Added test harness and temporal data importing scripts to new bin/ directory." ;
asc:addition "Added support for temporal queries in RDF::Query and optimizers." ;
asc:addition "Added support for CONSTRUCT queries in new YAPP-based SPARQL parsers." ;
asc:addition "Added TIMED graph tests for new SPARQL temporal extensions." ;
asc:addition "Added tests to SPARQL parser for bugs that were discovered with temporal extensions." ;
asc:addition "Added POD to new SPARQL parsers." ;
asc:addition "Added new Parse::Yapp-based SPARQL parser in preparation for temporal SPARQL extensions." ;
asc:addition "Added stub functions for temporal extension support." ;
asc:addition "Added model_as_stream() method to Redland bridge class." ;
asc:addition "Addded debug() method to RDF::Query::Model." ;
asc:addition "Added UNION tests." ;
asc:addition "Added a javascript debugging flag to RDF::Query." ;
asc:addition "Added RDF::Query::groupgraphpattern() for handling GGPs." ;
asc:addition "Added xsd:integer casting function." ;
asc:addition "Added as a FILTER tee that warns to STDERR." ;
asc:addition "Added Eyapp SPARQL grammer file and replaced parser with auto-generated code from eyapp." ;
asc:update "Marked some SPARQL parser tests as TODO (due to incompatability with new YAPP-based parser)." ;
asc:update "Network tests are now run against all available models." ;
asc:update "Stream tests are now run against all available models." ;
asc:update "Query parser initialization code cleaned up (and now supports beta tSPARQL parser)." ;
asc:update "net_filter_function() now properly accesses nodes with bridge methods." ;
asc:update "RDF::Query::Parser::new_blank now assigns default names if none is supplied." ;
asc:update "Updated error messages in SPARQL parser to align with new YAPP-based parser." ;
asc:update "SPARQL parse_predicate_object() fixed to support tripleNodes." ;
asc:update "SPARQL parse_object() and parse_predicate() fixed for whitespace insensitivity." ;
asc:update "Moved old hand-written SPARQL parser to now unused SPARQL-RD.pm." ;
asc:update "Moved new YAPP-based SPARQL parser to SPARQL.pm." ;
asc:update "Copied YAPP-based SPARQL parser for new temporal extension tSPARQL.pm." ;
asc:update "Moved existing tests for hand-written SPARQL parser to 01-sparql_parser.t.rd-old." ;
asc:update "Moved new YAPP-based SPARQL tests to t/01-sparql_parser.t." ;
asc:update "Removed bad-syntax queries from optimizer and SQL compiler tests." ;
asc:update "Fixed bad-syntax queries in stream and hook tests." ;
asc:update "Made output of coverage tests easier to read by adding test names." ;
asc:update "Fixed SPARQL parsers to allow keywords as variable names." ;
asc:update "Fixed SPARQL parsers to allow dashes and underscores in variable names." ;
asc:update "Fixed bad parser constructor call in SQL compiler tests." ;
asc:update "Suppressed RDF::Base loading (again) during RDF::Query startup." ;
asc:update "RDF::Query::Model::Redland::debug now shows contexts during iterator debugging." ;
asc:update "Moved the old (hand written) SPARQL parser out of the way to make test harnesses happy." ;
asc:update "SPARQL parser now respects spec regarding the reuse of blank node labels across BGPs." ;
asc:update "SPARQL parser now does the right thing with NIL (the empty list)." ;
asc:update "SPARQL parser now handles embedded GGPs correctly." ;
asc:update "Updated SPARQL parser and tests to pass (almost all) DAWG tests." ;
asc:update "Fixed bug where results couldn't be sorted by a non-selected variable." ;
asc:update "Removed the unused RDF::Query::timed_graph() method." ;
asc:update "RDF::Query::qualify_uri is now more liberal in what it accepts." ;
asc:update "Fixed xsd:boolean casting of integer values." ;
asc:update "RDF::Query::Parser::new_variable can now generate private variable names." ;
asc:update "Fixed test suite to work properly on systems without Redland." ;
asc:update "Disabled loading of tSPARQL parser for release." ;
asc:update "Removed function prototype definitions in Model base class (was causing loading problems when models are missing)." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.043" ;
doap:created "2007-06-14" ;
];
asc:changes [
asc:update "Fixed broken MANIFEST causing MakeMaker code to break." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.042" ;
doap:created "2007-06-13" ;
];
asc:changes [
asc:addition "Added support for Javascript URL-based extension functions." ;
asc:addition "Added GPG signing support for Javascript functions." ;
asc:addition "Added meta methods to model classes." ;
asc:addition "Added count_statements methods to model classes." ;
asc:addition "Added default format for stringifying query result streams." ;
asc:addition "Added SPARQL syntax coverage tests." ;
asc:addition "Added stream tests." ;
asc:update "ISIRI() now returns a sop:isIRI function IRI." ;
asc:update "Redland bridge add_uri strips off URI fragment from parser base URI." ;
asc:update "Underlying models aren't loaded if turned off by environment variables." ;
asc:update "Stopped using the (currently broken) multi-get code." ;
asc:update "Model classes aren't used if turned off by environment variable." ;
asc:update "Standardized node testing to is_node (replacing older isa_node)." ;
asc:update "GPG verification failure now throws exceptions." ;
asc:update "GPG fingerprint handling is now whitespace insensitive." ;
asc:update "Removed (currently) unused multiget tests." ;
asc:update "Redland bridge uri_value returns undef if not called with a node." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.041" ;
doap:created "2006-11-26" ;
];
asc:changes [
asc:addition "Added tests for model bridge classes." ;
asc:addition "Added partial support for new RDF::Storage::DBI storage class." ;
asc:addition "Added tests for backend bridge classes (RDF::Query::Model::*)." ;
asc:addition "Added checks for which backends support XML serialization." ;
asc:addition "Added RDF::Base support." ;
asc:addition "Added SimpleQueryPatternError exception class for future work on multi-get optimizations." ;
asc:addition "Removed unwanted '+' signs on stringified bigints when running under perl 5.6.x." ;
asc:update "Fixed unicode errors when running under perl 5.6.x." ;
asc:update "Skips tests that rely on stable sorting when running under perl 5.6.x." ;
asc:update "Fixed bugs in SQL bridge class." ;
asc:update "RDFCore and Redland bridge classes now throw error when passed a bad model object." ;
asc:update "Bridge class support() method now responds to feature requests for 'temp_model'." ;
asc:update "Fixed bug in RDF::Query::Model::RDFCore::isa_resource returning true for blank nodes." ;
asc:update "Fixed code in RDF::Query::Model::::SQL::equals()." ;
asc:update "Added support for RDF::Query:::Model::SQL models in RDF::Query bridge code." ;
asc:update "Removed RDF::Query::Model::SQL::* code that's now in RDF::Storage::DBI." ;
asc:update "Fixed naive peephole tests in cases where model supports cost-based analysis." ;
asc:update "Fixed bugs in tests that were relying on C to act like C." ;
asc:update "Fixed bug in C that prevented running queries against multiple models." ;
asc:update "Removed forced dependence on Digest::SHA1." ;
asc:update "Makefile.PL now recommends Digest::SHA1 (for jena function) and Geo::Distance (for 07-filters.t)." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.040" ;
doap:created "2006-07-21" ;
];
asc:changes [
asc:addition "Added support for BOUND() fiters in SQL compilation." ;
asc:addition "Added peephole optimizer code with naive and cost-analysis strategies." ;
asc:addition "Added add_string method to RDF::Query::Model::Redland." ;
asc:addition "Added node_count method to RDF::Query::Model::Redland (only used for testing at this point)." ;
asc:update "RDF::Query::execute() now uses the peephole optimizer." ;
asc:update "SQL compiler now produces valid SQL when query variable names are SQL reserved keywords." ;
asc:update "Moved SPARQL parser test data into YAML." ;
asc:update "Added YAML as a build-time prerequisite." ;
asc:update "Fixed SPARQL parsing bug for blank nodes as statement objects." ;
asc:update "Removed punting code in RDF::Query::execute that tried to do JIT optimization." ;
asc:update "Removed calls to getLabel() on model objects in test files." ;
asc:update "Fixed dawg tests (was dying because of multiple plans being printed)." ;
asc:update "Fixed cost-based peephole optimizer tests (by forcing Redland to do node counting)." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.039" ;
doap:created "2006-07-14" ;
];
asc:changes [
asc:update "Removed dawg tests from distribution. Only used as developer tests now." ;
asc:update "Updated package to use Module::Install instead of ExtUtils::MakeMaker." ;
asc:update "Fixed a spurious uninitialized warning in RDF::Query::get_bridge." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.038" ;
doap:created "2006-07-09" ;
];
asc:changes [
asc:update "Fixed DBI case-sensitivity for PostgreSQL support." ;
asc:update "Cleaned up SQL syntax for easier debugging." ;
asc:update "Removed extra parens in SQL that were causing postgresql to break." ;
asc:update "Reference test foaf file using File::Spec->catfile() instead of directly." ;
asc:update "Fixed SPARQL parsing bug for anonymous nodes in FILTER expressions." ;
asc:update "Fixed major SQL compilation bugs for testing equality in FILTER expressions." ;
asc:update "Fixed bug in hashing code for blank nodes in SQL compiler." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.037" ;
doap:created "2006-07-06" ;
];
asc:changes [
asc:addition "execute() method now takes optional 'bind' parameter for pre-binding query variables." ;
asc:update "Updated code to support basic FILTERs in SQL compilation." ;
asc:update "Fixed bug in SQL compilation where no WHERE clause was needed." ;
asc:update "Fixed bug in SQL compilation when using model-specific Statements tables." ;
asc:update "Added Storable to the list of required modules (was missing in the list)." ;
asc:update "Fixed typos in metadata about past versions in DOAP Changes.ttl." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.036" ;
doap:created "2006-06-26" ;
];
asc:changes [
asc:addition "Initial support for OPTIONALs in SQL compiler." ;
asc:addition "Added support for class variable to hold parsing errors. (Beware under threads.)" ;
asc:addition "Added model API methods to SQL model class." ;
asc:addition "Added C method to RDF::Query::Stream." ;
asc:update "Fixed memory leak in RDF::Query::Stream that resulted in too many database handles." ;
asc:update "Removed LWP requirement for systems without libwww." ;
asc:update "RDF::Query now sets error variable upon parsing error. (Access with C.)" ;
asc:update "Fixed POD errors, and added tests for POD coverage." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.035" ;
doap:created "2006-06-04" ;
];
asc:changes [
asc:addition "Added DAWG tests and harness." ;
asc:addition "Added custom functions: jena:sha1sum, jena:now, jena:langeq, jena:listMember, ldodds:Distance" ;
asc:addition "Added new model methods: equals, subject, predicate, object." ;
asc:update "Rewrote core logic in OPTIONAL handling code." ;
asc:update "Comparisons on literals now respect numeric datatypes." ;
asc:update "Fixed outdated calling conventions in casting functions." ;
asc:update "Relocated external http-based test data to .Mac URLs." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.034" ;
doap:created "2006-05-01" ;
];
asc:changes [
asc:addition "Added JSON serialization for bindings and boolean queries." ;
asc:addition "Initial support for compiling RDF queries to SQL queries using the Redland schema." ;
asc:addition "Added to_string method to query results Stream class." ;
asc:update "Model objects now store the query parse tree for access to data needed in serialization." ;
asc:update "Unquoted number and boolean literals in SPARQL are now datatyped appropriately." ;
asc:update "Fixed crashing bug when RDF::Query::Model::Redland::as_string was called with an undefined value." ;
asc:update "Fixed bug parsing queries with predicate starting with 'a' (confused with { ?subj a ?type})." ;
asc:update "Fixed bug parsing queries whose triple pattern ended with the optional dot." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.033" ;
doap:created "2006-03-08" ;
];
asc:changes [
asc:update "Updated test suite to work if one of the model classes is missing." ;
asc:update "Data-typed literals are now cast appropriately when used in a FILTER." ;
asc:addition "Added support for xsd:dateTime datatypes using the DateTime module." ;
asc:addition "Added support for LANG(), LANGMATCHES() and DATATYPE() built-in functions." ;
asc:update "Updated TODO list." ;
asc:addition "Added more exception types to RDF::Query::Error." ;
asc:addition "Added POD coverage." ;
asc:update "Fixed SPARQL parsing bug for logical operators <= and >=." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.032" ;
doap:created "2006-03-03" ;
];
asc:changes [
asc:update "Replaced the Parse::RecDescent SPARQL parser with a much faster hand-written one." ;
asc:update "Updated SPARQL parsing rules to be better about URI and QName character sets." ;
asc:update "FILTER equality operator now '=', not '==' (to match SPARQL spec)." ;
asc:update "Initial support for FILTER constraints as part of the triple pattern structure (Will allow for nested FILTERs)." ;
asc:addition "Implemented support for ordering query results by an expression." ;
asc:update "Fixed bug in expresion handling of unary minus." ;
asc:update "Fixed bug in Redland NAMED GRAPH parsing." ;
asc:update "Fixed bug in RDF::Core parsing code where blank nodes would be accidentally smushed." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.031" ;
doap:created "2006-02-08" ;
];
asc:changes [
asc:addition "Added support for NAMED graphs." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.030" ;
doap:created "2006-01-13" ;
];
asc:changes [
asc:addition "Added support for SELECT * in SPARQL queries." ;
asc:addition "Added support for default namespaces in SPARQL queries." ;
asc:addition "Added tests for querying RDF collections in SPARQL (1 ?x 3)" ;
asc:addition "Added tests for triple patterns of the form { ?a ?a ?b . }" ;
asc:addition "Added tests for default namespaces in SPARQL." ;
asc:addition "Added tests for SELECT * SPARQL queries." ;
asc:update "Bugfix where one of two identical triple variables would be ignored ({ ?a ?a ?b })." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.028" ;
doap:created "2005-11-18" ;
];
asc:changes [
asc:addition "Added SPARQL functions: BOUND, isURI, isBLANK, isLITERAL." ;
asc:addition "Added SPARQL RDF Collections syntactic forms." ;
asc:addition "Added binding_value_by_name method to Query results stream class." ;
asc:addition "Added isa_blank methods to RDF::Redland and RDF::Core model classes." ;
asc:addition "Added directives to SPARQL grammar." ;
asc:addition "Updated SPARQL REGEX syntax." ;
asc:update "Updated SPARQL FILTER syntax." ;
asc:update "Fixed FILTER support in OPTIONAL queries." ;
asc:update "Fixed RDF literal datatyping when using Redland versions >= 1.00_02." ;
asc:update "Updated SPARQL grammar to make 'WHERE' token optional." ;
asc:update "Updated SPARQL 'ORDER BY' syntax to use parenthesis." ;
asc:update "Fixed SPARQL FILTER logical-and support for more than two operands." ;
asc:update "Fixed SPARQL FILTER equality operator syntax to use '=' instead of '=='." ;
asc:update "Now requires Test::More 0.52 because of changes to is_deeply()." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.027" ;
doap:created "2005-07-28" ;
];
asc:changes [
asc:addition "Added binding_value_by_name() method to query result streams." ;
asc:update "ORDER BY arguments now use parenthesis (SPARQL Draft 2005.07.21)." ;
asc:update "SPARQL parser now supports ORDER BY operands: variable, expression, or function call (SPARQL Draft 2005.07.21)." ;
] .
dcterms:isVersionOf ;
dcterms:replaces ;
doap:Version [
doap:revision "1.026" ;
doap:created "2005-06-05" ;
];
asc:changes [
asc:addition "Added new DBI model bridge (accesses Redland's mysql storage directly)." ;
asc:addition "Added built-in SPARQL functions and operators (not connected to grammar yet)." ;
asc:addition "Added bridge methods for accessing typed literal information." ;
] .
a doap:Project ;
doap:download-page ;
doap:download-mirror .
RDF-Query-2.919/examples/ 000755 000765 000024 00000000000 14632643202 015163 5 ustar 00greg staff 000000 000000 RDF-Query-2.919/META.yml 000644 000765 000024 00000002321 14632643176 014626 0 ustar 00greg staff 000000 000000 ---
abstract: 'A complete SPARQL 1.1 Query and Update implementation for use with RDF::Trine.'
author:
- 'Gregory Todd Williams '
- 'Gregory Todd Williams '
build_requires:
ExtUtils::MakeMaker: 6.36
FindBin: 0
Test::Exception: 0
Test::JSON: 0
Test::More: 0.88
YAML: 0
configure_requires:
ExtUtils::MakeMaker: 6.36
distribution_type: module
dynamic_config: 1
generated_by: 'Module::Install version 1.19'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: RDF-Query
no_index:
directory:
- examples
- inc
- t
- xt
recommends:
Geo::Distance: 0.09
Getopt::Simple: 0
LWP::Simple: 0
requires:
Data::UUID: 0
DateTime::Format::W3CDTF: 0
Digest::SHA: 0
Error: 0
File::Spec: 0
File::Temp: 0
I18N::LangTags: 0
JSON: 2
Module::Pluggable: 0
Parse::RecDescent: 0
RDF::Trine: 1.004
Scalar::Util: 0
Set::Scalar: 0
URI: 1.52
resources:
IRC: irc://irc.perl.org/#perlrdf
bugtracker: https://github.com/kasei/perlrdf/issues
homepage: https://metacpan.org/release/RDF-Query/
license: http://dev.perl.org/licenses/
repository: https://github.com/kasei/perlrdf/
version: '2.919'
RDF-Query-2.919/lib/ 000755 000765 000024 00000000000 14632643202 014113 5 ustar 00greg staff 000000 000000 RDF-Query-2.919/PaxHeader/Makefile.PL 000644 000765 000024 00000000225 13767746424 017311 x ustar 00greg staff 000000 000000 30 mtime=1608502548.348517812
64 LIBARCHIVE.xattr.com.apple.TextEncoding=VVRGLTg7MTM0MjE3OTg0
55 SCHILY.xattr.com.apple.TextEncoding=UTF-8;134217984
RDF-Query-2.919/Makefile.PL 000644 000765 000024 00000002373 13767746424 015346 0 ustar 00greg staff 000000 000000 use strict;
use warnings;
use inc::Module::Install;
name 'RDF-Query';
all_from 'lib/RDF/Query.pm';
author 'Gregory Todd Williams ';
license 'perl';
recommends 'LWP::Simple' => 0;
recommends 'Getopt::Simple' => 0;
recommends 'Geo::Distance' => 0.09;
build_requires 'Test::JSON' => 0;
build_requires 'Test::More' => 0.88;
build_requires 'Test::Exception' => 0;
build_requires 'YAML' => 0;
build_requires 'FindBin' => 0;
requires 'Module::Pluggable' => 0;
requires 'Data::UUID' => 0;
requires 'Digest::SHA' => 0;
requires 'DateTime::Format::W3CDTF' => 0;
requires 'Error' => 0;
requires 'File::Spec' => 0;
requires 'File::Temp' => 0;
requires 'JSON' => 2;
requires 'Parse::RecDescent' => 0;
requires 'RDF::Trine' => 1.004;
requires 'Scalar::Util' => 0;
requires 'Set::Scalar' => 0;
requires 'URI' => 1.52;
requires 'I18N::LangTags' => 0;
resources(
'homepage' => "https://metacpan.org/release/RDF-Query/",
'repository' => "https://github.com/kasei/perlrdf/",
'bugtracker' => "https://github.com/kasei/perlrdf/issues",
'IRC' => "irc://irc.perl.org/#perlrdf",
);
author_tests('xt');
install_script 'bin/rqsh';
sign;
WriteAll;
RDF-Query-2.919/data/ 000755 000765 000024 00000000000 14632643202 014256 5 ustar 00greg staff 000000 000000 RDF-Query-2.919/doap.rdf 000644 000765 000024 00000004716 12372327747 015011 0 ustar 00greg staff 000000 000000
Gregory Todd Williamsf80a0f19d2a0897b89f48647b2fb5ca1f0bc1cb8RDF::QueryRDF::Query RDF Query Engine.2004-07-05An RDF query implementation of SPARQL/RDQL in Perl for use with RDF::Trine.Gregory Todd Williamsf80a0f19d2a0897b89f48647b2fb5ca1f0bc1cb8stable2012-01-312.908Perl
RDF-Query-2.919/data/service.ttl 000644 000765 000024 00000005203 11707542733 016452 0 ustar 00greg staff 000000 000000 @prefix rdfs: .
@prefix rdf: .
@prefix xsd: .
@prefix sd: .
@prefix foaf: .
@prefix sparql: .
@prefix p: .
# definition of an endpoint
[] a sd:Service ;
rdfs:label "DBpedia" ;
rdfs:comment "Service for DBpedia data" ;
# the endpoint url
sd:url ;
# capabilities of the endpoint
sd:capability [
# the endpoint stores triples with predicate rdf:type
sd:predicate rdf:type ;
# Restriction on the subject/object
# Every legal SPARQL filter expression is allowed.
# only queries for the type http://xmlns.com/foaf/0.1/Person
# are allowed
sd:sofilter "REGEX(STR(?object),'http://xmlns.com/foaf/0.1/Person')" ;
# could also use ?subject
# statistical information
# number of triples that will be returned by
# a "?s a foaf:Person ; ?p ?o" query
sd:triples 3683409 ;
# other propeties are:
# Selectivity of a triple pattern, when object/subject is bound
# sd:objectSelectivity (default=1)
# sd:subjectSelectivity (default=1/x,
# where x is the value given by sd:triples)
];
sd:capability [
# the endpoint stores triples with predicate foaf:name
sd:predicate foaf:name ;
# no filter on subject or object
sd:sofilter "" ;
# statistical information
# there are 18000 triples with predicate foaf:name
sd:triples 18000 ;
# if the object in the triple pattern is bound
# (e.g. ?s foaf:name 'Bastian Quilitz") the result size will be
# reduced by factor 0.02. (on average)
sd:objectSelectivity "0.02"^^xsd:double ;
] ;
sd:capability [
sd:predicate foaf:mbox ;
sd:sofilter "" ;
sd:triples 18000 ;
sd:objectSelectivity 5.5E-5
] ;
sd:capability [ sd:predicate ] ;
sd:capability [ a sparql:any_triple ] ;
# whether the service is definitive or not
# sd:isDefinitive (default=false)
sd:isDefinitive "true"^^xsd:boolean ;
# limitations on access patterns
# the query for this service must either contain a triple pattern
# with predicate foaf:name and a bound object or
# a pattern with predicate foaf:mbox and a bound object.
# not shown here: sd:subjectBinding -> subject must be bound
sd:requiredBindings [ sd:objectBinding foaf:name ] ;
sd:requiredBindings [ sd:objectBinding foaf:mbox ] ;
# total number of triples in the store
sd:totalTriples 58787090 ;
sparql:pattern [ a foaf:Person ; p:name [] ; foaf:name [] ; p:field [] ; p:wordnet_type [] ] ;
.
RDF-Query-2.919/data/greenwich.rdf 000644 000765 000024 00000001374 11707542733 016742 0 ustar 00greg staff 000000 000000
51.4772220.000000Royal Observatory Greenwich
RDF-Query-2.919/data/named_graphs/ 000755 000765 000024 00000000000 14632643202 016706 5 ustar 00greg staff 000000 000000 RDF-Query-2.919/data/foaf.xrdf 000644 000765 000024 00000010577 11707542733 016077 0 ustar 00greg staff 000000 000000
FOAF Description for Gregory WilliamsFriend of a Friend (FOAF) description, containing personal metadata for Gregory WilliamsSat, 4 Oct 2003 20:02:22 PDT-0700Gregory Todd WilliamsGregoryWilliamskaseif80a0f19d2a0897b89f48647b2fb5ca1f0bc1cb8samofoolGary PGaryPtylix2057969209f1dfdad832de387cf13e6ff8c93b12Lauren BLaurenBf272c39785d651d0776093f3d28aadfd0719e787Liz FElizabethFf8677979059b73385c9d14cadf7d1e3652b205a8123typeThe subject is an instance of a class.
RDF-Query-2.919/data/federation_data/ 000755 000765 000024 00000000000 14632643202 017367 5 ustar 00greg staff 000000 000000 RDF-Query-2.919/data/Flower-2.rdf 000644 000765 000024 00000011277 11707542733 016367 0 ustar 00greg staff 000000 000000
reproductive organ of angiosperm plants especially one having showy or colorful partsreproductive organ of angiosperm plants especially one having showy or colorful partsa diminutive flower (especially one that is part of a composite flower)a diminutive flower (especially one that is part of a composite flower)flower having no petalsflower having no petalsthe flowering part of a plant or arrangement of flowers on a stalkthe flowering part of a plant or arrangement of flowers on a stalksmall flower with a flat strap-shaped corolla usually occupying the peripheral rings of a composite flowersmall flower with a flat strap-shaped corolla usually occupying the peripheral rings of a composite flowersmall flower with a flat strap-shaped corolla usually occupying the peripheral rings of a composite flowersmall flower with a flat strap-shaped corolla usually occupying the peripheral rings of a composite flowera partially opened flowera partially opened flowerthe flower of a chrysanthemum plantthe flower of a chrysanthemum plant
RDF-Query-2.919/data/about.xrdf 000644 000765 000024 00000012551 11707542733 016270 0 ustar 00greg staff 000000 000000
52.972770Cliffs of Moher, Ireland-9.430733NIKON CORPORATIONGreg Williams11NIKON D701/5002004-09-06T15:19:20+01:0041.849756Providence, RI-71.392400NIKON CORPORATION19fc9d0234848371668cf10a1b71ac9bd4236806f3c455a88761f83ba243b2653e6042de71fdd14925c5f4f21afaedf113d92ac7c8591178ad9c03fa9d179d12b032b4689cf5dd1ffaf237c3e007c919f80a0f19d2a0897b89f48647b2fb5ca1f0bc1cb8The Samo FoolkaseiGregory Todd WilliamsGreg Williams4.5Nikon D701/602005-04-07T18:27:37-04:00NIKON CORPORATIONGreg Williams4.5Nikon D701/602005-04-07T18:27:50-04:00NIKON CORPORATIONGreg Williams4.5Nikon D701/802005-04-07T18:27:56-04:00
RDF-Query-2.919/data/temporal.rdf 000644 000765 000024 00000004536 11707542733 016615 0 ustar 00greg staff 000000 000000
1975-01-011999-12-31Alice2000-01-01Eve2000-01-012001-01-012000-01-012003-01-01
RDF-Query-2.919/data/t-sparql11-aggregates-1.rdf 000644 000765 000024 00000003327 11707542733 021141 0 ustar 00greg staff 000000 000000
9577
RDF-Query-2.919/data/service-kasei.ttl 000644 000765 000024 00000010246 11707542733 017547 0 ustar 00greg staff 000000 000000 @prefix rdfs: .
@prefix rdf: .
@prefix xsd: .
@prefix sd: .
@prefix foaf: .
@prefix saddle: .
@prefix sparql: .
@prefix geo: .
@prefix exif: .
@prefix dc: .
@prefix dcterms: .
# definition of an endpoint
[] a sd:Service ;
rdfs:label "SPARQL Endpoint for kasei.us" ;
foaf:maker [
a foaf:Person ;
foaf:name "Gregory Todd Williams" ;
foaf:mbox_sha1sum "f80a0f19d2a0897b89f48647b2fb5ca1f0bc1cb8" ;
rdfs:seeAlso
] ;
# the endpoint url
sd:url ;
sd:totalTriples 3846 ;
sd:isDefinitive false ;
saddle:humanInterface ;
saddle:queryLanguage [ saddle:spec ] ;
saddle:queryLanguage [ saddle:spec ] ;
saddle:resultFormat [
saddle:mediaType "application/sparql-results+xml";
saddle:spec
] ;
saddle:resultFormat [
saddle:mediaType "application/rdf+xml";
saddle:spec
] ;
saddle:resultFormat [
saddle:mediaType "application/sparql-results+json";
saddle:spec
] ;
sparql:extensionFunction ;
sparql:extensionFunction ;
sparql:extensionFunction ;
sparql:extensionFunction ;
sparql:extensionFunction ;
sparql:extensionFunction ;
sparql:extensionFunction ;
sparql:extensionFunction ;
sparql:extensionFunction ;
sparql:extensionFunction ;
sparql:extensionFunction ;
sparql:extensionFunction ;
sparql:extensionFunction ;
sparql:extensionFunction ;
sparql:extensionFunction ;
sparql:sparqlExtension ;
sparql:sparqlExtension ;
sparql:sparqlExtension ;
sparql:sparqlExtension ;
sparql:sparqlExtension ;
sparql:sparqlExtension ;
sparql:sparqlExtension ;
sparql:sparqlExtension ;
# capabilities of the endpoint
sd:capability [
# the endpoint stores triples with predicate rdf:type
sd:predicate rdf:type ;
# sd:triples 3683409 ;
];
sd:capability [ sd:predicate foaf:name ] ;
sd:capability [ sd:predicate foaf:mbox_sha1sum ] ;
sd:capability [ sd:predicate foaf:mbox ] ;
sd:capability [ sd:predicate foaf:depicts ] ;
sd:capability [ sd:predicate foaf:openid ] ;
sd:capability [ sd:predicate foaf:made ] ;
sd:capability [ sd:predicate ] ;
sd:capability [ sd:predicate ] ;
sd:capability [ sd:predicate ] ;
sparql:pattern [ a foaf:Person ; foaf:name [] ; foaf:mbox_sha1sum [] ; foaf:made [] ] ;
sparql:pattern [ a foaf:Image ; exif:exposureTime [] ; exif:fNumber [] ; dc:date [] ; foaf:maker [] ; dcterms:spatial [ geo:lat [] ; geo:long [] ] ] ;
.
RDF-Query-2.919/data/rdfa-test.xhtml 000644 000765 000024 00000000640 11707542733 017234 0 ustar 00greg staff 000000 000000
Test 0001
This photo was taken by Mark Birbeck.
RDF-Query-2.919/data/bnode-person.rdf 000644 000765 000024 00000001716 11707542733 017362 0 ustar 00greg staff 000000 000000
Adam Pisoni26fb6400147dcccfda59717ff861db9cb97ac5ecGregory Todd Williams
RDF-Query-2.919/data/federation_data/alice_bob.rdf 000644 000765 000024 00000001226 11707542733 021773 0 ustar 00greg staff 000000 000000
AliceBob
RDF-Query-2.919/data/federation_data/bob.rdf 000644 000765 000024 00000000627 12023154750 020630 0 ustar 00greg staff 000000 000000
Bob
RDF-Query-2.919/data/federation_data/alice.rdf 000644 000765 000024 00000000643 11707542733 021153 0 ustar 00greg staff 000000 000000
Alice
RDF-Query-2.919/data/named_graphs/repeats2.rdf 000644 000765 000024 00000000444 11707542733 021141 0 ustar 00greg staff 000000 000000
Label
RDF-Query-2.919/data/named_graphs/repeats1.rdf 000644 000765 000024 00000000371 11707542733 021137 0 ustar 00greg staff 000000 000000
RDF-Query-2.919/data/named_graphs/meta.ttl 000644 000765 000024 00000000333 11707542733 020367 0 ustar 00greg staff 000000 000000 @prefix foaf: .
@prefix dc: .
dc:title "Test data for Alice"; foaf:topic "Alice" .
dc:title "Test data for Bob"; foaf:topic "Bob" .
RDF-Query-2.919/data/named_graphs/alice.ttl 000644 000765 000024 00000000162 11707542733 020516 0 ustar 00greg staff 000000 000000 @prefix foaf: .
_:a foaf:name "Alice" .
_:a foaf:mbox .
RDF-Query-2.919/data/named_graphs/bob.ttl 000644 000765 000024 00000000165 10450423441 020172 0 ustar 00greg staff 000000 000000 @prefix foaf: .
_:a foaf:name "Bob" .
_:a foaf:mbox .
RDF-Query-2.919/data/named_graphs/bob.rdf 000644 000765 000024 00000000506 11707542733 020155 0 ustar 00greg staff 000000 000000
Bob
RDF-Query-2.919/data/named_graphs/alice.rdf 000644 000765 000024 00000000503 11707542733 020465 0 ustar 00greg staff 000000 000000
Alice
RDF-Query-2.919/data/named_graphs/meta.rdf 000644 000765 000024 00000001260 12023154750 020325 0 ustar 00greg staff 000000 000000
Test data for AliceAliceTest data for BobBob
RDF-Query-2.919/lib/RDF/ 000755 000765 000024 00000000000 14632643202 014526 5 ustar 00greg staff 000000 000000 RDF-Query-2.919/lib/RDF/PaxHeader/Query.pm 000644 000765 000024 00000000225 14607236311 020142 x ustar 00greg staff 000000 000000 30 mtime=1713192137.491942918
64 LIBARCHIVE.xattr.com.apple.TextEncoding=VVRGLTg7MTM0MjE3OTg0
55 SCHILY.xattr.com.apple.TextEncoding=UTF-8;134217984
RDF-Query-2.919/lib/RDF/Query.pm 000644 000765 000024 00000117040 14607236311 016175 0 ustar 00greg staff 000000 000000 # RDF::Query
# -----------------------------------------------------------------------------
=head1 NAME
RDF::Query - A complete SPARQL 1.1 Query and Update implementation for use with RDF::Trine.
=head1 VERSION
This document describes RDF::Query version 2.919.
=head1 SYNOPSIS
# SPARQL SELECT Query
my $query = RDF::Query->new( 'SELECT * WHERE ...' );
my $iterator = $query->execute( $model );
while (my $row = $iterator->next) {
# $row is a HASHref containing variable name -> RDF Term bindings
print $row->{ 'var' }->as_string;
}
# SPARQL CONSTRUCT/DESCRIBE Query
my $query = RDF::Query->new( 'CONSTRUCT { ... } WHERE ...' );
my $iterator = $query->execute( $model );
while (my $st = $iterator->next) {
# $st is a RDF::Trine::Statement object representing an RDF triple
print $st->as_string;
}
# SPARQL ASK Query
my $query = RDF::Query->new( 'ASK WHERE ...' );
my $iterator = $query->execute( $model );
my $bool = $iterator->get_boolean;
if ($bool) {
print "Yes!\n";
}
# RDQL Query
my $query = new RDF::Query ( $rdql, { lang => 'rdql' } );
my @rows = $query->execute( $model ); # in list context, returns all results
=head1 DESCRIPTION
RDF::Query allows SPARQL and RDQL queries to be run against an RDF model,
returning rows of matching results.
See L for more information on SPARQL.
See L for more
information on RDQL.
=head1 CHANGES IN VERSION 2.900
The 2.9xx versions of RDF::Query introduce some significant changes that will
lead to a stable 3.000 release supporting SPARQL 1.1. Version 2.902 introduces
the SPARQL 1.1 features up to date with the SPARQL 1.1 working drafts as of its
release date. Version 2.902 also is the first version to require use of
RDF::Trine for the underlying RDF store. This change means that RDF::Core is
no longer supported, and while Redland is still supported, its handling of
"contexts" (named graphs) means that existing RDF triples stored in Redland
without associated contexts will not be accessible from RDF::Query.
See L for more information on supported backend stores.
=head1 CHANGES IN VERSION 2.000
There are many changes in the code between the 1.x and 2.x releases. Most of
these changes will only affect queries that should have raised errors in the
first place (SPARQL parsing, queries that use undefined namespaces, etc.).
Beyond these changes, however, there are some significant API changes that will
affect all users:
=over 4
=item Use of RDF::Trine objects
All nodes and statements returned by RDF::Query are now RDF::Trine objects
(more specifically, RDF::Trine::Node and RDF::Trine::Statement objects). This
differes from RDF::Query 1.x where nodes and statements were of the same type
as the underlying model (Redland nodes from a Redland model and RDF::Core nodes
from an RDF::Core model).
In the past, it was possible to execute a query and not know what type of nodes
were going to be returned, leading to overly verbose code that required
examining all nodes and statements with the bridge object. This new API brings
consistency to both the execution model and client code, greatly simplifying
interaction with query results.
=item Binding Result Values
Binding result values returned by calling C<< $iterator->next >> are now HASH
references (instead of ARRAY references), keyed by variable name. Where prior
code might use this code (modulo model definition and namespace declarations):
my $sparql = 'SELECT ?name ?homepage WHERE { [ foaf:name ?name ; foaf:homepage ?homepage ] }';
my $query = RDF::Query->new( $sparql );
my $iterator = $query->execute( $model );
while (my $row = $iterator->()) {
my ($name, $homepage) = @$row;
# ...
}
New code using RDF::Query 2.000 and later should instead use:
my $sparql = 'SELECT ?name ?homepage WHERE { [ foaf:name ?name ; foaf:homepage ?homepage ] }';
my $query = RDF::Query->new( $sparql );
my $iterator = $query->execute( $model );
while (my $row = $iterator->next) {
my $name = $row->{ name };
my $homepage = $row->{ homepage };
# ...
}
(Also notice the new method calling syntax for retrieving rows.)
=back
=cut
package RDF::Query;
use strict;
use warnings;
no warnings 'redefine';
use Carp qw(carp croak confess);
use Data::Dumper;
use LWP::UserAgent;
use I18N::LangTags;
use List::Util qw(first);
use Scalar::Util qw(blessed reftype looks_like_number);
use DateTime::Format::W3CDTF;
use Log::Log4perl qw(:easy);
if (! Log::Log4perl::initialized()) {
Log::Log4perl->easy_init($ERROR);
}
no warnings 'numeric';
use RDF::Trine 1.004;
require RDF::Query::Functions; # (needs to happen at runtime because some of the functions rely on RDF::Query being fully loaded (to call add_hook(), for example))
# all the built-in functions including:
# datatype casting, language ops, logical ops,
# numeric ops, datetime ops, and node type testing
# also, custom functions including:
# jena:sha1sum, jena:now, jena:langeq, jena:listMember
# ldodds:Distance, kasei:warn
use RDF::Query::Expression;
use RDF::Query::Algebra;
use RDF::Query::Node qw(iri);
use RDF::Query::Parser::RDQL;
use RDF::Query::Parser::SPARQL;
use RDF::Query::Parser::SPARQL11;
use RDF::Query::Compiler::SQL;
use RDF::Query::Error qw(:try);
use RDF::Query::Plan;
######################################################################
our ($VERSION, $DEFAULT_PARSER);
BEGIN {
$VERSION = '2.919';
$DEFAULT_PARSER = 'sparql11';
}
######################################################################
=head1 METHODS
=over 4
=item C<< new ( $query, \%options ) >>
Returns a new RDF::Query object for the specified C<$query>.
The query language defaults to SPARQL 1.1, but may be set specifically
with the appropriate C<< %options >> value. Valid C<< %options >> are:
* lang
Specifies the query language. Acceptable values are 'sparql11', 'sparql', or 'rdql'.
* base_uri
Specifies the base URI used in parsing the query.
* update
A boolean value indicating whether update operations are allowed during query execution.
* load_data
A boolean value indicating whether URIs used in SPARQL FROM and FROM NAMED clauses
should be dereferenced and the resulting RDF content used to construct the dataset
against which the query is run.
=cut
sub new {
my $class = shift;
my $query = shift;
my ($base_uri, $languri, $lang, %options);
if (@_ and ref($_[0])) {
%options = %{ shift() };
$lang = delete $options{ lang };
$base_uri = $options{ base_uri } || $options{ base } ;
delete $options{ base_uri };
delete $options{ base };
} else {
($base_uri, $languri, $lang, %options) = @_;
}
$class->clear_error;
my $l = Log::Log4perl->get_logger("rdf.query");
no warnings 'uninitialized';
my %names = (
rdql => 'RDF::Query::Parser::RDQL',
sparql => 'RDF::Query::Parser::SPARQL',
sparql11 => 'RDF::Query::Parser::SPARQL11',
);
my %uris = (
'http://jena.hpl.hp.com/2003/07/query/RDQL' => 'RDF::Query::Parser::RDQL',
'http://www.w3.org/TR/rdf-sparql-query/' => 'RDF::Query::Parser::SPARQL',
'http://www.w3.org/ns/sparql-service-description#SPARQL10Query' => 'RDF::Query::Parser::SPARQL',
'http://www.w3.org/ns/sparql-service-description#SPARQL11Query' => 'RDF::Query::Parser::SPARQL11',
'http://www.w3.org/ns/sparql-service-description#SPARQL11Update' => 'RDF::Query::Parser::SPARQL11',
);
if ($base_uri) {
$base_uri = RDF::Query::Node::Resource->new( $base_uri );
}
my %pargs;
if ($options{canonicalize}) {
$pargs{canonicalize} = 1;
}
my $update = ((delete $options{update}) ? 1 : 0);
my $pclass = $names{ $lang } || $uris{ $languri } || $names{ $DEFAULT_PARSER };
my $parser = $pclass->new( %pargs );
my $parsed;
if (ref($query) and $query->isa('RDF::Query::Algebra')) {
my $method = 'SELECT';
$method = 'ASK' if ($query->isa('RDF::Query::Algebra::Ask'));
$method = 'CONSTRUCT' if ($query->isa('RDF::Query::Algebra::Construct'));
my @vars = map { RDF::Query::Node::Variable->new($_) } _uniq($query->potentially_bound);
if ($method eq 'SELECT') {
unless ($query->isa('RDF::Query::Algebra::Project')) {
$query = RDF::Query::Algebra::Project->new($query, \@vars);
}
}
$parsed = {
method => $method,
triples => [$query],
sources => [],
base => $base_uri,
options => {},
star => 0,
variables => \@vars,
};
$query = $query->as_sparql;
} else {
$parsed = $parser->parse( $query, $base_uri, $update );
}
my $self = $class->_new(
base_uri => $base_uri,
parser => $parser,
parsed => $parsed,
query_string => $query,
update => $update,
options => { %options },
);
if (exists $options{load_data}) {
$self->{load_data} = delete $options{load_data};
} elsif ($pclass =~ /^RDF::Query::Parser::(RDQL|SPARQL)$/) {
$self->{load_data} = 1;
} else {
$self->{load_data} = 0;
}
unless ($parsed->{'triples'}) {
$class->set_error( $parser->error );
$l->debug($parser->error);
return;
}
if (defined $options{defines}) {
@{ $self->{options} }{ keys %{ $options{defines} } } = values %{ delete $options{defines} };
}
if ($options{logger}) {
$l->debug("got external logger");
$self->{logger} = delete $options{logger};
}
if (my $opt = delete $options{optimize}) {
$l->debug("got optimization flag: $opt");
$self->{optimize} = $opt;
} else {
$self->{optimize} = 0;
}
if (my $opt = delete $options{force_no_optimization}) {
$l->debug("got force_no_optimization flag");
$self->{force_no_optimization} = 1;
}
if (my $time = delete $options{optimistic_threshold_time}) {
$l->debug("got optimistic_threshold_time flag");
$self->{optimistic_threshold_time} = $time;
}
# add rdf as a default namespace to RDQL queries
if ($pclass eq 'RDF::Query::Parser::RDQL') {
$self->{parsed}{namespaces}{rdf} = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
}
return $self;
}
sub _new {
my $class = shift;
my $self = bless( { @_ }, $class );
return $self;
}
=item C<< get ( $model ) >>
Executes the query using the specified model, and returns the first matching row as a LIST of values.
=cut
sub get {
my $self = shift;
my $stream = $self->execute( @_ );
my $row = $stream->next;
if (ref($row)) {
return @{ $row }{ $self->variables };
} else {
return undef;
}
}
=item C<< prepare ( $model ) >>
Prepares the query, constructing a query execution plan, and returns a list
containing ($plan, $context). To execute the plan, call
C<< execute_plan( $plan, $context ) >>.
=cut
sub prepare {
my $self = shift;
my $_model = shift;
my %args = @_;
my $l = Log::Log4perl->get_logger("rdf.query");
$self->{_query_cache} = {}; # a new scratch hash for each execution.
my %bound;
if ($args{ 'bind' }) {
%bound = %{ $args{ 'bind' } };
}
my $delegate;
if (defined $args{ 'delegate' }) {
$delegate = delete $args{ 'delegate' };
if ($delegate and not blessed($delegate)) {
$delegate = $delegate->new();
}
}
my $errors = ($args{ 'strict_errors' }) ? 1 : 0;
my $parsed = $self->{parsed};
my @vars = $self->variables( $parsed );
local($self->{model}) = $self->{model};
my $model = $self->{model} || $self->get_model( $_model, %args );
if ($model) {
$self->model( $model );
$l->debug("got model $model");
} else {
throw RDF::Query::Error::ModelError ( -text => "Could not create a model object." );
}
if ($self->{load_data}) {
$l->trace("loading data");
$self->load_data();
}
$model = $self->model(); # reload the model object, because load_data might have changed it.
my $dataset = ($model->isa('RDF::Trine::Model::Dataset')) ? $model : RDF::Trine::Model::Dataset->new($model);
$l->trace("constructing ExecutionContext");
my $context = RDF::Query::ExecutionContext->new(
bound => \%bound,
model => $dataset,
query => $self,
base_uri => $parsed->{base_uri},
ns => $parsed->{namespaces},
logger => $self->logger,
optimize => $self->{optimize},
force_no_optimization => $self->{force_no_optimization},
optimistic_threshold_time => $self->{optimistic_threshold_time} || 0,
requested_variables => \@vars,
strict_errors => $errors,
options => $self->{options},
delegate => $delegate,
);
$self->{model} = $model;
$l->trace("getting QEP...");
my %plan_args = %{ $args{ planner_args } || {} };
my $plan = $self->query_plan( $context, %plan_args );
$l->trace("-> done.");
unless ($plan) {
throw RDF::Query::Error::CompilationError -text => "Query didn't produce a valid execution plan";
}
return ($plan, $context);
}
=item C
Executes the query using the specified RDF C<< $model >>. If called in a list
context, returns an array of rows, otherwise returns an L
object. The iterator returned may be an instance of several subclasses of
L:
* A L object is returned for query forms producing variable binding results (SELECT queries).
* A L object is returned for query forms producing in an RDF graph result (DESCRIBE and CONSTRUCT queries).
* A L object is returned for query forms producing a true/false result (ASK queries).
=cut
sub execute {
my $self = shift;
my $model = shift;
my %args = @_;
my $l = Log::Log4perl->get_logger("rdf.query");
$l->debug("executing query with model " . ($model or ''));
my $lang_iri = '';
my $parser = $self->{parser};
my $name;
if ($parser->isa('RDF::Query::Parser::SPARQL11')) {
if ($self->is_update) {
$name = 'SPARQL 1.1 Update';
$lang_iri = 'http://www.w3.org/ns/sparql-service-description#SPARQL11Update';
} else {
$name = 'SPARQL 1.1 Query';
$lang_iri = 'http://www.w3.org/ns/sparql-service-description#SPARQL11Query';
}
} elsif ($parser->isa('RDF::Query::Parser::SPARQL')) {
$name = 'SPARQL 1.0 Query';
$lang_iri = 'http://www.w3.org/ns/sparql-service-description#SPARQL10Query';
}
local($self->{model}) = $self->{model};
# warn "model: $self->{model}";
# warn "passthrough checking if model supports $lang_iri\n";
if ($self->{options}{allow_passthrough} and $model->supports($lang_iri)) {
$l->info("delegating $name execution to the underlying model");
return $model->get_sparql( $self->{query_string} );
} else {
my ($plan, $context) = $self->prepare( $model, %args );
if ($l->is_trace) {
$l->trace(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
$l->trace($self->as_sparql);
$l->trace(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
}
return $self->execute_plan( $plan, $context );
}
}
=item C<< execute_plan ( $plan, $context ) >>
Executes the query plan generated by the C<> method using the supplied
L object. Return value(s) are the same as for the
C<> method.
=cut
sub execute_plan {
my $self = shift;
my $plan = shift;
my $context = shift;
my $model = $context->model;
my $parsed = $self->{parsed};
my @vars = $self->variables( $parsed );
my $l = Log::Log4perl->get_logger("rdf.query");
my $pattern = $self->pattern;
# $l->trace("calling fixup()");
# my $cpattern = $self->fixup();
my @funcs = $pattern->referenced_functions;
foreach my $f (@funcs) {
$self->run_hook( 'http://kasei.us/code/rdf-query/hooks/function_init', $f );
}
# RUN THE QUERY!
$l->debug("executing the graph pattern");
my $options = $parsed->{options} || {};
if ($self->{options}{plan}) {
warn $plan->sse({}, '');
}
$plan->execute( $context );
my $stream = $plan->as_iterator( $context );
if ($parsed->{'method'} eq 'DESCRIBE') {
$stream = $self->describe( $stream, $context );
} elsif ($parsed->{'method'} eq 'ASK') {
$stream = $self->ask( $stream, $context );
}
$l->debug("going to call post-execute hook");
$self->run_hook( 'http://kasei.us/code/rdf-query/hooks/post-execute', $model, $stream );
if (wantarray) {
return $stream->get_all();
} else {
return $stream;
}
}
=item C<< prepare_with_named_graphs ( $model, @uris ) >>
=cut
sub prepare_with_named_graphs {
my $self = shift;
my $_model = shift;
my @graphs = @_;
my $l = Log::Log4perl->get_logger("rdf.query");
# $self->{model} = $model;
my $model = $self->get_model( $_model );
if ($model) {
$self->model( $model );
} else {
throw RDF::Query::Error::ModelError ( -text => "Could not create a model object." );
}
foreach my $gdata (@graphs) {
my $url = (blessed($gdata)) ? $gdata->uri_value : $gdata;
$l->debug("-> adding graph data $url");
$self->parse_url( $url, 1 );
}
return $self->prepare( $model );
}
=item C<< execute_with_named_graphs ( $model, @uris ) >>
Executes the query using the specified RDF C<< $model >>, loading the contents
of the specified C<@uris> into named graphs immediately prior to matching the
query. Otherwise, acts just like C<< execute >>.
=cut
sub execute_with_named_graphs {
my $self = shift;
my $_model = shift;
my @graphs;
my @options;
if (scalar(@_)) {
if (not(blessed($_[0])) and reftype($_[0]) eq 'ARRAY') {
@graphs = @{ shift(@_) };
@options = @_;
} else {
@graphs = @_;
}
}
my ($plan, $ctx) = $self->prepare_with_named_graphs( $_model, @graphs );
return $self->execute_plan( $plan, $ctx );
}
=begin private
=item C<< query_plan ( $execution_context ) >>
Returns a RDF::Query::Plan object that is (hopefully) the optimal QEP for the
current query.
=end private
=cut
sub query_plan {
my $self = shift;
my $context = shift;
my %args = @_;
my $parsed = $self->{parsed};
my $bound = $context->bound;
my @bkeys = keys %{ $bound };
my $model = $context->model;
unless ($self->{update}) {
if (not exists $self->{options}{'rdf.query.plan.delegate'} or $self->{options}{'rdf.query.plan.delegate'}) {
my $delegate_key = $self->{update}
? 'http://www.w3.org/ns/sparql-service-description#SPARQL11Update'
: "http://www.w3.org/ns/sparql-service-description#SPARQL10Query"; # TODO: need to determine if the query is only 1.0, and if so, check for 1.0 support. otherwise check for 1.1 support
if (scalar(@bkeys) == 0 and $model->supports($delegate_key)) {
my $plan = RDF::Query::Plan::Iterator->new( sub {
my $context = shift;
my $model = $context->model;
my $iter = $model->get_sparql( $self->{query_string} );
return $iter;
} );
return $plan;
}
}
}
my %constant_plan;
if (my $b = $self->{parsed}{bindings}) {
my $vars = $b->{vars};
my $values = $b->{terms};
my @names = map { $_->name } @{ $vars };
my @constants;
while (my $values = shift(@{ $b->{terms} })) {
my %bound;
# @bound{ @names } = @{ $values };
foreach my $i (0 .. $#names) {
my $k = $names[$i];
my $v = $values->[$i];
next unless defined($v);
$bound{ $k } = $v;
}
my $bound = RDF::Query::VariableBindings->new( \%bound );
push(@constants, $bound);
}
my $constant_plan = RDF::Query::Plan::Constant->new( @constants );
%constant_plan = ( constants => [ $constant_plan ] );
}
my $algebra = $self->pattern;
my $pclass = $self->plan_class;
my @plans = $pclass->generate_plans( $algebra, $context, %args, %constant_plan );
my $l = Log::Log4perl->get_logger("rdf.query.plan");
if (wantarray) {
return @plans;
} else {
my ($plan) = @plans; # XXX need to figure out what's the 'best' plan here
if ($l->is_debug) {
$l->debug("using query plan: " . $plan->sse({}, ''));
}
return $plan;
}
}
=begin private
=item C<< plan_class >>
Returns the class name for Plan generation. This method should be overloaded by
RDF::Query subclasses if the implementation also provides a subclass of
RDF::Query::Plan.
=end private
=cut
sub plan_class {
return 'RDF::Query::Plan';
}
=begin private
=item C<< describe ( $iter, $context ) >>
Takes a stream of matching statements and constructs a DESCRIBE graph.
=end private
=cut
sub describe {
my $self = shift;
my $stream = shift;
my $context = shift;
my $model = $context->model;
my @nodes;
my %seen;
while (my $row = $stream->next) {
foreach my $v (@{ $self->{parsed}{variables} }) {
if ($v->isa('RDF::Query::Node::Variable')) {
my $node = $row->{ $v->name };
my $string = blessed($node) ? $node->as_string : '';
push(@nodes, $node) unless ($seen{ $string }++);
} elsif ($v->isa('RDF::Query::Node::Resource')) {
my $string = blessed($v) ? $v->as_string : '';
push(@nodes, $v) unless ($seen{ $string }++);
}
}
}
my @streams;
$self->{'describe_nodes'} = [];
foreach my $node (@nodes) {
push(@{ $self->{'describe_nodes'} }, $node);
push(@streams, $model->bounded_description( $node ));
}
my $ret = sub {
while (@streams) {
my $val = $streams[0]->next;
if (defined $val) {
return $val;
} else {
shift(@streams);
return undef if (not @streams);
}
}
};
return RDF::Trine::Iterator::Graph->new( $ret );
}
=begin private
=item C
Takes a stream of matching statements and returns a boolean query result stream.
=end private
=cut
sub ask {
my $self = shift;
my $stream = shift;
my $context = shift;
my $value = $stream->next;
my $bool = ($value) ? 1 : 0;
return RDF::Trine::Iterator::Boolean->new( [ $bool ] );
}
######################################################################
=item C<< pattern >>
Returns the RDF::Query::Algebra::GroupGraphPattern algebra pattern for this query.
=cut
sub pattern {
my $self = shift;
my $parsed = $self->parsed;
my @triples = @{ $parsed->{triples} };
if (scalar(@triples) == 1 and ($triples[0]->isa('RDF::Query::Algebra::GroupGraphPattern')
or $triples[0]->isa('RDF::Query::Algebra::Filter')
or $triples[0]->isa('RDF::Query::Algebra::Sort')
or $triples[0]->isa('RDF::Query::Algebra::Limit')
or $triples[0]->isa('RDF::Query::Algebra::Offset')
or $triples[0]->isa('RDF::Query::Algebra::Distinct')
or $triples[0]->isa('RDF::Query::Algebra::Project')
or $triples[0]->isa('RDF::Query::Algebra::Construct')
or $triples[0]->isa('RDF::Query::Algebra::Load')
or $triples[0]->isa('RDF::Query::Algebra::Clear')
or $triples[0]->isa('RDF::Query::Algebra::Create')
or $triples[0]->isa('RDF::Query::Algebra::Update')
)) {
my $ggp = $triples[0];
return $ggp;
} else {
return RDF::Query::Algebra::GroupGraphPattern->new( @triples );
}
}
=item C<< is_update >>
=cut
sub is_update {
my $self = shift;
my $pat = $self->pattern;
return 1 if ($pat->subpatterns_of_type('RDF::Query::Algebra::Clear'));
return 1 if ($pat->subpatterns_of_type('RDF::Query::Algebra::Copy'));
return 1 if ($pat->subpatterns_of_type('RDF::Query::Algebra::Create'));
return 1 if ($pat->subpatterns_of_type('RDF::Query::Algebra::Move'));
return 1 if ($pat->subpatterns_of_type('RDF::Query::Algebra::Update'));
return 0;
}
=item C<< as_sparql >>
Returns the query as a string in the SPARQL syntax.
=cut
sub as_sparql {
my $self = shift;
my $parsed = $self->parsed || {};
my $context = { namespaces => { %{ $parsed->{namespaces} || {} } } };
my $method = $parsed->{method};
if ($method =~ /^(DESCRIBE|ASK)$/i) {
$context->{force_ggp_braces} = 1;
}
my @vars = map { $_->as_sparql( $context, '' ) } @{ $parsed->{ variables } };
my $vars = join(' ', @vars);
my $ggp = $self->pattern;
if ($method =~ /^(LOAD|CLEAR|CREATE|UPDATE)$/) {
return $ggp->as_sparql;
} else {
{
my $pvars = join(' ', sort $ggp->referenced_variables);
my $svars = join(' ', sort map { $_->isa('RDF::Query::Node::Resource') ? $_->as_string : $_->name } @{ $parsed->{ variables } });
if ($pvars eq $svars) {
$vars = '*';
}
}
my @ns = map { "PREFIX " . ($_ eq '__DEFAULT__' ? '' : $_) . ": <$parsed->{namespaces}{$_}>" } (sort keys %{ $parsed->{namespaces} });
my @mod;
if (my $ob = $parsed->{options}{orderby}) {
push(@mod, 'ORDER BY ' . join(' ', map {
my ($dir,$v) = @$_;
($dir eq 'ASC')
? $v->as_sparql( $context, '' )
: "${dir}" . $v->as_sparql( $context, '' );
} @$ob));
}
if (my $l = $parsed->{options}{limit}) {
push(@mod, "LIMIT $l");
}
if (my $o = $parsed->{options}{offset}) {
push(@mod, "OFFSET $o");
}
my $mod = join("\n", @mod);
my $methoddata = '';
if ($method eq 'SELECT') {
$methoddata = $method;
} elsif ($method eq 'ASK') {
$methoddata = $method;
} elsif ($method eq 'DESCRIBE') {
$methoddata = sprintf("%s %s\nWHERE", $method, $vars);
}
my $ns = scalar(@ns) ? join("\n", @ns, '') : '';
my $sparql;
if ($methoddata or $ns) {
$sparql = sprintf(
"$ns%s %s\n%s",
$methoddata,
$ggp->as_sparql( $context, '' ),
$mod,
);
} else {
$sparql = sprintf(
"%s\n%s",
$ggp->as_sparql( $context, '' ),
$mod,
);
}
chomp($sparql);
return $sparql;
}
}
=item C<< as_hash >>
Returns the query as a nested set of plain data structures (no objects).
=cut
sub as_hash {
my $self = shift;
my $pattern = $self->pattern;
return $pattern->as_hash;
}
=item C<< sse >>
Returns the query as a string in the SSE syntax.
=cut
sub sse {
my $self = shift;
my $parsed = $self->parsed;
my $ggp = $self->pattern;
my $ns = $parsed->{namespaces};
my $nscount = scalar(@{ [ keys %$ns ] });
my $base_uri = $parsed->{base};
my $indent = ' ';
my $context = { namespaces => $ns, indent => $indent };
my $indentcount = 0;
$indentcount++ if ($base_uri);
$indentcount++ if ($nscount);
my $prefix = $indent x $indentcount;
my $sse = $ggp->sse( $context, $prefix );
if ($nscount) {
$sse = sprintf("(prefix (%s)\n${prefix}%s)", join("\n${indent}" . ' 'x9, map { "(${_}: <$ns->{$_}>)" } (sort keys %$ns)), $sse);
}
if ($base_uri) {
$sse = sprintf("(base <%s>\n${indent}%s)", $base_uri->uri_value, $sse);
}
chomp($sse);
return $sse;
}
=item C<< dateparser >>
Returns the DateTime::Format::W3CDTF object associated with this query object.
=cut
sub dateparser {
my $self = shift;
my $parser = ($self->{dateparser} ||= DateTime::Format::W3CDTF->new);
return $parser;
}
=begin private
=item C<< supports ( $model, $feature ) >>
Returns a boolean value representing the support of $feature for the given model.
=end private
=cut
sub supports {
my $self = shift;
my $obj = shift;
my $model = $self->get_model( $obj );
return $model->supports( @_ );
}
=item C<< specifies_update_dataset >>
Returns true if the query specifies a custom update dataset via the WITH or
USING keywords, false otherwise.
=cut
sub specifies_update_dataset {
my $self = shift;
no warnings 'uninitialized';
return $self->{parsed}{custom_update_dataset} ? 1 : 0;
}
=begin private
=item C<< get_model ( $model ) >>
Returns a model object for use during execution.
If C<< $model >> is a usable model, it is simply returned.
Otherwise, a temporary model is constructed and returned.
=end private
=cut
sub get_model {
my $self = shift;
my $store = shift;
my %args = @_;
my $parsed = ref($self) ? $self->{parsed} : undef;
my $model;
if (not $store) {
$model = RDF::Trine::Model->temporary_model;
} elsif (($store->isa('RDF::Trine::Model'))) {
$model = $store;
} elsif ($store->isa('RDF::Redland::Model')) {
my $s = RDF::Trine::Store->new_with_object( $store );
$model = RDF::Trine::Model->new( $s );
unless (blessed($model)) {
Carp::cluck "Failed to construct an RDF::Trine model from $store";
return;
}
} elsif ($store->isa('RDF::Core::Model')) {
Carp::croak "RDF::Core is no longer supported";
} else {
Carp::confess "unknown store type: $store";
}
return $model;
}
=begin private
=item C<< load_data >>
Loads any external data required by this query (FROM and FROM NAMED clauses).
=end private
=cut
sub load_data {
my $self = shift;
my $parsed = $self->{parsed};
## LOAD ANY EXTERNAL RDF FILES
my $sources = $parsed->{'sources'};
if (ref($sources) and reftype($sources) eq 'ARRAY' and scalar(@$sources)) {
my $model = RDF::Trine::Model->temporary_model;
$self->model( $model );
foreach my $source (@$sources) {
my $named_source = (2 == @{$source} and $source->[1] eq 'NAMED');
my $uri = $source->[0]->uri_value;
$self->parse_url( $uri, $named_source );
}
$self->run_hook( 'http://kasei.us/code/rdf-query/hooks/post-create-model', $model );
}
}
=begin private
=item C<< var_or_expr_value ( \%bound, $value, $context ) >>
Returns an (non-variable) RDF::Query::Node value based on C<< $value >>.
If C<< $value >> is a node object, it is simply returned. If it is an
RDF::Query::Node::Variable object, the corresponding value in C<< \%bound >>
is returned. If it is an RDF::Query::Expression object, the expression
is evaluated using C<< \%bound >>, and the resulting value is returned.
=end private
=cut
sub var_or_expr_value {
my $self = shift;
my $bound = shift;
my $v = shift;
my $ctx = shift;
Carp::confess 'not an object value in var_or_expr_value: ' . Dumper($v) unless (blessed($v));
if ($v->isa('RDF::Query::Expression')) {
return $v->evaluate( $self, $bound, $ctx );
} elsif ($v->isa('RDF::Trine::Node::Variable')) {
return $bound->{ $v->name };
} elsif ($v->isa('RDF::Query::Node')) {
return $v;
} else {
Carp::cluck "not an expression or node value in var_or_expr_value: " . Dumper($v, $bound);
throw RDF::Query::Error -text => 'Not an expression or node value';
}
}
=item C
Associates the custom function C<$function> (a CODE reference) with the
specified URI, allowing the function to be called by query FILTERs.
=cut
sub add_function {
my $self = shift;
my $uri = shift;
my $code = shift;
if (ref($self)) {
$self->{'functions'}{$uri} = $code;
} else {
our %functions;
$RDF::Query::functions{ $uri } = $code;
}
}
=item C<< supported_extensions >>
Returns a list of URLs representing extensions to SPARQL that are supported
by the query engine.
=cut
sub supported_extensions {
my $self = shift;
return qw(
http://kasei.us/2008/04/sparql-extension/service
http://kasei.us/2008/04/sparql-extension/service/bloom_filters
http://kasei.us/2008/04/sparql-extension/unsaid
http://kasei.us/2008/04/sparql-extension/federate_bindings
http://kasei.us/2008/04/sparql-extension/select_expression
http://kasei.us/2008/04/sparql-extension/aggregate
http://kasei.us/2008/04/sparql-extension/aggregate/count
http://kasei.us/2008/04/sparql-extension/aggregate/count-distinct
http://kasei.us/2008/04/sparql-extension/aggregate/min
http://kasei.us/2008/04/sparql-extension/aggregate/max
);
}
=item C<< supported_functions >>
Returns a list URLs that may be used as functions in FILTER clauses
(and the SELECT clause if the SPARQL 1.1 parser is used).
=cut
sub supported_functions {
my $self = shift;
my @funcs;
if (blessed($self)) {
push(@funcs, keys %{ $self->{'functions'} });
}
push(@funcs, keys %RDF::Query::functions);
return grep { not(/^sparql:/) } @funcs;
}
=begin private
=item C
If C<$uri> is associated with a query function, returns a CODE reference
to the function. Otherwise returns C.
=end private
=cut
sub get_function {
my $self = shift;
my $uri = shift;
my %args = @_;
my $l = Log::Log4perl->get_logger("rdf.query");
if (blessed($uri) and $uri->isa('RDF::Query::Node::Resource')) {
$uri = $uri->uri_value;
}
$l->debug("trying to get function from $uri");
if (blessed($uri) and $uri->isa('RDF::Query::Node::Resource')) {
$uri = $uri->uri_value;
}
my $func;
if (ref($self)) {
$func = $self->{'functions'}{$uri} || $RDF::Query::functions{ $uri };
} else {
$func = $RDF::Query::functions{ $uri };
}
if ($func) {
return $func;
}
return;
}
=begin private
=item C<< call_function ( $model, $bound, $uri, @args ) >>
If C<$uri> is associated with a query function, calls the function with the supplied arguments.
=end private
=cut
sub call_function {
my $self = shift;
my $model = shift;
my $bound = shift;
my $uri = shift;
my $l = Log::Log4perl->get_logger("rdf.query");
$l->debug("trying to get function from $uri");
my $filter = RDF::Query::Expression::Function->new( $uri, @_ );
return $filter->evaluate( $self, $bound );
}
=item C<< add_computed_statement_generator ( $predicate => \&generator ) >>
Adds a statement generator for the given C<< $predicate >> to the query object.
This statement generator will be called as
C<< $generator->( $query, $model, \%bound, $s, $p, $o, $c ) >>
and is expected to return an RDF::Trine::Iterator::Graph object containing
statements with C<< $predicate >>.
=cut
sub add_computed_statement_generator {
my $self = shift;
if (scalar(@_) == 1) {
throw RDF::Query::Error::MethodInvocationError -text => 'RDF::Query::add_computed_statement_generator must now take two arguments: ( $predicate, \&generator ).';
}
my $pred = shift;
my $gen = shift;
if (blessed($pred)) {
if ($pred->can('uri_value')) {
$pred = $pred->uri_value;
} else {
$pred = "$pred";
}
}
push( @{ $self->{'computed_statement_generators'}{ $pred } }, $gen );
}
=item C<< get_computed_statement_generators ( [ $predicate ] ) >>
Returns an ARRAY reference of computed statement generator closures.
=cut
sub get_computed_statement_generators {
my $self = shift;
if (@_) {
my $pred = shift;
if (blessed($pred)) {
if ($pred->can('uri_value')) {
$pred = $pred->uri_value;
} else {
$pred = "$pred";
}
}
return $self->{'computed_statement_generators'}{ $pred } || [];
} else {
return $self->{'computed_statement_generators'} || {};
}
}
=item C<< add_hook_once ( $hook_uri, $function, $token ) >>
Calls C<< add_hook >> adding the supplied C<< $function >> only once based on
the C<< $token >> identifier. This may be useful if the only code that is able
to add a hook is called many times (in an extension function, for example).
=cut
sub add_hook_once {
my $self = shift;
my $uri = shift;
my $code = shift;
my $token = shift;
unless ($self->{'hooks_once'}{ $token }++) {
$self->add_hook( $uri, $code );
}
}
=item C<< add_hook ( $hook_uri, $function ) >>
Associates the custom function C<$function> (a CODE reference) with the
RDF::Query code hook specified by C<$uri>. Each function that has been
associated with a particular hook will be called (in the order they were
registered as hooks) when the hook event occurs. See L"Defined Hooks">
for more information.
=cut
sub add_hook {
my $self = shift;
my $uri = shift;
my $code = shift;
if (ref($self)) {
push(@{ $self->{'hooks'}{$uri} }, $code);
} else {
our %hooks;
push(@{ $RDF::Query::hooks{ $uri } }, $code);
}
}
=begin private
=item C
If C<$uri> is associated with any query callback functions ("hooks"),
returns an ARRAY reference to the functions. If no hooks are associated
with C<$uri>, returns a reference to an empty array.
=end private
=cut
sub get_hooks {
my $self = shift;
my $uri = shift;
my $func = $self->{'hooks'}{ $uri }
|| $RDF::Query::hooks{ $uri }
|| [];
return $func;
}
=begin private
=item C
Calls any query callback functions associated with C<$uri>. Each callback
is called with the query object as the first argument, followed by any
caller-supplied arguments from C<@args>.
=end private
=cut
sub run_hook {
my $self = shift;
my $uri = shift;
my @args = @_;
my $hooks = $self->get_hooks( $uri );
foreach my $hook (@$hooks) {
$hook->( $self, @args );
}
}
=begin private
=item C<< parse_url ( $url, $named ) >>
Retrieve a remote file by URL, and parse RDF into the RDF store.
If $named is TRUE, associate all parsed triples with a named graph.
=end private
=cut
sub parse_url {
my $self = shift;
my $url = shift;
my $named = shift;
my $model = $self->model;
if ($named) {
RDF::Trine::Parser->parse_url_into_model( $url, $model, context => iri($url) );
} else {
RDF::Trine::Parser->parse_url_into_model( $url, $model );
}
}
=begin private
=item C
Returns a list of the ordered variables the query is selecting.
=end private
=cut
sub variables {
my $self = shift;
my $parsed = shift || $self->parsed;
my @vars = map { $_->name }
grep {
$_->isa('RDF::Query::Node::Variable') or $_->isa('RDF::Query::Expression::Alias')
} @{ $parsed->{'variables'} };
return @vars;
}
=item C
Returns the parse tree.
=cut
sub parsed {
my $self = shift;
if (@_) {
$self->{parsed} = shift;
}
return $self->{parsed};
}
=item C<< model >>
Returns the RDF::Trine::Model object for this query.
=cut
sub model {
my $self = shift;
if (@_) {
$self->{model} = shift;
}
my $model = $self->{model};
unless (defined $model) {
Carp::confess "query->model shouldn't be calling get_model";
$model = $self->get_model();
}
return $model;
}
=item C<< useragent >>
Returns the LWP::UserAgent object used for retrieving web content.
=cut
sub useragent {
my $self = shift;
if (my $ua = $self->{useragent}) {
return $ua;
} else {
my $ua = LWP::UserAgent->new( agent => "RDF::Query/${VERSION}" );
$ua->default_headers->push_header( 'Accept' => "application/sparql-results+xml;q=0.9,application/rdf+xml;q=0.5,text/turtle;q=0.7,text/xml" );
$self->{useragent} = $ua;
return $ua;
}
}
=item C<< log ( $key [, $value ] ) >>
If no logger object is associated with this query object, does nothing.
Otherwise, return or set the corresponding value depending on whether a
C<< $value >> is specified.
=cut
sub log {
my $self = shift;
if (blessed(my $l = $self->{ logger })) {
$l->log( @_ );
}
}
=item C<< logger >>
Returns the logger object associated with this query object (if present).
=cut
sub logger {
my $self = shift;
return $self->{ logger };
}
=item C
Returns the last error the parser experienced.
=cut
sub error {
my $self = shift;
if (blessed($self)) {
return $self->{error};
} else {
our $_ERROR;
return $_ERROR;
}
}
sub _uniq {
my %seen;
my @data;
foreach (@_) {
push(@data, $_) unless ($seen{ $_ }++);
}
return @data;
}
=begin private
=item C
Sets the object's error variable.
=end private
=cut
sub set_error {
my $self = shift;
my $error = shift;
my $e = shift;
if (blessed($self)) {
$self->{error} = $error;
$self->{exception} = $e;
}
our $_ERROR = $error;
our $_EXCEPTION = $e;
}
=begin private
=item C
Clears the object's error variable.
=end private
=cut
sub clear_error {
my $self = shift;
if (blessed($self)) {
$self->{error} = undef;
$self->{exception} = undef;
}
our($_ERROR, $_EXCEPTION);
undef $_ERROR;
undef $_EXCEPTION;
}
# =begin private
#
# =item C<_debug_closure ( $code )>
#
# Debugging function to print out a deparsed (textual) version of a closure.
#
# =end private
#
# =cut
#
# sub _debug_closure {
# my $closure = shift;
# my $l = Log::Log4perl->get_logger("rdf.query");
# if ($l->is_trace) {
# require B::Deparse;
# my $deparse = B::Deparse->new("-p", "-sC");
# my $body = $deparse->coderef2text($closure);
# $l->trace("--- --- CLOSURE --- ---");
# $l->logcluck($body);
# }
# }
1;
__END__
=back
=head1 DEFINED HOOKS
The following hook URIs are defined and may be used to extend the query engine
functionality using the C<< add_hook >> method:
=over 4
=item http://kasei.us/code/rdf-query/hooks/post-create-model
Called after loading all external files to a temporary model in queries that
use FROM and FROM NAMED.
Args: ( $query, $model )
C<$query> is the RDF::Query object.
C<$model> is the RDF::Trine::Model object.
=item http://kasei.us/code/rdf-query/hooks/post-execute
Called immediately before returning a result iterator from the execute method.
Args: ( $query, $model, $iterator )
C<$query> is the RDF::Query object.
C<$model> is the RDF::Trine::Model object.
C<$iterator> is a RDF::Trine::Iterator object.
=back
=head1 SEE ALSO
L
=head1 AUTHOR
Gregory Todd Williams
=head1 LICENSE
Copyright (c) 2005-2012 Gregory Todd Williams. This
program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
=cut
RDF-Query-2.919/lib/RDF/Query/ 000755 000765 000024 00000000000 14632643202 015633 5 ustar 00greg staff 000000 000000 RDF-Query-2.919/lib/RDF/Query/PaxHeader/Temporal.pm 000644 000765 000024 00000000225 14607236076 021735 x ustar 00greg staff 000000 000000 30 mtime=1713191998.398946061
64 LIBARCHIVE.xattr.com.apple.TextEncoding=VVRGLTg7MTM0MjE3OTg0
55 SCHILY.xattr.com.apple.TextEncoding=UTF-8;134217984
RDF-Query-2.919/lib/RDF/Query/Temporal.pm 000644 000765 000024 00000004043 14607236076 017766 0 ustar 00greg staff 000000 000000 # RDF::Query::Temporal
# -----------------------------------------------------------------------------
=head1 NAME
RDF::Query::Temporal - tSPARQL temporal extensions to the RDF::Query engine.
=head1 VERSION
This document describes RDF::Query::Temporal version 2.919.
=cut
package RDF::Query::Temporal;
use strict;
use warnings;
no warnings 'redefine';
use base qw(RDF::Query);
use Scalar::Util qw(blessed);
######################################################################
our ($VERSION);
BEGIN {
$VERSION = '2.919';
}
######################################################################
=begin private
=item C \%bound, triples => \@triples )>
Called by C to handle TIME graph query patterns.
=end private
=cut
sub query_more_time {
my $self = shift;
my %args = @_;
if ($args{quad}) {
throw RDF::Query::Error::QueryPatternError ( -text => "Can't use nested temporal queries" );
}
my $triples = delete($args{triples});
my @triples = @{$triples};
my $triple = shift(@triples);
return $self->query_more( triples => [ $triple->pattern ], %args, quad => $triple->interval );
}
=begin private
=item C
Called by fixup() with individual graph patterns. Returns a list of sub-patterns
that may need fixing up.
=end private
=cut
sub fixup_pattern {
my $self = shift;
my $triple = shift;
my $bridge = $self->{bridge};
if ($triple->isa('RDF::Query::Algebra::TimeGraph')) {
my @triples;
push(@triples, $triple->pattern);
push(@triples, $triple->time_triples);
use Data::Dumper;
warn Dumper(\@triples);
if ($triple->interval->isa('RDF::Query::Node::Resource')) {
$triple->interval( $bridge->new_resource( $triple->interval->uri_value ) );
} elsif ($triple->interval->isa('RDF::Query::Node::Variable')) {
my $var = $triple->interval->name;
$self->{ known_variables_hash }{ $var }++
}
return @triples;
} else {
return $self->SUPER::fixup_pattern( $triple );
}
}
1;
__END__
=head1 AUTHOR
Gregory Todd Williams
=cut
RDF-Query-2.919/lib/RDF/Query/PaxHeader/Plan.pm 000644 000765 000024 00000000225 14607236076 021044 x ustar 00greg staff 000000 000000 30 mtime=1713191998.356602045
64 LIBARCHIVE.xattr.com.apple.TextEncoding=VVRGLTg7MTM0MjE3OTg0
55 SCHILY.xattr.com.apple.TextEncoding=UTF-8;134217984
RDF-Query-2.919/lib/RDF/Query/Plan.pm 000644 000765 000024 00000115713 14607236076 017104 0 ustar 00greg staff 000000 000000 # RDF::Query::Plan
# -----------------------------------------------------------------------------
=head1 NAME
RDF::Query::Plan - Executable query plan nodes.
=head1 VERSION
This document describes RDF::Query::Plan version 2.919.
=head1 METHODS
=over 4
=cut
package RDF::Query::Plan;
use strict;
use warnings;
use Data::Dumper;
use List::Util qw(reduce);
use Scalar::Util qw(blessed reftype refaddr);
use RDF::Query::Error qw(:try);
use RDF::Query::BGPOptimizer;
use RDF::Query::Plan::Aggregate;
use RDF::Query::Plan::BasicGraphPattern;
use RDF::Query::Plan::Constant;
use RDF::Query::Plan::Construct;
use RDF::Query::Plan::Distinct;
use RDF::Query::Plan::Filter;
use RDF::Query::Plan::Join::NestedLoop;
use RDF::Query::Plan::Join::PushDownNestedLoop;
use RDF::Query::Plan::Limit;
use RDF::Query::Plan::Offset;
use RDF::Query::Plan::Project;
use RDF::Query::Plan::Extend;
use RDF::Query::Plan::Quad;
use RDF::Query::Plan::Service;
use RDF::Query::Plan::Sort;
use RDF::Query::Plan::ComputedStatement;
use RDF::Query::Plan::ThresholdUnion;
use RDF::Query::Plan::Union;
use RDF::Query::Plan::SubSelect;
use RDF::Query::Plan::Iterator;
use RDF::Query::Plan::Load;
use RDF::Query::Plan::Clear;
use RDF::Query::Plan::Update;
use RDF::Query::Plan::Minus;
use RDF::Query::Plan::Sequence;
use RDF::Query::Plan::Path;
use RDF::Query::Plan::NamedGraph;
use RDF::Query::Plan::Copy;
use RDF::Query::Plan::Move;
use RDF::Trine::Statement;
use RDF::Trine::Statement::Quad;
use constant READY => 0x01;
use constant OPEN => 0x02;
use constant CLOSED => 0x04;
######################################################################
our ($VERSION, %PLAN_CLASSES);
BEGIN {
$VERSION = '2.919';
%PLAN_CLASSES = (
service => 'RDF::Query::Plan::Service',
);
}
######################################################################
=item C<< new >>
=cut
sub new {
my $class = shift;
my @args = @_;
return bless( [ { __state => $class->READY }, @args ], $class );
}
=item C<< execute ( $execution_context ) >>
=cut
sub execute ($);
=item C<< next >>
=cut
sub next;
=item C<< get_all >>
Returns all remaining rows.
=cut
sub get_all {
my $self = shift;
unless ($self->state == $self->OPEN) {
throw RDF::Query::Error::ExecutionError -text => "get_all can't be called on an unopen plan";
}
my @rows;
while (my $row = $self->next) {
push(@rows, $row);
}
return @rows;
}
=item C<< close >>
=cut
sub close {
my $self = shift;
$self->state( CLOSED );
}
=item C<< state ( [ $state ] ) >>
Returns the current state of the plan (either READY, OPEN, or CLOSED).
If C<< $state >> is provided, updates the plan to a new state.
=cut
sub state {
my $self = shift;
if (scalar(@_)) {
$self->[0]{__state} = shift;
}
return $self->[0]{__state};
}
=item C<< logging_keys >>
=cut
sub logging_keys {
my $self = shift;
return $self->[0]{logging_keys} || {};
}
=item C<< explain >>
Returns a string serialization of the query plan appropriate for display
on the command line.
=cut
sub explain {
my $self = shift;
# warn 'Explaining query plan: ' . $self->serialize();
my ($s, $count) = (' ', 0);
if (@_) {
$s = shift;
$count = shift;
}
my $indent = '' . ($s x $count);
my $type = $self->plan_node_name;
my $string = sprintf("%s%s (0x%x)\n", $indent, $type, refaddr($self));
foreach my $p ($self->plan_node_data) {
if (blessed($p)) {
if ($p->isa('RDF::Trine::Statement::Quad')) {
$string .= "${indent}${s}" . join(' ', map { ($_->isa('RDF::Trine::Node::Nil')) ? "(nil)" : $_->as_sparql } $p->nodes) . "\n";
} elsif ($p->isa('RDF::Trine::Node::Nil')) {
$string .= "${indent}${s}(nil)\n";
} else {
$string .= $p->explain( $s, $count+1 );
}
} elsif (ref($p)) {
$string .= "${indent}${s}" . Dumper($p);
Carp::cluck 'unexpected non-blessed ref in RDF::Query::Plan->explain: ' . Dumper($p);
} else {
no warnings 'uninitialized';
$string .= "${indent}${s}$p\n";
}
}
return $string;
}
=item C<< sse >>
=cut
sub sse {
my $self = shift;
my $context = shift || {};
my $indent = shift || '';
my $more = ' ';
my @proto = $self->plan_prototype;
my @data = $self->plan_node_data;
my $name = $self->plan_node_name;
my @args;
my $list = \@data;
foreach my $i (0 .. $#proto) {
my $p = $proto[ $i ];
push(@args, $self->_sse( $context, $indent, $more, $p, $list ));
}
return "(${name} " . join(' ', map { defined($_) ? $_ : '()' } @args) . ")";
}
sub _sse {
my $self = shift;
my $context = shift;
my $indent = shift;
my $more = shift;
my $p = shift;
my $list = shift;
if ($p =~ m/^[PQTNWEJVqibswu]$/) {
my $v = shift(@$list);
return $self->_sse_atom($context, $indent, $more, $p, $v);
} elsif ($p eq 'A') {
my $v = shift(@$list);
if (blessed($v)) {
return $v->sse( $context, $indent );
} else {
return '()';
}
} elsif (substr($p, 0, 1) eq '\\') {
my $rest = substr($p, 1);
my $v = shift(@$list);
my @args;
while (@$v) {
push(@args, $self->_sse( $context, $indent, $more, $rest, $v ));
}
return '(' . join(' ', @args) . ')';
} elsif (substr($p, 0, 1) eq '*') {
my $rest = substr($p, 1);
my @args;
while (@$list) {
push(@args, $self->_sse( $context, $indent, $more, $rest, $list ));
}
no warnings 'uninitialized';
return join("\n${indent}${more}", '', @args);
} elsif ($p =~ m/^[PQTNWEJVqibswu\\*]{2,}$/) {
my @args;
foreach my $p2 (split(//, $p)) {
my $v = shift(@$list);
push(@args, $self->_sse($context, $indent, $more, $p2, [$v]));
}
return '(' . join(' ', @args) . ')';
} else {
Carp::confess "unrecognized plan node prototype '$p'";
}
}
sub _sse_atom {
my $self = shift;
my $context = shift || {};
my $indent = shift;
my $more = shift;
my $p = shift;
my $v = shift;
no warnings 'uninitialized';
my $ns = $context->{ namespaces } || {};
my %ns = %$ns;
if ($p eq 's') {
for ($v) {
s/\\/\\\\/g;
s/"/\\"/g;
s/\n/\\n/g;
s/\t/\\t/g;
}
return qq["$v"];
} elsif ($p eq 'w') {
return $v;
} elsif ($p eq 'u') {
return qq[<$v>];
} elsif ($p eq 'i') {
return $v;
} elsif ($p eq 'b') {
return $v;
} elsif ($p eq 'W') {
if (blessed($v)) {
return $v->sse( { namespaces => \%ns }, "${indent}${more}" );
} else {
return $v;
}
} elsif ($p =~ m/^[PNETV]$/) {
if (blessed($v)) {
Carp::cluck unless ($v->can('sse'));
return $v->sse( { namespaces => \%ns }, "${indent}${more}" );
} else {
return '()';
}
} elsif ($p eq 'J') {
if ($v->isa('RDF::Query::Node::Variable')) {
return $v->name;
} else {
return $v->sse( { namespaces => \%ns }, "${indent}${more}" );
}
}
}
=item C<< serialize >>
Return a serialization of the query plan.
=cut
sub serialize {
my $self = shift;
}
=item C<< delegate >>
Returns the delegate object if available.
=cut
sub delegate {
my $self = shift;
return $self->[0]{delegate};
}
=item C<< referenced_variables >>
Returns a list of variable names that are referenced by this plan.
=cut
sub referenced_variables {
my $self = shift;
my $refs = $self->[0]{referenced_variables};
return @{ $refs };
}
=item C<< as_iterator ( $context ) >>
Returns an RDF::Trine::Iterator object for the current (already executed) plan.
=cut
sub as_iterator {
my $self = shift;
my $context = shift;
my $vars = $context->requested_variables;
my $stream = RDF::Trine::Iterator::Bindings->new( sub { $self->next }, $vars, distinct => $self->distinct, sorted_by => $self->ordered );
return $stream;
}
=item C<< is_update >>
Returns true if the plan represents an update operation.
=cut
sub is_update {
return 0;
}
=item C<< label ( $label => $value ) >>
Sets the named C<< $label >> to C<< $value >> for this plan object.
If no C<< $value >> is given, returns the current label value, or undef if none
exists.
=cut
sub label {
my $self = shift;
my $label = shift;
if (@_) {
my $value = shift;
$self->[0]{labels}{ $label } = $value;
}
return $self->[0]{labels}{ $label };
}
=item C<< graph_labels >>
=cut
sub graph_labels {
my $self = shift;
my @labels;
foreach my $k (keys %{ $self->[0]{labels} || {} }) {
next if ($k eq 'algebra');
my $v = $self->label( $k );
local($Data::Dumper::Indent) = 0;
my $l = Data::Dumper->Dump([$v], [$k]);
push(@labels, $l);
}
my $label = join(", ", @labels);
return ' ' . $label;
}
sub DESTROY {
my $self = shift;
if ($self->state == OPEN) {
$self->close;
}
}
################################################################################
=item C<< generate_plans ( $algebra, $execution_context, %args ) >>
Returns a list of equivalent query plan objects for the given algebra object.
=cut
sub generate_plans {
my $self = shift;
my $class = ref($self) || $self;
my $algebra = shift;
my $context = shift;
my $config = $context->options || {};
my %args = @_;
my $active_graph = $args{ active_graph } || RDF::Trine::Node::Nil->new();
my $l = Log::Log4perl->get_logger("rdf.query.plan");
unless (blessed($algebra) and $algebra->isa('RDF::Query::Algebra')) {
throw RDF::Query::Error::MethodInvocationError (-text => "Cannot generate an execution plan with a non-algebra object $algebra");
}
$l->trace("generating query plan for " . $algebra->sse({ indent => ' ' }, ''));
############################################################################
### Optimize simple COUNT(*) aggregates over BGPs
if ($algebra->isa('RDF::Query::Algebra::Extend')) {
my $agg = $algebra->pattern;
if ($agg->isa('RDF::Query::Algebra::Aggregate')) {
my @group = $agg->groupby;
if (scalar(@group) == 0) {
my @ops = $agg->ops;
if (scalar(@ops) == 1 and $ops[0][0] eq 'COUNT(*)') {
my $ggp = $agg->pattern;
if ($ggp->isa('RDF::Query::Algebra::GroupGraphPattern')) {
my @bgp = $ggp->patterns;
if (scalar(@bgp) == 1 and ($bgp[0]->isa('RDF::Query::Algebra::BasicGraphPattern'))) {
my $bgp = $bgp[0];
my @triples = $bgp->triples;
if (scalar(@triples) == 1) {
$l->debug("Optimizing for COUNT(*) on 1-triple BGP: " . $bgp->sse({ indent => ' ' }, ''));
my $vars = $algebra->vars;
my $alias = $vars->[0];
my $name = $alias->name;
my $done = 0;
my $model = $context->model;
my $code = sub {
return if ($done);
$done = 1;
#warn Dumper(\@triples); # XXX
my $count = $model->count_statements( $triples[0]->nodes );
my $lit = RDF::Query::Node::Literal->new($count, undef, 'http://www.w3.org/2001/XMLSchema#integer');
my $vb = RDF::Query::VariableBindings->new( {
$name => $lit,
'COUNT(*)' => $lit, # this has to be kept around in case a HAVING clause needs it without the alias $name
} );
};
my $iter = RDF::Trine::Iterator::Bindings->new( $code, [] );
return RDF::Query::Plan::Iterator->new( $iter );
}
}
}
}
}
}
}
############################################################################
my ($project);
my $constant = delete $args{ constants };
if ($algebra->isa('RDF::Query::Algebra::Sort') or not($algebra->is_solution_modifier)) {
# projection has to happen *after* sorting, since a sort expr might reference a variable that we project away
$project = delete $args{ project };
}
my @return_plans;
my $aclass = ref($algebra);
my ($type) = ($aclass =~ m<::(\w+)$>);
if ($type eq 'Aggregate') {
my @base = $self->generate_plans( $algebra->pattern, $context, %args );
my @groups = $algebra->groupby;
my @ops;
foreach my $o ($algebra->ops) {
my ($alias, $op, $opts, @cols) = @$o;
push(@ops, [ $alias, $op, $opts, @cols ]);
}
my @plans = map { RDF::Query::Plan::Aggregate->new( $_, \@groups, expressions => \@ops ) } @base;
push(@return_plans, @plans);
} elsif ($type eq 'Construct') {
my $triples = $algebra->triples;
my @base = $self->generate_plans( $algebra->pattern, $context, %args );
my @plans = map { RDF::Query::Plan::Construct->new( $_, $triples ) } @base;
push(@return_plans, @plans);
} elsif ($type eq 'Distinct') {
my @base = $self->generate_plans( $algebra->pattern, $context, %args );
my @plans = map { RDF::Query::Plan::Distinct->new( $_ ) } @base;
push(@return_plans, @plans);
} elsif ($type eq 'Filter') {
my @base = $self->generate_plans( $algebra->pattern, $context, %args, active_graph => $active_graph );
my $expr = $algebra->expr;
my @plans = map { RDF::Query::Plan::Filter->new( $expr, $_, $active_graph ) } @base;
push(@return_plans, @plans);
} elsif ($type eq 'BasicGraphPattern') {
my @triples = map {
($args{ prevent_distinguishing_bnodes })
? $_
: $_->distinguish_bnode_variables
} $algebra->triples;
my @normal_triples;
my @csg_triples;
foreach my $t (@triples) {
if (my @csg_plans = $self->_csg_plans( $context, $t )) {
push(@csg_triples, $t);
} else {
my @nodes = $t->nodes;
$t = RDF::Query::Algebra::Quad->new( @nodes[ 0..2 ], $active_graph );
# if (my $g = $args{ named_graph }) {
# my @nodes = $t->nodes;
# $t = RDF::Query::Algebra::Quad->new( @nodes[0..2], $g );
# }
push(@normal_triples, $t);
}
}
my @plans;
if (scalar(@normal_triples) == 0) {
my $v = RDF::Query::VariableBindings->new( {} );
my $plan = RDF::Query::Plan::Constant->new( $v );
push(@plans, $plan);
} elsif (scalar(@normal_triples) == 1) {
push(@plans, $self->generate_plans( @normal_triples, $context, %args ));
} else {
my $plan = RDF::Query::Plan::BasicGraphPattern->new( @normal_triples );
push(@plans, $plan);
}
if (@csg_triples) {
my @csg_plans;
foreach my $t (@csg_triples) {
push(@csg_plans, [ $self->generate_plans( $t, $context, %args ) ]);
}
my @join_types = RDF::Query::Plan::Join->join_classes( $config );
while (my $cps = shift(@csg_plans)) {
my @temp_plans = @plans;
@plans = ();
foreach my $p (@temp_plans) {
foreach my $cp (@$cps) {
foreach my $join_type (@join_types) {
my $plan = $join_type->new( $p, $cp, 0, {} );
push(@plans, $plan);
}
}
}
}
push(@return_plans, @plans);
} else {
push(@return_plans, @plans);
}
} elsif ($type eq 'GroupGraphPattern') {
my @input = $algebra->patterns();
my @patterns;
while (my $a = shift(@input)) {
if ($a->isa('RDF::Query::Algebra::Service')) {
if (scalar(@input) and $input[0]->isa('RDF::Query::Algebra::Service') and $a->endpoint->value eq $input[0]->endpoint->value) {
my $b = shift(@input);
if ($a->silent == $b->silent) {
my $p = RDF::Query::Algebra::GroupGraphPattern->new( map { $_->pattern } ($a, $b) );
my $s = RDF::Query::Algebra::Service->new( $a->endpoint, $p, $a->silent );
push(@patterns, $s);
next;
}
}
}
push(@patterns, $a);
}
my @plans;
if (scalar(@patterns) == 0) {
my $v = RDF::Query::VariableBindings->new( {} );
my $plan = RDF::Query::Plan::Constant->new( $v );
push(@plans, $plan);
} elsif (scalar(@patterns) == 1) {
push(@plans, $self->generate_plans( @patterns, $context, %args ));
} else {
push(@plans, map { $_->[0] } $self->_join_plans( $context, \@patterns, %args, method => 'patterns' ));
}
push(@return_plans, @plans);
} elsif ($type eq 'Limit') {
my @base = $self->generate_plans( $algebra->pattern, $context, %args );
my @plans = map { RDF::Query::Plan::Limit->new( $algebra->limit, $_ ) } @base;
push(@return_plans, @plans);
} elsif ($type eq 'NamedGraph') {
my @plans;
if ($algebra->graph->isa('RDF::Query::Node::Resource')) {
@plans = $self->generate_plans( $algebra->pattern, $context, %args, active_graph => $algebra->graph );
} else {
@plans = map { RDF::Query::Plan::NamedGraph->new( $algebra->graph, $_ ) } $self->generate_plans( $algebra->pattern, $context, %args, active_graph => $algebra->graph );
}
push(@return_plans, @plans);
} elsif ($type eq 'Offset') {
my @base = $self->generate_plans( $algebra->pattern, $context, %args );
my @plans = map { RDF::Query::Plan::Offset->new( $algebra->offset, $_ ) } @base;
push(@return_plans, @plans);
} elsif ($type eq 'Optional') {
# just like a BGP or GGP, but we have to pass the optional flag to the join constructor
my @patterns = ($algebra->pattern, $algebra->optional);
my @base_plans = map { [ $self->generate_plans( $_, $context, %args ) ] } @patterns;
my @join_types = RDF::Query::Plan::Join->join_classes( $config );
# XXX this is currently only considering left-deep trees. maybe it should produce all trees?
my @plans;
my $base_a = shift(@base_plans);
my $base_b = shift(@base_plans);
foreach my $i (0 .. $#{ $base_a }) {
foreach my $j (0 .. $#{ $base_b }) {
my $a = $base_a->[ $i ];
my $b = $base_b->[ $j ];
foreach my $join_type (@join_types) {
try {
my $plan = $join_type->new( $a, $b, 1, {} );
push( @plans, $plan );
} catch RDF::Query::Error::MethodInvocationError with {
# my $e = shift;
# warn "caught MethodInvocationError: " . Dumper($e);
};
}
}
}
push(@return_plans, @plans);
} elsif ($type eq 'Minus') {
my @patterns = ($algebra->pattern, $algebra->minus);
my @base_plans = map { [ $self->generate_plans( $_, $context, %args ) ] } @patterns;
my @plans;
my $base_a = shift(@base_plans);
my $base_b = shift(@base_plans);
foreach my $i (0 .. $#{ $base_a }) {
foreach my $j (0 .. $#{ $base_b }) {
my $a = $base_a->[ $i ];
my $b = $base_b->[ $j ];
my $plan = RDF::Query::Plan::Minus->new( $a, $b );
push( @plans, $plan );
}
}
push(@return_plans, @plans);
} elsif ($type eq 'Project') {
my $pattern = $algebra->pattern;
my $vars = $algebra->vars;
my @base = $self->generate_plans( $pattern, $context, %args );
if ($constant) {
# if there's constant data to be joined, we better do it now in case
# the project gets rid of variables needed for the join
my @plans = splice( @base );
@base = $self->_add_constant_join( $context, $constant, @plans );
$constant = undef;
}
my @plans;
foreach my $plan (@base) {
push(@return_plans, RDF::Query::Plan::Project->new( $plan, $vars ));
}
push(@return_plans, @plans);
} elsif ($type eq 'Extend') {
my $pattern = $algebra->pattern;
my $vars = $algebra->vars;
my @base = $self->generate_plans( $pattern, $context, %args );
my @plans;
foreach my $plan (@base) {
push(@plans, RDF::Query::Plan::Extend->new( $plan, $vars ));
}
push(@return_plans, @plans);
} elsif ($type eq 'Service') {
my $pattern = $algebra->pattern;
my @base = $self->generate_plans( $pattern, $context, %args );
my @plans;
foreach my $plan (@base) {
my $sparqlcb = sub {
my $row = shift;
my $p = $pattern;
if ($row) {
$p = $p->bind_variables( $row );
}
my $ns = $context->ns;
my $pstr = $p->as_sparql({namespaces => $ns}, '');
unless (substr($pstr, 0, 1) eq '{') {
$pstr = "{ $pstr }";
}
my $sparql = join("\n",
(map { sprintf("PREFIX %s: <%s>", ($_ eq '__DEFAULT__' ? '' : $_), $ns->{$_}) } (keys %$ns)),
sprintf("SELECT * WHERE %s", $pstr)
);
return $sparql;
};
# unless ($algebra->endpoint->can('uri_value')) {
# throw RDF::Query::Error::UnimplementedError (-text => "Support for variable-endpoint SERVICE blocks is not implemented");
# }
if (my $ggp = $algebra->lhs) {
my @lhs_base = $self->generate_plans( $ggp, $context, %args );
foreach my $lhs_plan (@lhs_base) {
my $splan = RDF::Query::Plan::Service->new( $algebra->endpoint, $plan, $algebra->silent, $sparqlcb, $lhs_plan );
push(@plans, $splan);
}
} else {
push(@plans, $PLAN_CLASSES{'service'}->new( $algebra->endpoint, $plan, $algebra->silent, $sparqlcb ));
}
}
push(@return_plans, @plans);
} elsif ($type eq 'SubSelect') {
my $query = $algebra->query;
my $model = $context->model;
my %pargs = %args;
my $ag = $args{ active_graph };
if (blessed($ag) and $ag->isa('RDF::Query::Node::Variable')) {
my %vars = map { $_ => 1 } $query->pattern->referenced_variables;
if ($vars{ $ag->name }) {
my $new_ag = RDF::Query::Node::Variable->new();
my ($pattern) = $query->pattern;
my $new_pattern = $pattern->bind_variables( { $ag->name => $new_ag } );
my $apattern = RDF::Query::Algebra::Extend->new(
$new_pattern,
[
RDF::Query::Expression::Alias->new( 'alias', $ag, $new_ag )
]
);
$query->{parsed}{triples} = [$apattern];
}
my ($plan) = $self->generate_plans( $query->pattern, $context, %args );
push(@return_plans, RDF::Query::Plan::SubSelect->new( $query, $plan ));
} else {
my ($plan) = $query->prepare( $context->model, planner_args => \%pargs );
push(@return_plans, RDF::Query::Plan::SubSelect->new( $query, $plan ));
}
} elsif ($type eq 'Sort') {
my @base = $self->generate_plans( $algebra->pattern, $context, %args );
my @order = $algebra->orderby;
my @neworder;
foreach my $o (@order) {
my ($dirname, $expr) = @$o;
my $dir = ($dirname eq 'ASC') ? 0 : 1;
push(@neworder, [$expr, $dir]);
}
my @plans = map { RDF::Query::Plan::Sort->new( $_, @neworder ) } @base;
push(@return_plans, @plans);
} elsif ($type eq 'Triple' or $type eq 'Quad') {
my $st;
if ($args{ prevent_distinguishing_bnodes }) {
$st = $algebra;
} else {
$st = $algebra->distinguish_bnode_variables;
}
my $pred = $st->predicate;
my @nodes = $st->nodes;
if (my @csg_plans = $self->_csg_plans( $context, $st )) {
push(@return_plans, @csg_plans);
} elsif ($type eq 'Triple') {
my $plan = RDF::Query::Plan::Quad->new( @nodes[0..2], $active_graph, { sparql => $algebra->as_sparql, bf => $algebra->bf } );
push(@return_plans, $plan);
} else {
my $plan = (scalar(@nodes) == 4)
? RDF::Query::Plan::Quad->new( @nodes, { sparql => $algebra->as_sparql } )
: RDF::Query::Plan::Quad->new( @nodes, RDF::Trine::Node::Nil->new(), { sparql => $algebra->as_sparql, bf => $algebra->bf } );
push(@return_plans, $plan);
}
} elsif ($type eq 'Path') {
my @plans = $self->_path_plans( $algebra, $context, %args );
push(@return_plans, @plans);
} elsif ($type eq 'Union') {
my @plans = map { [ $self->generate_plans( $_, $context, %args ) ] } $algebra->patterns;
my $plan = RDF::Query::Plan::Union->new( map { $_->[0] } @plans );
push(@return_plans, $plan);
} elsif ($type eq 'Sequence') {
my @pat = $algebra->patterns;
if (@pat) {
my @plans = map { [ $self->generate_plans( $_, $context, %args ) ] } @pat;
my $plan = RDF::Query::Plan::Sequence->new( map { $_->[0] } @plans );
push(@return_plans, $plan);
} else {
my $stream = RDF::Trine::Iterator::Bindings->new( sub {} );
push(@return_plans, $stream);
}
} elsif ($type eq 'Load') {
push(@return_plans, RDF::Query::Plan::Load->new( $algebra->url, $algebra->graph ));
} elsif ($type eq 'Update') {
my $ds = $algebra->dataset || {};
my $default = $ds->{'default'} || [];
my $named = $ds->{'named'} || {};
my $dcount = scalar(@$default);
my $ncount = scalar(@{[ keys %$named ]});
# warn 'Update dataset: ' . Dumper($algebra->dataset);
my @plans;
my @dataset = ($ds);
if ($dcount == 1 and $ncount == 0) {
# if it's just a single named graph to be used as the default graph,
# then rewrite the pattern to use the named graph (and check to make
# sure there aren't any GRAPH blocks)
@dataset = ();
@plans = $self->generate_plans( $algebra->pattern, $context, %args, active_graph => $default->[0] );
} elsif ($dcount == 0 and $ncount == 0) {
@dataset = ();
@plans = $self->generate_plans( $algebra->pattern, $context, %args );
} else {
@plans = $self->generate_plans( $algebra->pattern, $context, %args );
}
foreach my $p (@plans) {
push(@return_plans, RDF::Query::Plan::Update->new( $algebra->delete_template, $algebra->insert_template, $p, @dataset ));
}
} elsif ($type eq 'Clear') {
push(@return_plans, RDF::Query::Plan::Clear->new( $algebra->graph ));
} elsif ($type eq 'Create') {
my $plan = RDF::Query::Plan::Constant->new();
push(@return_plans, $plan);
} elsif ($type eq 'Copy') {
my $plan = RDF::Query::Plan::Copy->new( $algebra->from, $algebra->to, $algebra->silent );
push(@return_plans, $plan);
} elsif ($type eq 'Move') {
my $plan = RDF::Query::Plan::Move->new( $algebra->from, $algebra->to, $algebra->silent );
push(@return_plans, $plan);
} elsif ($type eq 'Table') {
my $plan = RDF::Query::Plan::Constant->new( $algebra->rows );
push(@return_plans, $plan);
} else {
throw RDF::Query::Error::MethodInvocationError (-text => "Cannot generate an execution plan for unknown algebra class $aclass");
}
if ($constant and scalar(@$constant)) {
my @plans = splice( @return_plans );
@return_plans = $self->_add_constant_join( $context, $constant, @plans );
}
foreach my $p (@return_plans) {
Carp::confess 'not a plan: ' . Dumper($p) unless ($p->isa('RDF::Query::Plan'));
$p->label( algebra => $algebra );
}
unless (scalar(@return_plans)) {
throw RDF::Query::Error::CompilationError (-text => "Cannot generate an execution plan for algebra of type $type", -object => $algebra);
}
return @return_plans;
}
sub _csg_plans {
my $self = shift;
my $context = shift;
my $st = shift;
my $pred = $st->predicate;
return unless (blessed($context));
my $query = $context->query;
my @return_plans;
if (blessed($query) and $pred->isa('RDF::Trine::Node::Resource') and scalar(@{ $query->get_computed_statement_generators( $st->predicate->uri_value ) })) {
my $csg = $query->get_computed_statement_generators( $pred->uri_value );
my @nodes = $st->nodes;
my $quad = (scalar(@nodes) == 4) ? 1 : 0;
my $mp = RDF::Query::Plan::ComputedStatement->new( @nodes[0..3], $quad );
push(@return_plans, $mp);
}
return @return_plans;
}
sub _join_plans {
my $self = shift;
my $context = shift;
my $triples = shift;
my %args = @_;
my $config = $context->options || {};
my $method = $args{ method };
my @join_types = RDF::Query::Plan::Join->join_classes( $config );
my @plans;
my $opt = $context->optimize;
my @slice = ($opt) ? (0 .. $#{ $triples }) : (0);
foreach my $i (@slice) {
my @triples = @$triples;
# pick a triple to use as the LHS
my ($t) = splice( @triples, $i, 1 );
my @_lhs = $self->generate_plans( $t, $context, %args );
my @lhs_plans = map { [ $_, [$t] ] } @_lhs;
if (@triples) {
my @rhs_plans = $self->_join_plans( $context, \@triples, %args );
foreach my $i (0 .. $#lhs_plans) {
foreach my $j (0 .. $#rhs_plans) {
my $a = $lhs_plans[ $i ][0];
my $b = $rhs_plans[ $j ][0];
my $algebra_a = $lhs_plans[ $i ][1];
my $algebra_b = $rhs_plans[ $j ][1];
Carp::confess 'no lhs for join: ' . Dumper(\@lhs_plans) unless (blessed($a));
Carp::confess 'no rhs for join: ' . Dumper(\@triples, \@rhs_plans) unless (blessed($b));
foreach ($algebra_a, $algebra_b) {
unless (ref($_) and reftype($_) eq 'ARRAY') {
Carp::cluck Dumper($_)
}
}
foreach my $join_type (@join_types) {
next if ($join_type eq 'RDF::Query::Plan::Join::PushDownNestedLoop' and $b->subplans_of_type('RDF::Query::Plan::Service'));
try {
my @algebras;
foreach ($algebra_a, $algebra_b) {
if (reftype($_) eq 'ARRAY') {
push(@algebras, @$_);
}
}
my %logging_keys;
if ($method eq 'triples') {
my $bgp = RDF::Query::Algebra::BasicGraphPattern->new( @algebras );
my $sparql = $bgp->as_sparql;
my $bf = $bgp->bf;
$logging_keys{ bf } = $bf;
$logging_keys{ sparql } = $sparql;
} else {
my $ggp = RDF::Query::Algebra::GroupGraphPattern->new( @algebras );
my $sparql = $ggp->as_sparql;
$logging_keys{ sparql } = $sparql;
}
my $plan = $join_type->new( $b, $a, 0, \%logging_keys );
push( @plans, [ $plan, [ @algebras ] ] );
} catch RDF::Query::Error::MethodInvocationError with {
# warn "caught MethodInvocationError.";
};
}
}
}
} else {
@plans = @lhs_plans;
}
}
if ($opt) {
return @plans;
} else {
if (@plans) {
return $plans[0]; # XXX need to figure out what's the 'best' plan here
} else {
return;
}
}
}
sub _add_constant_join {
my $self = shift;
my $context = shift;
my $constant = shift;
my @return_plans = @_;
my $config = $context->options || {};
my @join_types = RDF::Query::Plan::Join->join_classes( $config );
while (my $const = shift(@$constant)) {
my @plans = splice(@return_plans);
foreach my $p (@plans) {
foreach my $join_type (@join_types) {
try {
my $plan = $join_type->new( $p, $const );
push( @return_plans, $plan );
} catch RDF::Query::Error::MethodInvocationError with {
# warn "caught MethodInvocationError.";
};
}
}
}
return @return_plans;
}
sub _path_plans {
my $self = shift;
my $algebra = shift;
my $context = shift;
my %args = @_;
my $path = $algebra->path;
my $start = $algebra->start;
my $end = $algebra->end;
for ($start, $end) {
if ($_->isa('RDF::Query::Node::Blank')) {
$_ = $_->make_distinguished_variable;
}
}
my $npath = $self->_normalize_path( $path );
return $self->__path_plan( $start, $npath, $end, $args{ active_graph }, $context, %args );
}
sub _normalize_path {
my $self = shift;
my $path = shift;
if (blessed($path)) {
return $path;
}
my $op = $path->[0];
my @nodes = map { $self->_normalize_path($_) } @{ $path }[ 1 .. $#{ $path } ];
if ($op eq '0-') {
$op = '*';
} elsif ($op eq '1-') {
$op = '+';
} elsif ($op eq '0-1') {
$op = '?';
} elsif ($op =~ /^-\d+$/) {
$op = "0$op";
}
if ($op eq '!') {
# re-order the nodes so that forward predicates come first, followed by backwards predicates
# !(:fwd1|:fwd2|:fwd3|^:bkw1|^:bkw2|^:bkw3)
@nodes = sort { blessed($a) ? -1 : (($a->[0] eq '^') ? 1 : -1) } @nodes;
}
return [$op, @nodes];
}
sub __path_plan {
my $self = shift;
my $start = shift;
my $path = shift;
my $end = shift;
my $graph = shift;
my $context = shift;
my %args = @_;
my $distinct = 1; #$args{distinct} ? 1 : 0;
my $config = $context->options || {};
my $l = Log::Log4perl->get_logger("rdf.query.plan.path");
# _simple_path will return an algebra object if the path can be expanded
# into a simple basic graph pattern (for fixed-length paths)
if (my $a = $self->_simple_path( $start, $path, $end, $graph )) {
my ($plan) = $self->generate_plans( $a, $context, %args, prevent_distinguishing_bnodes => 1 );
$l->trace('expanded path to pattern: ' . $plan->sse);
return $plan;
}
if (blessed($path)) {
### X iri Y
# $path is a resource object: this is a triple (a path of length 1)
my $s = $start;
my $e = $end;
my $algebra = $graph
? RDF::Query::Algebra::Quad->new( $s, $path, $e, $graph )
: RDF::Query::Algebra::Triple->new( $s, $path, $e );
my ($plan) = $self->generate_plans( $algebra, $context, %args, prevent_distinguishing_bnodes => 1 );
$l->trace('expanded path to pattern: ' . $plan->sse);
return $plan;
}
my ($op, @nodes) = @$path;
# if ($op eq 'DISTINCT') {
# return $self->__path_plan( $start, $nodes[0], $end, $graph, $context, %args, distinct => 1 );
# }
if ($op eq '!') {
my $total = scalar(@nodes);
my $neg = scalar(@{ [ grep { not(blessed($_)) and $_->[0] eq '^' } @nodes ] });
my $pos = $total - $neg;
if ($pos == $total) {
### X !(:iri1|...|:irin) Y
return RDF::Query::Plan::Path->new( 'NegatedPropertySet', $start, [@nodes], $end, $graph, $distinct, %args );
} elsif ($neg == $total) {
### X !(^:iri1|...|^:irin)Y
my @preds = map { $_->[1] } @nodes;
return $self->__path_plan($start, ['^', ['!', @preds]], $end, $graph, $context, %args);
} else {
### X !(:iri1|...|:irii|^:irii+1|...|^:irim) Y
my @fwd = grep { blessed($_) } @nodes;
my @bwd = grep { not(blessed($_)) } @nodes;
my $fplan = $self->__path_plan($start, ['!', @fwd], $end, $graph, $context, %args);
my $bplan = $self->__path_plan($start, ['!', @bwd], $end, $graph, $context, %args);
return RDF::Query::Plan::Union->new($fplan, $bplan);
}
} elsif ($op eq '^') {
### X ^path Y
return $self->__path_plan( $end, $nodes[0], $start, $graph, $context, %args);
} elsif ($op eq '/') {
my $count = scalar(@nodes);
if ($count == 1) {
return $self->__path_plan( $start, $nodes[0], $end, $graph, $context, %args );
} else {
my $joinvar = RDF::Query::Node::Variable->new();
my @plans = $self->__path_plan( $start, $nodes[0], $joinvar, $graph, $context, %args );
foreach my $i (2 .. $count) {
my $endvar = ($i == $count) ? $end : RDF::Query::Node::Variable->new();
my ($rhs) = $self->__path_plan( $joinvar, $nodes[$i-1], $endvar, $graph, $context, %args );
push(@plans, $rhs);
$joinvar = $endvar;
}
my @join_types = RDF::Query::Plan::Join->join_classes( $config );
my @jplans;
foreach my $jclass (@join_types) {
push(@jplans, $jclass->new( @plans[0,1], 0 ));
}
$l->trace("expanded /-path to: " . $jplans[0]->sse);
return $jplans[0];
}
} elsif ($op eq '|') {
### X path1 | path2 Y
my @plans = map { $self->__path_plan($start, $_, $end, $graph, $context, %args) } @nodes;
return RDF::Query::Plan::Union->new(@plans);
} elsif ($op eq '?') {
### X path? Y
my $upath = $nodes[0];
my $zplan = $self->__path_plan($start, ['0', $upath], $end, $graph, $context, %args );
my $oplan = $self->__path_plan($start, $upath, $end, $graph, $context, %args);
# project away any non-distinguished variables introduced by plan-to-bgp expansion
my @vars = grep { blessed($_) and $_->isa('RDF::Query::Node::Variable') } ($start, $end);
my $odplan = RDF::Query::Plan::Project->new( $oplan, \@vars );
my $pplan = RDF::Query::Plan::Union->new($zplan, $odplan);
# distinct the results
my $plan = RDF::Query::Plan::Distinct->new( $pplan );
return $plan;
} elsif ($op eq '*') {
### X path* Y
return RDF::Query::Plan::Path->new( 'ZeroOrMorePath', $start, $nodes[0], $end, $graph, $distinct, %args );
} elsif ($op eq '+') {
### X path+ Y
return RDF::Query::Plan::Path->new( 'OneOrMorePath', $start, $nodes[0], $end, $graph, $distinct, %args );
} elsif ($op eq '0') {
### X path{0} Y
return RDF::Query::Plan::Path->new( 'ZeroLengthPath', $start, $nodes[0], $end, $graph, $distinct, %args );
} elsif ($op =~ /^\d+$/) {
### X path{n} Y where n > 0
my $count = $op;
if ($count == 1) {
return $self->__path_plan( $start, $nodes[0], $end, $graph, $context, %args );
} else {
my $joinvar = RDF::Query::Node::Variable->new();
my @plans = $self->__path_plan( $start, $nodes[0], $joinvar, $graph, $context, %args );
foreach my $i (2 .. $count) {
my $endvar = ($i == $count) ? $end : RDF::Query::Node::Variable->new();
my ($rhs) = $self->__path_plan( $joinvar, $nodes[0], $endvar, $graph, $context, %args );
push(@plans, $rhs);
$joinvar = $endvar;
}
my @join_types = RDF::Query::Plan::Join->join_classes( $config );
my @jplans;
my @plan = shift(@plans);
while (@plans) {
my $q = shift(@plans);
my @p;
foreach my $p (@plan) {
foreach my $jclass (@join_types) {
push(@p, $jclass->new( $p, $q, 0 ));
}
}
@plan = @p;
}
return $plan[0];
}
} elsif ($op =~ /^(\d+)-(\d+)$/) {
### X path{n,m} Y
my ($n,$m) = split('-', $op, 2);
# warn "$1- to $2-length path";
my @range = sort { $a <=> $b } ($n, $m);
my $from = $range[0];
my $to = $range[1];
my @plans;
foreach my $i ($from .. $to) {
if ($i == 0) {
push(@plans, $self->__path_plan($start, ['0', []], $end, $graph, $context, %args ));
} else {
push(@plans, $self->__path_plan( $start, [$i, $nodes[0]], $end, $graph, $context, %args ));
}
}
while (scalar(@plans) > 1) {
my $lhs = shift(@plans);
my $rhs = shift(@plans);
unshift(@plans, RDF::Query::Plan::Union->new( $lhs, $rhs ));
}
return $plans[0];
} elsif ($op =~ /^(\d+)-$/) {
### X path{n,} Y where n > 0
my ($min) = split('-', $op);
# expand :p{n,} into :p{n}/:p*
my $path = [ '/', [ $1, @nodes ], [ '*', @nodes ] ];
my $plan = $self->__path_plan( $start, $path, $end, $graph, $context, %args );
return $plan;
} else {
throw RDF::Query::Error -text => "Cannot generate plan for unknown path type $op";
}
}
sub _simple_path {
my $self = shift;
my $start = shift;
my $path = shift;
my $end = shift;
my $graph = shift;
if (blessed($path)) {
return ($graph)
? RDF::Query::Algebra::Quad->new( $start, $path, $end, $graph )
: RDF::Query::Algebra::Triple->new( $start, $path, $end );
}
return unless (reftype($path) eq 'ARRAY');
my $op = $path->[0];
if ($op eq '/') {
my @patterns;
my @jvars = map { RDF::Query::Node::Variable->new() } (2 .. $#{ $path });
foreach my $i (1 .. $#{ $path }) {
my $s = ($i == 1) ? $start : $jvars[ $i-2 ];
my $e = ($i == $#{ $path }) ? $end : $jvars[ $i-1 ];
my $triple = $self->_simple_path( $s, $path->[ $i ], $e, $graph );
return unless ($triple);
push(@patterns, $triple);
}
my @triples = map { $_->isa('RDF::Query::Algebra::BasicGraphPattern') ? $_->triples : $_ } @patterns;
return RDF::Query::Algebra::BasicGraphPattern->new( @triples );
} elsif ($op eq '^' and scalar(@$path) == 2 and blessed($path->[1])) {
return ($graph)
? RDF::Query::Algebra::Quad->new( $end, $path->[1], $start, $graph )
: RDF::Query::Algebra::Triple->new( $end, $path->[1], $start );
} elsif ($op =~ /^\d+$/ and $op == 1) {
return $self->_simple_path( $start, $path->[1], $end, $graph );
}
return;
}
=item C<< plan_node_name >>
Returns the string name of this plan node, suitable for use in serialization.
=cut
sub plan_node_name;
=item C<< plan_prototype >>
Returns a list of scalar identifiers for the type of the content (children)
nodes of this plan node. These identifiers are recognized:
* 'A' - An RDF::Query::Algebra object
* 'b' - A boolean integer value (0 or 1)
* 'E' - An expression (either an RDF::Query::Expression object or an RDF node)
* 'i' - An integer
* 'J' - A valid Project node (an RDF::Query::Expression object or an Variable node)
* 'N' - An RDF node
* 'P' - A RDF::Query::Plan object
* 'q' - A RDF::Query object
* 'Q' - An RDF::Trine::Statement::Quad object
* 's' - A string
* 'T' - An RDF::Trine::Statement object
* 'u' - A valid URI string
* 'V' - A variable binding set (an object of type RDF::Query::VariableBindings)
* 'w' - A bareword string
* 'W' - An RDF node or wildcard ('*')
* '*X' - A list of X nodes (where X is another identifier scalar)
* '\X' - An array reference of X nodes (where X is another identifier scalar)
=cut
sub plan_prototype;
=item C<< plan_node_data >>
Returns the data for this plan node that corresponds to the values described by
the signature returned by C<< plan_prototype >>.
=cut
sub plan_node_data;
=item C<< subplans_of_type ( $type [, $block] ) >>
Returns a list of Plan objects matching C<< $type >> (tested with C<< isa >>).
If C<< $block >> is given, then matching stops descending a subtree if the current
node is of type C<< $block >>, continuing matching on other subtrees.
This list includes the current plan object if it matches C<< $type >>, and is
generated in infix order.
=cut
sub subplans_of_type {
my $self = shift;
my $type = shift;
my $block = shift;
return if ($block and $self->isa($block));
my @patterns;
push(@patterns, $self) if ($self->isa($type));
foreach my $p ($self->plan_node_data) {
if (blessed($p) and $p->isa('RDF::Query::Plan')) {
push(@patterns, $p->subplans_of_type($type, $block));
}
}
return @patterns;
}
1;
__END__
=back
=head1 AUTHOR
Gregory Todd Williams
=cut
RDF-Query-2.919/lib/RDF/Query/PaxHeader/ServiceDescription.pm 000644 000765 000024 00000000225 14607236076 023756 x ustar 00greg staff 000000 000000 30 mtime=1713191998.307541029
64 LIBARCHIVE.xattr.com.apple.TextEncoding=VVRGLTg7MTM0MjE3OTg0
55 SCHILY.xattr.com.apple.TextEncoding=UTF-8;134217984
RDF-Query-2.919/lib/RDF/Query/ServiceDescription.pm 000644 000765 000024 00000033531 14607236076 022013 0 ustar 00greg staff 000000 000000 # RDF::Query::ServiceDescription
# -----------------------------------------------------------------------------
=head1 NAME
RDF::Query::ServiceDescription - Class for describing federated query data sources.
=head1 VERSION
This document describes RDF::Query::ServiceDescription version 2.919.
=head1 METHODS
=over 4
=cut
package RDF::Query::ServiceDescription;
our ($VERSION);
BEGIN {
$VERSION = '2.919';
}
use strict;
use warnings;
no warnings 'redefine';
use URI::file;
use RDF::Trine::Iterator qw(smap swatch);
use Scalar::Util qw(blessed);
use LWP::UserAgent;
use Data::Dumper;
=item C<< new ( $service_uri, %data ) >>
=cut
sub new {
my $class = shift;
my $uri = shift;
my %data = @_;
unless ($data{capabilities}) {
$data{capabilities} = [ { type => RDF::Query::Node::Resource->new('http://kasei.us/2008/04/sparql#any_triple') } ];
}
my $data = {
url => $uri,
label => "SPARQL Endpoint $uri",
definitive => 0,
%data,
};
my $self = bless( $data, $class );
return $self;
}
=item C<< new_from_uri ( $url ) >>
Creates a new service description object using the DARQ-style service description
data located at C<< $url >>.
=cut
sub new_from_uri {
my $class = shift;
my $uri = shift;
my $ua = LWP::UserAgent->new( agent => "RDF::Query/$RDF::Query::VERSION" );
$ua->default_headers->push_header( 'Accept' => "application/rdf+xml;q=0.5,text/turtle;q=0.7,text/xml" );
my $resp = $ua->get( $uri );
unless ($resp->is_success) {
warn "No content available from $uri: " . $resp->status_line;
return;
}
my $content = $resp->content;
my $store = RDF::Trine::Store::DBI->temporary_store();
my $model = RDF::Trine::Model->new( $store );
my $parser = RDF::Trine::Parser->new('turtle');
$parser->parse_into_model( $uri, $content, $model );
return $class->new_with_model( $model );
}
=item C<< new_with_model ( $model ) >>
Creates a new service description object using the DARQ-style service description
data loaded in the supplied C<< $model >> object.
=cut
sub new_with_model {
my $class = shift;
my $model = shift;
my ($label, $url, $triples, $definitive, @capabilities, @patterns);
my $l = Log::Log4perl->get_logger("rdf.query.servicedescription");
my $infoquery = RDF::Query->new( <<"END" );
PREFIX rdf:
PREFIX rdfs:
PREFIX foaf:
PREFIX xsd:
PREFIX sd:
SELECT ?label ?url ?size ?def
WHERE {
?s a sd:Service ;
rdfs:label ?label ;
sd:url ?url .
OPTIONAL { ?s sd:totalTriples ?size . FILTER( ISLITERAL(?size) ) }
OPTIONAL { ?s sd:isDefinitive ?def . FILTER( ISLITERAL(?def) ) }
FILTER( ISLITERAL(?label) && ISURI(?url) ).
}
LIMIT 1
END
($label, $url, $triples, my $def) = $infoquery->get( $model );
return undef unless (defined $label);
$definitive = (defined($def) ? ($def->literal_value eq 'true' ? 1 : 0) : 0);
{
my $capquery = RDF::Query->new( <<"END" );
PREFIX rdf:
PREFIX rdfs:
PREFIX foaf:
PREFIX xsd:
PREFIX sd:
PREFIX sparql: