NAME

XTM::topic - Topic Map management, Topic

SYNOPSIS

use XTM::topic;

my $t = new XTM::topic;
...
print join (",", @{$t->occurrences()});
print "bliss and happiness" if $t->has_instanceOf ('t-billionair');

# see XTM::generic for more

DESCRIPTION

This package provides the primitive class Topic for Topic Maps.

INTERFACE

Constructor

The constructor expects a hash with following (optional) fields:

id: a topic id (unique in the map in use), if not given, it will be generated
$t = new XTM::topic ('id' => '#123');

Methods

occurrences

returns the occurrences of the topic as a list reference. If provided with a parameter, this value will be used as new occurrences list reference (no validation will happen).

map

is an accessor method for the map component.

has_instanceOf

returns true if the topic is a direct subtype of a topic specified as tid for the only parameter.

Example:

print "bliss and happiness" if $t->has_instanceOf ('t-billionair');

SEE ALSO

XTM

AUTHOR INFORMATION

Copyright 2001, 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.