The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

XML::DB::Database::Xindice - XML:DB driver for the Xindice database

SYNOPSIS

  use XML::SimpleDB::Database::Xindice;

DESCRIPTION

This is the Xindice XML-RPC driver. It is intended to be used through the XML:DB API, so that it is never called directly from user code. It implements the internal API defined in XML::DB::Database.

The methods required to implement the Database interface are documented in Database.pm; only methods unique to Xindice, and not directly required by the XML:DB API are documented here.

BUGS

setDocument not working.

AUTHOR

        Graham Seaman
        CPAN ID: AUTHOR
        graham@opencollector.org
        http://opencollector.org/modules

COPYRIGHT

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.

SEE ALSO

XML::DB::Database

METHODS

new

    Usage : $driver = new XML::DB::Database('Xindice');

    Purpose : Constructor

    Argument : $self, passed from Database.pm

    Returns : Exist driver, an extension of XML::DB::Database

    Comments : Normally only called indirectly, via the DatabaseManager

setURI

    Usage : $driver->setURI

    Purpose : sets the URI

    Argument : URI to use

    Returns : 1

    Comments : This should probably be done in the constructor but is separate till DatabaseManager is properly sorted out.

ADDITIONAL METHODS

The following methods are not used directly by this XML:DB implementation. Some are called indirectly by the interface methods, others implement features specific to Xindice.

setDocument

    Usage $id = setDocument($collectionName, $content, $id )

    Purpose Sets a document in the collection. setDocument should be called when the document already exists in the collection.

    Arguments

    • $collectionName - The name of the collection including database instance.

    • $content - The new Document value

    • $id - The id of the Document to set

    Returns The id of the updated Document

    Throws Exception thrown if the document cant be found.

listIndexers

    Usage : $indexers = listIndexers($collectionName )

    Purpose : Returns a set containing all indexers in the collection.

    Argument : collectionName The name of the collection including database instance.

    Returns : Arrayref of indexers in the specified collection.

    Throws : Exception thrown if the collection could not be found or any other internal error occurs.

createIndexer

    Usage : createIndexer($collectionName, $indexName, $pattern )

    Purpose : Creates a new indexer in the specified Collection.

    Arguments :

    • $collectionName - The name of the collection including database instance.

    • $indexName - The name of the newly created indexer.

    • $pattern - The pattern of the indexer.

    Returns : 1 on success

    Throws : Exception thrown if the collection could not be found or any other internal error occurs.

dropIndexer

    Usage : dropIndexer( String collectionName, String index )

    Purpose : Removes indexer in the specified Collection

    Arguments :

    • $collectionName - The name of the collection including database instance.

    • $indexerName - The name of the indexer to remove.

    Returns : 1 on success

    Throws : Exception thrown if the indexer could not be found or any other internal error occurs.

listXMLObjects

    Usage : @objects = listXMLObjects($collectionName)

    Purpose : Lists all XML objects within the collection

    Argument : $collectionName The name of the collection including database instance.

    Returns : Arrayref of XML objects

    Throws : Exception thrown if any internal error occurs.