#Copyright Massachusetts Institute of technology, 2000.
#Written by Eric Prud'hommeaux for the World Wide Web Consortium

use strict;
require Exporter;
require AutoLoader;

$W3C::LOTP::Lib::QueryObjects::REVISION = '$Id: QueryObjects.pm,v 1.1 2000/03/12 22:42:12 eric Exp $ ';

package W3C::LOTP::Lib::QueryObjects;
use vars qw($VERSION $DSLI @ISA @EXPORT @EXPORT_OK);
@ISA = qw(W3C::LOTP::Extension Exporter AutoLoader);

use W3C::LOTP::Extension;
use W3C::Util::Exception;
@EXPORT = qw();
@EXPORT_OK = qw();
$VERSION = 0.01;
$DSLI = 'adpO';

#####
# Externally available constants
*W3C::LOTP::Lib::QueryObjects::QueryObjectsNamespace = \ 'http://www.w3.org/namespaces/Apps/Adder/v1/';

sub new {
    my ($proto, @parms) = @_;
    my $class = ref($proto) || $proto;
    my $self = $class->SUPER::new(@parms);
    bless ($self, $class);
    $self->registerNamespaceHandler($W3C::LOTP::Lib::QueryObjects::QueryObjectsNamespace);
    return $self;
}

sub handleNamespace {
    my ($self, $namespace, $token, $raw, $attributeList) = @_;
    if ($namespace eq $W3C::LOTP::Lib::QueryObjects::QueryObjectsNamespace) {
	print "handling $namespace $token\n";
    } else {
	&throw(new W3C::Util::ProgramFlowException);
    }
}

1;

__END__

=head1 NAME

W3C::LOTP::Lib::QueryObjects - Common LOTP Object Storage

=head1 SYNOPSIS

    use W3C::LOTP::Lib::QueryObjects;
    package testLOTPInterface;
    @testLOTPInterface::ISA = qw(W3C::Rdf::RdfApp);

    my $tester = new testLOTPInterface;
    $tester->execute(\@ARGV);

    sub render {
	my ($self) = @_;
	$query = "(ask '((http://www.w3.org/schema/certHTMLv1/access ?x \"acc1\") 
(?y ?x \"http://user1\"))
:collect ?x)" if (!$query);
	my ($nodes2, $messages) = $self->{RDF_DB}->algae($query, $self->{RDF_PARSER}->{REVISION});
    }

=head1 DESCRIPTION

Common LOTP Object Storage.

This module is part of the W3C::LOTP CPAN module suite.

=head1 ARGUMENTS

=item B<@<file>> - read arguments from <file>

=item B<...>

=item B<>

=item B<>

=item B<>

=head1 AUTHOR

Eric Prud\'hommeaux <eric@w3.org>

=head1 SEE ALSO

W3C::LOTP::CGI(3) perl(1).

=cut
