XML::RDDL::Directory - RDDL Directory Interface
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');
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.
Creates a new Directory
Adds a given Resource to the Directory
Deletes a given Resource from the Directory
Returns a list of all the resources
Returns the Resource in the Directory that has that id (nothing if there is none)
Returns a (possibly empty) list of Resources in that Directory that have the given nature
Returns a (possibly empty) list of Resources in that Directory that have the given purpose
- time will tell if more search methods are needed
Robin Berjon, email@example.com
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.