Attean::TermMap3pm
Mapping terms to new terms
Usage
use v5.14;use Attean;my $m = Attean::TermMap->short_blank_map;my $new_blank = $m->map( Attean::Blank->new('abcdefg') );say $new_blank->ntriples_string; # _:a
Version
This document describes Attean::TermMap version 0.035
Overview
The Attean::TermMap class represents a one-way mapping process from and to Attean::API::Term objects. This mapping may rename the blank identifiers, skolemize nodes, or map the nodes in some other, custom way.
It conforms to the Attean::API::Mapper role.
Attributes
- "mapper"
-
A CODE reference that will map Attean::API::Term objects to (possibly different) term objects.
Class methods
- "canonicalization_map"
-
Returns a new Attean::TermMap that canonicalizes recognized typed Attean::API::Literal values.
- "uuid_blank_map"
-
Returns a new Attean::TermMap that renames blank nodes with UUID values.
- "short_blank_map"
-
Returns a new Attean::TermMap that renames blank nodes with short alphabetic names (e.g. _:a, _:b).
- rewrite_map( \%map )
-
Given
%mapwhose keys are term"as_string"serializations, and objects are Attean::API::Term objects, returns a new term map object that maps terms matching entries in%map, and all other terms to themselves.
Methods
- map( $term )
-
Returns the term that is mapped to by the supplied
$term.
- "binding_mapper"
-
Returns a mapping function reference that maps Attean::API::Binding objects by mapping their constituent mapped Attean::API::Term objects.
Releases
6 releases since Debian 8 (Jessie); the text changed 5 times.