man XTM::Virtual () - Topic Map management, Virtual (topic induced) maps
NAME
XTM::Virtual - Topic Map management, Virtual (topic induced) maps
SYNOPSIS
use XTM::Virtual; my $tm = new XTM (tie => new XTM::Virtual (expr => '/m-some-map'));
DESCRIPTION
!!!This description has to be improved!!!
This is a tie wrapper for topic induced topic maps. The idea is that there is a global tree of topic maps (maybe distributed over several topic map servers).
Every topic can---in principle---have a complete map as 'refinement'. So, for instance, a topic 't-internet' in a particular map can have a topic map attached dealing with details about the Internet.
In this sense we induce some topic map hierarchy, which can be easily flexed by organising maps via Topic Map algebraic definitions. The hierarchy only helps us to organize the maps physically.
- Topic Map Algebra
- When loading topic maps (regardless their format), following operations can be performed:
- joining
- Here two topic maps are joined by identifying topics in each of the maps to be synonymous. The mapping is done by another map.
- scoping
- Given a particular topic map, the scope filters out only those topics and associations for this very scope.
- versioning
-
As topic maps may exist in different version it is sometimes
practical to select a particular version.
???????
The syntax for an topic map expression is as follows:
expr -> tm-url # primitive expr -> expr '[' expr ']' expr # join expr -> expr [ 'v' version ] # versioning [ '@' host ] # remote server [ '|' scope ] # scoping version -> natural [ '.' natural ] scope -> I<SGML topic>-identifier host -> I<some machine name or IP address> natural -> I<some number greater equal 0>
The tm-url has the formtm://server-name/map-id1/map-id2/....
INTERFACE
Global variables
Constructor
The constructor expects a hash with the following fields:
- expr denotes a topic map algebraic expression.
Examples:
# relative to this server $vtm = new XTM::Virtual (expr => '/m-test'); # absolute $vtm = new XTM::Virtual (expr => 'tm://se-namod/map-topic1/map-topic2/'); # directly the server knowledge map $vtm = new XTM::Virtual (expr => '/'); # some other server's knowledge map $vtm = new XTM::Virtual (expr => 'tm://se-some-server/');
Methods
- sync_in
- $tm->sync_in ($XTM::default_consistency) This method will cause the map to be loaded and/or generated, depending on the complexity of the expression. The XTM::Memory object will be returned. You may add a consistency (see XTM) as parameter. It will be used throughout.
- sync_out
- Not implemented.
- staleness returns the number of seconds the loaded map is old relative to the external source. If the last modification of the source cannot be determined, then the staleness is always 0.
AUTHOR INFORMATION
Copyright 2001, 2002, Robert Barta <rho@telecoma.net>, All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. http://www.perl.com/perl/misc/Artistic.html