Apache-TopicMaps

 view release on metacpan or  search on metacpan

lib/Apache/TopicMaps.pm  view on Meta::CPAN

	print STDERR "\$rv = Apache::TopicMaps::".$accept."::".$r->path_info."::do" . '($r,$result_tm,1)';

	eval( "\$rv = Apache::TopicMaps::".$accept."::".$r->path_info."::do" . '($r,$result_tm,1)' );
	if ($@)
	{
		$r->log_error( $@ );	
		return SERVER_ERROR;
	}
	$result_tm->dump();
	undef $result_tm;
	return $rv;
}


sub moo {
	my ($tm,$view,$params) = @_;

	foreach my $view_uri ( @{$conf->{$view}} )
	{
		print STDERR "  --> $view_uri\n";
		my $u = $view_uri; 
		if( defined $params )
		{
			my $param_types = get_param_types( $view );
			foreach my $p (keys %$params)
			{
				print STDERR $p , "\n";
				next unless ($param_types->{$p} eq 'Topic');
				
				# maybe alter sidp string
			}

			$u  .= '?'. join( '&' , map { uri_escape($_) .'='. uri_escape($params->{$_} )} keys %$params );
		}
		print STDERR $u , "\n";
		getTM($tm, $u);		
	}

}

sub get_topic_from_full_sidp_string
{
	my($tm,$sidp_string) = @_;
 
        my @pairs = split /\|\|\|/ , $sidp_string;
	my $topic;
 
        foreach my $pair (@pairs)
        {
                my ($p,$v) = split /===/ , $pair;
                $topic = $tm->get_topic_from_string($p , $v);
                last if ( defined $topic );
        }
	return $topic;
}

1;

1;
__END__
# Below is stub documentation for your module. You'd better edit it!

=head1 NAME

Apache::TopicMaps - Perl extension for serving topic maps.

=head1 SYNOPSIS

  use Apache::TopicMaps;
  FIXME

=head1 ABSTRACT

  A server for topic maps.

=head1 DESCRIPTION

  This is a pre-alpha version. Contact the author if you plan to use it.

=head2 EXPORT

None by default.

=head1 SEE ALSO

See the topic map mail mailing list: http://www.infoloom.com/mailman/listinfo/topicmapmail

If you have a mailing list set up for your module, mention it here.

If you have a web site set up for your module, mention it here.

=head1 AUTHOR

Jan Algermissen<lt>algermissen@acm.org<gt>

=head1 COPYRIGHT AND LICENSE

Copyright 2004 by Jan Algermissen

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself. 

=cut



( run in 1.187 second using v1.01-cache-2.11-cpan-39bf76dae61 )