-
-
06 Feb 2021 18:54:32 UTC
- Distribution: Attean
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (30)
- Testers (58 / 0 / 4)
- Kwalitee
Bus factor: 1- 66.75% Coverage
- License: perl_5
- Perl: v5.14.0
- Activity
24 month- Tools
- Download (245KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Algorithm::Combinatorics
- DateTime::Format::W3CDTF
- Exporter::Tiny
- File::Slurp
- HTTP::Negotiate
- IRI
- JSON
- LWP::UserAgent
- List::MoreUtils
- Math::Cartesian::Product
- Module::Pluggable
- Moo
- MooX::Log::Any
- PerlIO::Layers
- Role::Tiny
- Set::Scalar
- Sub::Install
- Sub::Util
- Test::Modern
- Test::Moose
- Test::Roo
- Text::CSV
- Text::Table
- Try::Tiny
- Type::Tiny
- URI::Escape
- URI::NamespaceMap
- UUID::Tiny
- XML::SAX
- namespace::clean
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Attean::API::MutableModel - Role representing mutable models
VERSION
This document describes Attean::API::MutableModel version 0.030
SYNOPSIS
use v5.14; use Attean;
DESCRIPTION
This is a Moo role that mutable models consume. It defines the required methods for updating data, and provides default functionality.
ROLES
This role consumes the Attean::API::Model role.
REQUIRED METHODS
Classes consuming this role must provide the following methods:
add_quad( $quad )
-
Adds the Attean::API::Quad
$quad
to the model. remove_quad( $quad )
-
Removes the Attean::API::Quad
$quad
from the model. create_graph( $graph )
-
Creates a new, empty graph in the model with the Attean::API::BlankOrIRI identifier
$graph
. If the model does not support empty graphs, this operation may be a no-op. drop_graph( $graph )
-
Removes the graph in the model with the Attean::API::BlankOrIRI identifier
$graph
. clear_graph( $graph )
-
Removes all quads that belong to the graph in the model with the Attean::API::BlankOrIRI identifier
$graph
. If the model does not support empty graphs, this operation may be an alias fordrop_graph( $graph )
.
METHODS
This role provides default implementations of the following methods:
load_triples( $format, $graph => $data )
-
Parses the serialized triples contained in the string
$data
using the$format
parser (see "get_parser" in Attean). Triples resulting from parsing are turned into quads using the$graph
identifier, and added to the model. load_triples_from_io( $format, $graph => $data )
-
Parses the serialized triples read from the filehandle
$io
using the$format
parser (see "get_parser" in Attean). Triples resulting from parsing are turned into quads using the$graph
identifier, and added to the model. add_iter( $iter )
-
Adds all the quads from the Attean::API::QuadIterator
$iter
to the model. add_list( $graph, @elements )
-
Adds an rdf:List encoded list of
@elements
to the model in the$graph
. Returns the Attean::API::Blank head of the list.
BUGS
Please report any bugs or feature requests to through the GitHub web interface at https://github.com/kasei/attean/issues.
SEE ALSO
AUTHOR
Gregory Todd Williams
<gwilliams@cpan.org>
COPYRIGHT
Copyright (c) 2014--2020 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Attean, copy and paste the appropriate command in to your terminal.
cpanm Attean
perl -MCPAN -e shell install Attean
For more information on module installation, please visit the detailed CPAN module installation guide.