1 |
efrain |
1 |
<?php
|
|
|
2 |
// This file is part of Moodle - http://moodle.org/
|
|
|
3 |
//
|
|
|
4 |
// Moodle is free software: you can redistribute it and/or modify
|
|
|
5 |
// it under the terms of the GNU General Public License as published by
|
|
|
6 |
// the Free Software Foundation, either version 3 of the License, or
|
|
|
7 |
// (at your option) any later version.
|
|
|
8 |
//
|
|
|
9 |
// Moodle 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 Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
16 |
/**
|
|
|
17 |
* @package backup-convert
|
|
|
18 |
* @subpackage cc-library
|
|
|
19 |
* @copyright 2011 Darko Miletic <dmiletic@moodlerooms.com>
|
|
|
20 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
|
21 |
*/
|
|
|
22 |
|
|
|
23 |
/**
|
|
|
24 |
* CC Manifest Interface
|
|
|
25 |
*/
|
|
|
26 |
interface cc_i_manifest {
|
|
|
27 |
|
|
|
28 |
public function on_create();
|
|
|
29 |
public function on_load();
|
|
|
30 |
public function on_save();
|
|
|
31 |
public function add_new_organization(cc_i_organization &$org);
|
|
|
32 |
public function get_resources();
|
|
|
33 |
public function get_resource_list();
|
|
|
34 |
public function add_resource(cc_i_resource $res, $identifier=null, $type='webcontent');
|
|
|
35 |
public function add_metadata_manifest(cc_i_metadata_manifest $met);
|
|
|
36 |
public function add_metadata_resource(cc_i_metadata_resource $met,$identifier);
|
|
|
37 |
public function add_metadata_file(cc_i_metadata_file $met,$identifier,$filename);
|
|
|
38 |
public function put_nodes();
|
|
|
39 |
|
|
|
40 |
}
|
|
|
41 |
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
/**
|
|
|
45 |
* CC Organization Interface
|
|
|
46 |
*/
|
|
|
47 |
interface cc_i_organization {
|
|
|
48 |
|
|
|
49 |
public function add_item(cc_i_item &$item);
|
|
|
50 |
public function has_items();
|
|
|
51 |
public function attr_value(&$nod, $name, $ns=null);
|
|
|
52 |
public function process_organization(&$node,&$doc);
|
|
|
53 |
|
|
|
54 |
}
|
|
|
55 |
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
/**
|
|
|
59 |
* CC Item Interface
|
|
|
60 |
*/
|
|
|
61 |
interface cc_i_item {
|
|
|
62 |
|
|
|
63 |
public function add_child_item(cc_i_item &$item);
|
|
|
64 |
public function attach_resource($res); // can be object or value
|
|
|
65 |
public function has_child_items();
|
|
|
66 |
public function attr_value(&$nod, $name, $ns=null);
|
|
|
67 |
public function process_item(&$node,&$doc);
|
|
|
68 |
|
|
|
69 |
}
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
/**
|
|
|
73 |
* CC Resource Interface
|
|
|
74 |
*/
|
|
|
75 |
interface cc_i_resource {
|
|
|
76 |
|
|
|
77 |
public function get_attr_value(&$nod, $name, $ns=null);
|
|
|
78 |
public function add_resource($fname, $location='');
|
|
|
79 |
public function import_resource(DOMElement &$node, cc_i_manifest &$doc);
|
|
|
80 |
public function process_resource($manifestroot, &$fname,$folder);
|
|
|
81 |
|
|
|
82 |
}
|
|
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
/**
|
|
|
87 |
* CC Metadata Manifest Interface
|
|
|
88 |
*/
|
|
|
89 |
interface cc_i_metadata_manifest {
|
|
|
90 |
|
|
|
91 |
public function add_metadata_general($obj);
|
|
|
92 |
public function add_metadata_technical($obj);
|
|
|
93 |
public function add_metadata_rights($obj);
|
|
|
94 |
public function add_metadata_lifecycle($obj);
|
|
|
95 |
|
|
|
96 |
}
|
|
|
97 |
|
|
|
98 |
|
|
|
99 |
/**
|
|
|
100 |
* CC Metadata Resource Interface
|
|
|
101 |
*/
|
|
|
102 |
interface cc_i_metadata_resource {
|
|
|
103 |
|
|
|
104 |
public function add_metadata_resource_educational($obj);
|
|
|
105 |
|
|
|
106 |
}
|
|
|
107 |
|
|
|
108 |
/**
|
|
|
109 |
* CC Metadata File Interface
|
|
|
110 |
*/
|
|
|
111 |
interface cc_i_metadata_file {
|
|
|
112 |
|
|
|
113 |
public function add_metadata_file_educational($obj);
|
|
|
114 |
|
|
|
115 |
}
|
|
|
116 |
|