Robin Berjon > XML-RDDL-1.02 > XML::RDDL::Directory

Download:
XML-RDDL-1.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  

NAME ^

XML::RDDL::Directory - RDDL Directory Interface

SYNOPSIS ^

  use XML::RDDL::Directory;
  # create a new RDDL directory
  my $dir = XML::RDDL::Directory->new;
  # add some resources
  $dir->add_resource($res1);
  $dir->add_resource($res2);
  # delete a resource
  $dir->delete_resource($res1);
  # get resources by various searches
  $res = $dir->get_resource_by_id('foo');
  $res = $dir->get_resources_by_nature('http://foobar/nat');
  $res = $dir->get_resources_by_purpose('http://foobar/purp');

DESCRIPTION ^

XML::RDDL::Directory is a container for all the XML::RDDL::Resources found in one RDDL directory. It has a variety of methods to make access to those resources easier.

METHODS ^

XML::RDDL::Directory->new

Creates a new Directory

add_resource($res1);

Adds a given Resource to the Directory

delete_resource($res1);

Deletes a given Resource from the Directory

get_resources

Returns a list of all the resources

get_resource_by_id('foo');

Returns the Resource in the Directory that has that id (nothing if there is none)

get_resources_by_nature('http://foobar/nat');

Returns a (possibly empty) list of Resources in that Directory that have the given nature

get_resources_by_purpose('http://foobar/purp');

Returns a (possibly empty) list of Resources in that Directory that have the given purpose

TODO ^

  - time will tell if more search methods are needed

AUTHOR ^

Robin Berjon, robin@knowscape.com

COPYRIGHT ^

Copyright (c) 2001-2002 Robin Berjon. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO ^

http://www.rddl.org/, XML::RDDL

syntax highlighting: