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 (see "JOINING").
- scoping
-
Given a particular topic map, the scope filters out only those topics and associations for this very scope (see "SCOPING").
- 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 form
tm://server-name/map-id1/map-id2/....
INTERFACE
Global variables
urlbase
this path is used as a basis for all maps loaded from the file system (or via HTTP/FTP). This should point to the bootstrap map.tmbase
this path is used as a basis for all maps loaded from the tm:// name space.
Constructor
The constructor expects a hash with the following fields:
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
-
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.
- sync_out
- 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.
- _assert (private method) tries to make sure the map specified via the parameter is loaded into the cache. An exception will be raised if there is any problem (document not found, XML parsing error, ....).
-
Example:
# the bootstrap map is loaded. Should be first in most cases _assert ('/'); # load this or die _assert ('tm://se-namod/m-internet/m-ecommerce/');
- _asserted (private method) returns a list (reference) of known maps.
3 POD Errors
The following errors were encountered while parsing the POD:
- Around line 94:
You forgot a '=back' before '=head1'
- Around line 119:
You forgot a '=back' before '=head2'
- Around line 360:
'=item' outside of any '=over'
=over without closing =back