XML::DB::Resource - Wrapper class for documents or document fragments |
XML::DB::Resource - Wrapper class for documents or document fragments
$resource = $collection->getResource($id); $id = $resource->getId(); $xml = $resource->getContent(); $resource->setContent($xml); $collection->storeResource($resource); $parentColl = $resource->getParentCollection();
This is an abstract class implementing the Service interface Database from the XML:DB base specification. It should only be used indirectly, as superclass for a specific Resource type. The only current example is XMLResource.
Graham Seaman CPAN ID: GSEAMAN graham@opencollector.org
Copyright (c) 2002 Graham Seaman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl(1).
Usage : $r->getContent()
Purpose : Returns the stored data
Argument : None
Returns : XML String
Usage : $r->getId()
Purpose : Returns the stored id (may be undef)
Argument : None
Returns : id or undef
Usage : $collection = $r->getParentCollection()
Purpose : Returns the collection this resource belongs to
Argument : none
Returns : Collection
Usage : $r->setContent($doc)
Purpose : stores the content (overwriting any previous content)
Argument : XML document
Returns : void
Usage : $type = $r->getResourceType()
Purpose : Returns resource type of implementing class
Argument : none
Returns : string
Purpose : Constructor
Comments : The constructor should not be called directly; new Resources are created via their parent Collection, or implicitly while building a ResourceSet.
XML::DB::Resource - Wrapper class for documents or document fragments |