RDF::Server::Role::Mutable - requirements for a mutable resource


RDF-Server documentation Contained in the RDF-Server distribution.

Index


Code Index:

NAME

Top

RDF::Server::Role::Mutable - requirements for a mutable resource

SYNOPSIS

Top

 package My::Handler

 with 'RDF::Server::Role::Mutable';

 sub create { }
 sub delete { }
 sub modify { }
 sub replace { }
 sub remove { }

DESCRIPTION

Top

RDF::Server::Role::Mutable is a sub-role of RDF::Server::Role::Renderable. In addition to the methods required for this role, you will also need to satisfy the requirements of the Renderable role.

Configuration

deep_replace

A flag indicating whether or not the replace method should propagate to referenced resources that have attributes specified in the supplied document. If false, then replacement should switch to modification when crossing into an embedded rdf:Description element (or its equivalent) that is not a blank node.

Default: false.

Methods

The following methods require definitions in classes that use this role. On success, these methods should return a true value. Throw a RDF::Server::Exception if status codes and messages are required to shed light on why a request is a failure.

If these methods return a true value, a rendering of the resource will be returned by the server.

create
delete
modify
remove
replace

AUTHOR

Top

James Smith, <jsmith@cpan.org>

LICENSE

Top

Copyright (c) 2008 Texas A&M University.

This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Top

James Smith, <jsmith@cpan.org>

LICENSE

Top

Copyright (c) 2008 Texas A&M University.

This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.


RDF-Server documentation Contained in the RDF-Server distribution.
package RDF::Server::Role::Mutable;

use Moose::Role;

with 'RDF::Server::Role::Renderable';

has deep_replace => (
    is => 'rw',
    isa => 'Bool',
    default => sub { 0 }
);

requires 'delete';  # remove resource completely
requires 'modify';  # modify parts of a resource
requires 'replace'; # logically purge and create with supplied content
requires 'remove';  # purge all content directly part of resource

1;

__END__