NAME
RDF::aREF::Query - aREF query expression
SYNOPSIS
my $rdf = {
'http://example.org/book' => {
dct_creator => [
'http://example.org/alice',
'http://example.org/bob'
]
},
'http://example.org/alice' => {
foaf_name => "Alice"
},
'http://example.org/bob' => {
foaf_name => "Bob"
}
};
my $getnames = RDF::aREF::Query->new(
query => 'dct_creator.foaf_name'
);
my @names = $getnames->apply( $rdf, 'http://example.org/boo' );
DESCRIPTION
Implements aREF query, a query language to access strings and nodes from agiven RDF graph.
See also function aref_query
in RDF::aREF.
CONFIGURATION
The constructor expects the following options:
- query
-
aREF query expression
- decoder
-
Instance of RDF::aREF::Decoder (a new instance is created unless given)
- ns
-
Optional namespace map, passed to the constructor of RDF::aREF::Decoder. This option is ignored if option
decoder
was supplied.
METHODS
apply( $rdf [, $origin ] )
Perform the query on a given RDF graph. The origin node must be provided as string unless the RDF graph is provided as predicate map.