Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3/**
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; under version 2
7 * of the License (non-upgradable).
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17 *
18 * Copyright (c) 2014 (original work) Open Assessment Technologies SA;
19 *
20 *
21 */
22
23namespace oat\generis\model\data;
24
25use core_kernel_classes_Triple;
26use Traversable;
27
28/**
29 * Rdf interface to access the ontology
30 * This is an experimental interface that has not been implemented yet
31 *
32 * @author Joel Bout, <joel@taotesting.com>
33 * @package generis
34
35 */
36interface RdfInterface extends \IteratorAggregate
37{
38    /**
39     * Returns an array of the triples with the given subject, predicate
40     *
41     * @param string $subject
42     * @param string $predicate
43     * @return array
44     */
45    public function get($subject, $predicate);
46
47    /**
48     * Adds a triple to the model
49     *
50     * @param \core_kernel_classes_Triple $triple
51     */
52    public function add(\core_kernel_classes_Triple $triple);
53
54    /**
55     * Adds a triples to the model
56     *
57     * @param core_kernel_classes_Triple[] $triples
58     */
59    public function addTripleCollection(Traversable $triples);
60
61    /**
62     * Removes the triple
63     *
64     * @param \core_kernel_classes_Triple $triple
65     */
66    public function remove(\core_kernel_classes_Triple $triple);
67
68    /**
69     * Returns an array of the triples with the given predicate, object
70     *
71     * @param string $predicate
72     * @param string $object
73     * @return array
74     */
75    public function search($predicate, $object);
76}