NAME
RDF::Core::Function - a package of functions for query language.
DESCRIPTION
When there is a function found while evaluating query, its parameters are evaluated and passed to RDF::Core::Function apropriate piece of code. The code reference is obtained in a hash returned by getFunctions() call. Each function accepts RDF::Core::Literal or RDF::Core::Resource objects as paramaters and returns an array reference to objects of the same type.
There is a special parameter - a subject parameter, which says that a function is at position of property. For example:
subproperty(schema:SomeProperty)
has no subject parameter defined and returns property names that are subproperties of given schema:SomeProperty.
data:SomeObject.subproperty(schema:SomeProperty)
has subject parameter data:SomeObject and return values of subproperties for subject.
Interface
new(%options)
Available options are:
Data
RDF::Core::Model object that contains data to be queried.
Schema
RDF::Core::Model object that contains RDF schema.
Factory
RDF::Core::NodeFactory object, that produces resource and literal objects.
getFunctions
Returns a hash reference where each key is a name of a functions and value is a reference to an implementation code.
Functions implemented
subclass(X)
Not defined subject parameter:
Find all subclasses of X in Schema and return them if they have an instance in Data.
Defined subject parameter:
Result is not defined, dies.
subproperty(X)
Not defined subject parameter:
Find all subproperties of X in Schema and return them if they occur in Data.
Defined subject parameter:
Find all subproperties of X in Schema and return their values for subject, if found.
LICENSE
This package is subject to the MPL (or the GPL alternatively).
AUTHOR
Ginger Alliance, rdf@gingerall.cz
SEE ALSO
RDF::Core::Query