1Attean::API::MutableModUesle(r3)Contributed Perl DocumenAttatteiaonn::API::MutableModel(3)
2
3
4
6 Attean::API::MutableModel - Role representing mutable models
7
9 This document describes Attean::API::MutableModel version 0.020
10
12 use v5.14;
13 use Attean;
14
16 This is a Moo role that mutable models consume. It defines the required
17 methods for updating data, and provides default functionality.
18
20 This role consumes the Attean::API::Model role.
21
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
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 "add_iter( $iter )"
56 Adds all the quads from the Attean::API::QuadIterator $iter to the
57 model.
58
59 "add_list( $graph, @elements )"
60 Adds an rdf:List encoded list of @elements to the model in the
61 $graph. Returns the Attean::API::Blank head of the list.
62
64 Please report any bugs or feature requests to through the GitHub web
65 interface at <https://github.com/kasei/attean/issues>.
66
69 Gregory Todd Williams "<gwilliams@cpan.org>"
70
72 Copyright (c) 2014--2018 Gregory Todd Williams. This program is free
73 software; you can redistribute it and/or modify it under the same terms
74 as Perl itself.
75
76
77
78perl v5.28.1 2019-01-09 Attean::API::MutableModel(3)