File Coverage

blib/lib/ODO/Graph/Storage.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 1 1 100.0
total 25 25 100.0


line stmt bran cond sub pod time code
1             #
2             # Copyright (c) 2006 IBM Corporation.
3             #
4             # All rights reserved. This program and the accompanying materials
5             # are made available under the terms of the Eclipse Public License v1.0
6             # which accompanies this distribution, and is available at
7             # http://www.eclipse.org/legal/epl-v10.html
8             #
9             # File: $Source: /var/lib/cvs/ODO/lib/ODO/Graph/Storage.pm,v $
10             # Created by: Stephen Evanchik( evanchik@us.ibm.com )
11             # Created on: 11/20/2006
12             # Revision: $Id: Storage.pm,v 1.2 2009-11-25 17:58:25 ubuntu Exp $
13             #
14             # Contributors:
15             # IBM Corporation - initial API and implementation
16             #
17             package ODO::Graph::Storage;
18              
19 6     6   1363 use strict;
  6         16  
  6         212  
20 6     6   34 use warnings;
  6         15  
  6         167  
21              
22 6     6   50 use base qw/ODO/;
  6         12  
  6         564  
23 6     6   32 use vars qw /$VERSION/;
  6         11  
  6         564  
24             $VERSION = sprintf "%d.%02d", q$Revision: 1.2 $ =~ /: (\d+)\.(\d+)/;
25 6         67 use Class::Interfaces('ODO::Graph::Storage'=>
26             {
27             'isa'=> 'ODO',
28             'methods'=> [ 'add', 'remove', 'clear', 'size', 'issue_query', 'issue_simple_query' ],
29             }
30 6     6   33 );
  6         12  
31              
32             __PACKAGE__->mk_ro_accessors(qw/parent_graph/);
33              
34             =head1 NAME
35              
36             ODO::Graph::Storage - Store statements in a particular manner (database, memory, file etc.)
37              
38             =head1 DESCRIPTION
39              
40             Graph storage abstraction layer.
41              
42             =head1 METHODS
43              
44             =over
45              
46             =item add( $statement | \@statements | @statements )
47              
48             Add statement(s).
49              
50             =item remove( $statement | \@statements | @statements )
51              
52             Remove statement(s).
53              
54             =item issue_query( $query )
55              
56             Issue a potentially complex query (SPARQL, RDQL, etc.).
57              
58             =item issue_simple_query( $simple_query )
59              
60             Issue a simple pattern match query, see L for information about how
61             to construct a pattern.
62              
63             =cut
64              
65             sub init {
66 8     8 1 13 my ($self, $config) = @_;
67 8         46 $self->params($config, qw/parent_graph/);
68 8         236 return $self;
69             }
70              
71             =back
72              
73             =head1 COPYRIGHT
74              
75             Copyright (c) 2006 IBM Corporation.
76              
77             All rights reserved. This program and the accompanying materials
78             are made available under the terms of the Eclipse Public License v1.0
79             which accompanies this distribution, and is available at
80             http://www.eclipse.org/legal/epl-v10.html
81              
82             =cut
83              
84             1;
85              
86             __END__