1Attean::TermMap(3) User Contributed Perl Documentation Attean::TermMap(3)
2
3
4
6 Attean::TermMap - Mapping terms to new terms
7
9 This document describes Attean::TermMap version 0.033
10
12 use v5.14;
13 use Attean;
14 my $m = Attean::TermMap->short_blank_map;
15 my $new_blank = $m->map( Attean::Blank->new('abcdefg') );
16 say $new_blank->ntriples_string; # _:a
17
19 The Attean::TermMap class represents a one-way mapping process from and
20 to Attean::API::Term objects. This mapping may rename the blank
21 identifiers, skolemize nodes, or map the nodes in some other, custom
22 way.
23
24 It conforms to the Attean::API::Mapper role.
25
27 "mapper"
28 A CODE reference that will map Attean::API::Term objects to
29 (possibly different) term objects.
30
32 "canonicalization_map"
33 Returns a new Attean::TermMap that canonicalizes recognized typed
34 Attean::API::Literal values.
35
36 "uuid_blank_map"
37 Returns a new Attean::TermMap that renames blank nodes with UUID
38 values.
39
40 "short_blank_map"
41 Returns a new Attean::TermMap that renames blank nodes with short
42 alphabetic names (e.g. _:a, _:b).
43
44 "rewrite_map( \%map )"
45 Given %map whose keys are term "as_string" serializations, and
46 objects are Attean::API::Term objects, returns a new term map
47 object that maps terms matching entries in %map, and all other
48 terms to themselves.
49
51 "map( $term )"
52 Returns the term that is mapped to by the supplied $term.
53
54 "binding_mapper"
55 Returns a mapping function reference that maps Attean::API::Binding
56 objects by mapping their constituent mapped Attean::API::Term
57 objects.
58
60 Please report any bugs or feature requests to through the GitHub web
61 interface at <https://github.com/kasei/attean/issues>.
62
65 Gregory Todd Williams "<gwilliams@cpan.org>"
66
68 Copyright (c) 2014--2022 Gregory Todd Williams. This program is free
69 software; you can redistribute it and/or modify it under the same terms
70 as Perl itself.
71
72
73
74perl v5.36.0 2022-10-03 Attean::TermMap(3)