-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdictionary.php
More file actions
79 lines (67 loc) · 2.63 KB
/
dictionary.php
File metadata and controls
79 lines (67 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
#creates a dictionary, if none exists, where namespaces and new URI relations can be saved
ini_set('display_errors',0);
if($_REQUEST['su3d']){
ini_set('display_errors',1);
}
if(file_exists('config.inc.php'))
{
include('config.inc.php');
}
else
{
Header('Location: index.php');
exit;
}
include_once(S3DB_SERVER_ROOT.'/dbstruct.php');
include_once(S3DB_SERVER_ROOT.'/s3dbcore/authentication.php');
include_once(S3DB_SERVER_ROOT.'/s3dbcore/display.php');
include_once(S3DB_SERVER_ROOT.'/s3dbcore/callback.php');
include_once (S3DB_SERVER_ROOT.'/s3dbcore/element_info.php');
include_once (S3DB_SERVER_ROOT.'/s3dbcore/validation_engine.php');
include_once (S3DB_SERVER_ROOT.'/s3dbcore/insert_entries.php');
include_once (S3DB_SERVER_ROOT.'/s3dbcore/file2folder.php');
include_once (S3DB_SERVER_ROOT.'/s3dbcore/update_entries.php');
include_once (S3DB_SERVER_ROOT.'/s3dbcore/delete_entries.php');
include_once (S3DB_SERVER_ROOT.'/s3dbcore/datamatrix.php');
include_once (S3DB_SERVER_ROOT.'/s3dbcore/create.php');
include_once (S3DB_SERVER_ROOT.'/s3dbcore/permission.php');
include_once (S3DB_SERVER_ROOT.'/s3dbcore/list.php');
include_once (S3DB_SERVER_ROOT.'/s3dbcore/S3QLRestWrapper.php');
include_once (S3DB_SERVER_ROOT.'/s3dbcore/SQL.php');
include_once (S3DB_SERVER_ROOT.'/s3dbcore/S3QLaction.php');
include_once (S3DB_SERVER_ROOT.'/s3dbcore/htmlgen.php');
include_once (S3DB_SERVER_ROOT.'/s3dbcore/acceptFile.php');
include_once (S3DB_SERVER_ROOT.'/s3dbcore/URIaction.php');
include_once(S3DB_SERVER_ROOT.'/s3dbcore/common_functions.inc.php');
$format = $_REQUEST['format'];
if($format=='') $format='html';
#if a key has been provided, validate the key
include_once('core.header.php');
include_once(S3DB_SERVER_ROOT.'/s3dbcore/api.php');
include_once(S3DB_SERVER_ROOT.'/s3dbcore/dictionary.php');
##Example insert query
#$q['from']='namespace';
#$q['where']['qname']='mged';
#$q['where']['URL']='http://mged.sourceforge.net/ontologies/MGEDOntology.1.3.0.1.owl';
#$s3ql['from'] = 'link';
#$s3ql['where']['URI']='I11206';
#$s3ql['where']['relation']='rdfs:seeAlso';
#$s3ql['where']['value']='mged:array';
if(!$_REQUEST['query']){
$s3ql=compact('user_id','db');
$s3ql['from']='link';
}
#now, if query is not empyt, read it, parse it, interpret it.
if($_REQUEST['query']){
$query = $_REQUEST['query'];
$q=compact('query','format','key','user_proj','user_id','db');
$s3ql=parse_xml_query($q);
##now interpret the query
$s3ql['db']=$db;
$s3ql['user_id']=$user_id;
$s3ql['format']=$format;
}
$msg=query_user_dictionaries($s3ql,$db, $user_id,$format);
echo $msg;
?>