RDF::Q...iption(3pm)
π RDF::Query::ServiceDescription π
okay so bestie, welcome to the RDF::Q...iption(3pm) page β it lives in the User Contributed Perl Documentation section, and it's literally the whole glow-up guide for describing federated query data sources. yes that's a real thing and yes it's as iconic as it sounds π
β¨ VERSION β¨
this doc describes RDF::Query::ServiceDescription version 2.919. slay.
πΈ METHODS πΈ
new ( $service_uri, %data )
that's it. that's the description the manpage gave us. no notes, no elaboration, just vibes π (the constructor is doing constructor things, iykyk)
new_from_uri ( $url )
makes a whole new service description object for you, using the DARQ-style service description data sitting over at $url. like, it goes and fetches it, bestie π¦
new_with_model ( $model )
same energy as the one above, except instead of a URL it uses the DARQ-style service description data that's already loaded up inside the $model object you hand it. no fetching required β¨
url
hands you back the endpoint URL of the service. the actual address. the main character π
size
returns the number of triples the service claims to have. "claims" is doing a lot of heavy lifting in that sentence, bestie, but okay π
label
returns the label of the service. cute little name tag π
definitive
returns true if the endpoint claims to have definitive information. and if it doesn't claim that? you get false. iconic behaviour β
capabilities
returns an ARRAY reference of capabilities (as HASH references) of the service. each capability will contain information on size, selectivity, any subject-object filter, and required predicate, with these classes:
$capability->{object_selectivity} # RDF::Trine::Node::Literal xsd:double
$capability->{sofilter} # RDF::Query::Expression
$capability->{size} # RDF::Trine::Node::Literal xsd:integer
$capability->{pred} # RDF::Trine::Node::Resource
the way that struct is laid out... obsessed π
patterns
returns an ARRAY reference of RDF::Query::Algebra::BasicGraphPattern objects β these represent the common patterns the endpoint uses. it's giving "here's what I'm known for" π
computed_statement_generator
returns a closure that's appropriate for passing to RDF::Query->add_computed_statement_generator, so it can generate statement iterators for the remote service. very demure, very delegation π
this closure takes ($query, $bridge, \%bound, $subj, $pred, $obj [, $context ] ) as its arguments, and it returns either undef β if no statements can be generated given the arguments β or an RDF::Trine::Iterator::Graph iterator holding the statements matching $subj, $pred, $obj [, $context ]. two outcomes, one closure, no cap π«Ά
answers_triple_pattern ( $triple )
returns true if the service this object is describing can actually answer queries made up of the triple pattern you supplied. vibe check passed β
π AUTHOR π
Gregory Todd Williams <gwilliams@cpan.org>
that's the whole page bestie, you ate it π this was written against perl v5.40.1 and dated 2025-08-18 β go forth and describe those federated data sources, periodt ππ§
π¦ where this page comes from
- ubuntu resolute: librdf-query-perl 2.919-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: librdf-query-perl 2.919-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms