1Attean::API::MutableModUesle(r3)Contributed Perl DocumenAttatteiaonn::API::MutableModel(3)
2
3
4

NAME

6       Attean::API::MutableModel - Role representing mutable models
7

VERSION

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

SYNOPSIS

12         use v5.14;
13         use Attean;
14

DESCRIPTION

16       This is a Moo role that mutable models consume. It defines the required
17       methods for updating data, and provides default functionality.
18

ROLES

20       This role consumes the Attean::API::Model role.
21

REQUIRED METHODS

23       Classes consuming this role must provide the following methods:
24
25       "add_quad( $quad )"
26           Adds the Attean::API::Quad $quad to the model.
27
28       "remove_quad( $quad )"
29           Removes the Attean::API::Quad $quad from the model.
30
31       "create_graph( $graph )"
32           Creates a new, empty graph in the model with the
33           Attean::API::BlankOrIRI identifier $graph. If the model does not
34           support empty graphs, this operation may be a no-op.
35
36       "drop_graph( $graph )"
37           Removes the graph in the model with the Attean::API::BlankOrIRI
38           identifier $graph.
39
40       "clear_graph( $graph )"
41           Removes all quads that belong to the graph in the model with the
42           Attean::API::BlankOrIRI identifier $graph. If the model does not
43           support empty graphs, this operation may be an alias for
44           "drop_graph( $graph )".
45

METHODS

47       This role provides default implementations of the following methods:
48
49       "load_triples( $format, $graph => $data )"
50           Parses the serialized triples contained in the string $data using
51           the $format parser (see "get_parser" in Attean). Triples resulting
52           from parsing are turned into quads using the $graph identifier, and
53           added to the model.
54
55       "load_triples_from_io( $format, $graph => $data )"
56           Parses the serialized triples read from the filehandle $io using
57           the $format parser (see "get_parser" in Attean). Triples resulting
58           from parsing are turned into quads using the $graph identifier, and
59           added to the model.
60
61       "add_iter( $iter )"
62           Adds all the quads from the Attean::API::QuadIterator $iter to the
63           model.
64
65       "add_list( $graph, @elements )"
66           Adds an rdf:List encoded list of @elements to the model in the
67           $graph.  Returns the Attean::API::Blank head of the list.
68

BUGS

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

SEE ALSO

AUTHOR

75       Gregory Todd Williams  "<gwilliams@cpan.org>"
76
78       Copyright (c) 2014--2022 Gregory Todd Williams.  This program is free
79       software; you can redistribute it and/or modify it under the same terms
80       as Perl itself.
81
82
83
84perl v5.36.0                      2022-10-03      Attean::API::MutableModel(3)
Impressum