NAME

XTM::AsTMa - Topic Map Parsing of AsTMa instances.

SYNOPSIS

# reading a topic map description from a file/url
$atm = new XTM::AsTMa (file => 'mymap.atm');
$tm  = $atm->sync_in();

DESCRIPTION

This package provides parsing functionality for AsTMA instances:

http://topicmaps.bond.edu.au/astma/

Currently, only AsTMa= is supported, but WITHOUT macros.

INTERFACE

Constructor

The constructor expects a hash as parameter containing one of the following fields:

url:

If given, then the AsTMa instance will be read from this url.

file:

If given, then the AsTMa data will be read from this file (This is just a convenience function as it will be mapped to url).

text:

If given, then the AsTMa instance will be read directly from this text. (See method text how to retrieve the current value).

auto_complete

If set to 0, the AsTMa loader will NOT try to automatically generate topics which have been mentioned without being declared.

If several fields (file, url, text) are specified, it is undefined which one will be taken.

Examples:

   $atm = new XTM::AsTMa (file => 'here.atm');
   $atm = new XTM::AsTMa (url  => 'file:here.atm',  # the same
			  auto_complete => 0);      # but with auto_completion turned off
   $atm = new XTM::AsTMa (text => '# this is AsTMa');

Methods

last_mod

returns the UNIX time when the resource has been modified last. undef is returned if the result cannot be determined.

sync_in

loads an AsTMa instance and returns a XTM::Memory object. Note that that all undefined topics will be defined automatically, unless auto_complete is set to 0.

sync_out

is not implemented.

SEE ALSO

XTM

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.