
anno_server - simple dotReader annotation server

This is really only for testing, so to facilitate that it has a mode where it will start the server, run a system command, and then shutdown. In this mode, the pattern qr{\bADDR/} will be replaced with the server address (e.g. http://localhost:8088/.)
./util/anno_server curl ADDR/TEST.yml
Without arguments, it will just start the server.
my $server = dtRdr::anno_server->new();
$server->handle_request($cgi);
$self->dispatch($path, $cgi);

$self->url_param($cgi);
Deal with CGI's failed helpiness.
my ($fmt, $string) = $self->read_client_data($cgi);

$self->GET_manifest(\@path_rem, $cgi);
$self->GET_annotation($path, %args);
Creates a new annotation. A POST against an existing path/id is an error.
POST $ADDR/annotation/ $server->POST_annotation($path, %args);
Updates an existing annotation. The create-this PUT is not supported.
PUT $ADDR/annotation/$id.$fmt?rev=$expected_rev $server->PUT_annotation($path, %args);
Deletes an existing annotation.
PUT $ADDR/annotation/$id.$fmt?rev=$expected_rev $server->DELETE_annotation($path, %args);

$self->formatter($format);
$self->unformatter($format);

Abstractions for local/wire representations. These might help if we go with a dtRdr::Annotation::IOBlob object or something. Otherwise, I think we're just normalizing data.
id
title
start
end
context
selected
mod_time
create_time
revision
public
owner
rev - output only (if even)
content - notes only
$data = $self->_kmap($data);
$data = $self->anno_in($data);
$data = $self->anno_out($data);
Overrides
$self->output(...);

my %items = $server->manifest(%select);

Internalizes the authentication type.
$self->authenticate;
$self->get_password($user);