.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Attean::API::Binding 3pm" .TH Attean::API::Binding 3pm "2022-10-06" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Attean::API::Binding \- Name to term bindings .SH "VERSION" .IX Header "VERSION" This document describes Attean::API::Binding version 0.033 .SH "DESCRIPTION" .IX Header "DESCRIPTION" The Attean::API::Binding role defines a common \s-1API\s0 for all objects that map names to Attean::API::Term objects. This includes triples, quads, and \&\s-1SPARQL\s0 results (variable bindings). .SH "REQUIRED METHODS" .IX Header "REQUIRED METHODS" Classes consuming this role must provide the following methods: .ie n .IP """value( $name )""" 4 .el .IP "\f(CWvalue( $name )\fR" 4 .IX Item "value( $name )" Returns the Attean::API::Term object mapped to the variable named \f(CW$name\fR, or \f(CW\*(C`undef\*(C'\fR if no such term is mapped. .ie n .IP """variables""" 4 .el .IP "\f(CWvariables\fR" 4 .IX Item "variables" Returns a list of the variable names mapped to Attean::API::Term objects in this mapping. .ie n .IP """apply_map( $mapper )""" 4 .el .IP "\f(CWapply_map( $mapper )\fR" 4 .IX Item "apply_map( $mapper )" Returns a new mapping object (of the same class as the referent) with term objects rewritten using the supplied Attean::Mapper object \f(CW$mapper\fR. .SH "METHODS" .IX Header "METHODS" This role provides default implementations of the following methods: .ie n .IP """mapping""" 4 .el .IP "\f(CWmapping\fR" 4 .IX Item "mapping" Returns a \s-1HASH\s0 mapping variable names to Attean::API::Term objects. .ie n .IP """values""" 4 .el .IP "\f(CWvalues\fR" 4 .IX Item "values" Returns a list of Attean::API::Term objects corresponding to the variable names returned by the referent's \f(CW\*(C`variables\*(C'\fR method. .ie n .IP """tuples_string""" 4 .el .IP "\f(CWtuples_string\fR" 4 .IX Item "tuples_string" Returns a string serialization of the Attean::API::Term objects in the order they are returned by the referent's \f(CW\*(C`values\*(C'\fR method. .ie n .IP """as_string""" 4 .el .IP "\f(CWas_string\fR" 4 .IX Item "as_string" Returns a string serialization of the variable bindings. .ie n .IP """has_blanks""" 4 .el .IP "\f(CWhas_blanks\fR" 4 .IX Item "has_blanks" Returns true if any variable is bound to an Attean::API::Blank term, false otherwise. .ie n .IP """sameTerms( $other )""" 4 .el .IP "\f(CWsameTerms( $other )\fR" 4 .IX Item "sameTerms( $other )" .PD 0 .ie n .IP """equals( $other )""" 4 .el .IP "\f(CWequals( $other )\fR" 4 .IX Item "equals( $other )" .ie n .IP """blanks""" 4 .el .IP "\f(CWblanks\fR" 4 .IX Item "blanks" .PD Returns all the values in this mapping (recursively, if any values are embedded bindings) that are blank nodes. .ie n .IP """referenced_variables""" 4 .el .IP "\f(CWreferenced_variables\fR" 4 .IX Item "referenced_variables" Returns a list of the names of any variable values that are referenced in this binding (recursively, if any values are embedded bindings). .ie n .IP """is_ground""" 4 .el .IP "\f(CWis_ground\fR" 4 .IX Item "is_ground" Returns tue is all the bound values consume Attean::API::Term, false otherwise. .ie n .IP """values_consuming_role( $role )""" 4 .el .IP "\f(CWvalues_consuming_role( $role )\fR" 4 .IX Item "values_consuming_role( $role )" Returns the list of bound values that consume \f(CW$role\fR. .ie n .IP """tree_attributes""" 4 .el .IP "\f(CWtree_attributes\fR" 4 .IX Item "tree_attributes" Returns the variables which are bound in this object. .ie n .IP """apply_bindings( $binding )""" 4 .el .IP "\f(CWapply_bindings( $binding )\fR" 4 .IX Item "apply_bindings( $binding )" Construct a new binding by replacing variables with their bound values from \&\f(CW$binding\fR. .ie n .IP """parse ( $string )""" 4 .el .IP "\f(CWparse ( $string )\fR" 4 .IX Item "parse ( $string )" Returns a triple or quad pattern object using the variables and/or terms parsed from \f(CW$string\fR in \s-1SPARQL\s0 syntax. .ie n .IP """project( @keys )""" 4 .el .IP "\f(CWproject( @keys )\fR" 4 .IX Item "project( @keys )" Returns a new Attean::Result binding which contains variable-value mappings from the invocant for every variable name in \f(CW@keys\fR. .SH "BUGS" .IX Header "BUGS" Please report any bugs or feature requests to through the GitHub web interface at . .SH "SEE ALSO" .IX Header "SEE ALSO" .SH "AUTHOR" .IX Header "AUTHOR" Gregory Todd Williams \f(CW\*(C`\*(C'\fR .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2014\-\-2022 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.