rom the outside world and is responsible for the state of the various processing jobs.
It speaks JSON through HTTP (soon Websockets!) and aims at simple RESTful communication interfacing with externa
now been revisted, add text here.
=head2 Annotation Schemes
Talk about adding achors to HTML, JSON for editors, etc.
B<TODO:> These are also features that will be ready for the June release, but
;
$Data::Dumper::Sortkeys =1;
use NNexus::Concepts qw(links_from_concept);
use Mojo::JSON qw(decode_json encode_json);
sub serialize_concepts {
my (%options) = @_;
# Annotation Format:
# HTML -
fully linked html with RDFa annotations
# xml - the matches hash in XML format.
# json - the matches in JSON format
# perl - Dump the datastructrure as-is
my ($annotation,$concepts,$domain) =
rn what was given
}
} else {
# stand-off case:
if ($annotation eq 'json') {
return encode_json($concepts); }
# when ('perl') { return Dumper($concepts); } #TODO: Why is th
ge base for autolinking/indexing
=item *
anntation: serialization format for annotation (links, JSON, RDFa)
=item *
embed: boolean for embedded or stand-off annotations
=item *
db: An initialize
R) = grep(-d $_, map("$_/NNexus", @INC));
use vars qw($VERSION);
$VERSION = "2.0.3";
use Mojo::JSON 'j';
use NNexus::DB;
use NNexus::Job;
our %snapshot_credentials =
(
"dbms" => "SQLite",
"dbname
ob->execute;
my $result = $job->result;
if ($options{annotation} && ($options{annotation} eq 'json')) {j($result);}
return $result;
}
sub indexentry {
my (%options) = @_;
my $db = delete $o