1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
use Data::Dumper;
use TM::ResourceAble::MLDBM;
my $tm = new TM::ResourceAble::MLDBM (file => '/tmp/somemap');
use TM::Materialized::AsTMa;
my $update = new TM::Materialized::AsTMa (file => 'maps/mapreduce.atm');
$update->sync_in;
warn "synced";
use TM::Literal;
$update->assert (
map { Assertion->new (kind => TM->NAME, type => 'name', scope => 'us', roles => [ 'thing', 'value' ], players => [ "aaa$_", new TM::Literal ("AAA$_") ]) }
(1..10000)
);
warn "enriched";
$tm->clear;
$tm->add ($update);
warn "added";
my $c = {};
use Class::Trait;
Class::Trait->apply ($tm, "TM::IndexAble");
$tm->index ({ axis => 'reify', closed => 1, detached => $c });
warn "indexed";
#warn Dumper $c;
Class::Trait->apply ( $tm => 'TM::Serializable::AsTMa' );
my $content = $tm->serialize;
warn "serialized";
#warn $content;
__END__
Class::Trait->apply ( $tm => 'TM::Serializable::AsTMa' );
use TM::Index::Reified;
warn "use";
my $idx = new TM::Index::Reified ($tm, closed => 1, loose => 1);
warn "idx";
warn Dumper $tm->{rindex};
__END__
use TM::Serializable::AsTMa;
use Class::Trait;
Class::Trait->apply ( $tm => 'TM::Serializable::AsTMa' );
my $content;
{
use TM::Index::Reified;
my $idx = new TM::Index::Reified ($tm);
warn "attached";
#use TM::Index::Taxonomy;
#my $idx = new TM::Index::Taxonomy ($tm, closed => 1);
$content = $tm->serialize;
warn "serialized";
$idx->detach;
warn "detached";
}
warn $content;
__END__
use TM::Materialized::MLDBM;
my $tm = new TM::Materialized::MLDBM (file => '/tmp/rumsti');
$tm->internalize ('xxx');
$tm->sync_out;
|