1Attean::API::Binding(3)User Contributed Perl DocumentatioAnttean::API::Binding(3)
2
3
4

NAME

6       Attean::API::Binding - Name to term bindings
7

VERSION

9       This document describes Attean::API::Binding version 0.033
10

DESCRIPTION

12       The Attean::API::Binding role defines a common API for all objects that
13       map names to Attean::API::Term objects. This includes triples, quads,
14       and SPARQL results (variable bindings).
15

REQUIRED METHODS

17       Classes consuming this role must provide the following methods:
18
19       "value( $name )"
20           Returns the Attean::API::Term object mapped to the variable named
21           $name, or "undef" if no such term is mapped.
22
23       "variables"
24           Returns a list of the variable names mapped to Attean::API::Term
25           objects in this mapping.
26
27       "apply_map( $mapper )"
28           Returns a new mapping object (of the same class as the referent)
29           with term objects rewritten using the supplied Attean::Mapper
30           object $mapper.
31

METHODS

33       This role provides default implementations of the following methods:
34
35       "mapping"
36           Returns a HASH mapping variable names to Attean::API::Term objects.
37
38       "values"
39           Returns a list of Attean::API::Term objects corresponding to the
40           variable names returned by the referent's "variables" method.
41
42       "tuples_string"
43           Returns a string serialization of the Attean::API::Term objects in
44           the order they are returned by the referent's "values" method.
45
46       "as_string"
47           Returns a string serialization of the variable bindings.
48
49       "has_blanks"
50           Returns true if any variable is bound to an Attean::API::Blank
51           term, false otherwise.
52
53       "sameTerms( $other )"
54       "equals( $other )"
55       "blanks"
56           Returns all the values in this mapping (recursively, if any values
57           are embedded bindings) that are blank nodes.
58
59       "referenced_variables"
60           Returns a list of the names of any variable values that are
61           referenced in this binding (recursively, if any values are embedded
62           bindings).
63
64       "is_ground"
65           Returns tue is all the bound values consume Attean::API::Term,
66           false otherwise.
67
68       "values_consuming_role( $role )"
69           Returns the list of bound values that consume $role.
70
71       "tree_attributes"
72           Returns the variables which are bound in this object.
73
74       "apply_bindings( $binding )"
75           Construct a new binding by replacing variables with their bound
76           values from $binding.
77
78       "parse ( $string )"
79           Returns a triple or quad pattern object using the variables and/or
80           terms parsed from $string in SPARQL syntax.
81
82       "project( @keys )"
83           Returns a new Attean::Result binding which contains variable-value
84           mappings from the invocant for every variable name in @keys.
85

BUGS

87       Please report any bugs or feature requests to through the GitHub web
88       interface at <https://github.com/kasei/attean/issues>.
89

SEE ALSO

AUTHOR

92       Gregory Todd Williams  "<gwilliams@cpan.org>"
93
95       Copyright (c) 2014--2022 Gregory Todd Williams.  This program is free
96       software; you can redistribute it and/or modify it under the same terms
97       as Perl itself.
98
99
100
101perl v5.36.0                      2022-10-03           Attean::API::Binding(3)
Impressum