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