-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreconciliate.php
executable file
·132 lines (95 loc) · 2.42 KB
/
reconciliate.php
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?php
require_once('lib/lib.php');
ob_start();
print_r($_REQUEST);
$date = new DateTime();
$out1 = $date->format('H_i:s');
$out1 .= "\n";
$out1 .= ob_get_contents();
ob_end_clean();
file_put_contents('logs/test.txt', $out1, FILE_APPEND);
if(isset($_REQUEST['service'])&&$_REQUEST['service']=="odis")
{
$service = new OdisService();
}
elseif(isset($_REQUEST['service'])&&$_REQUEST['service']=="rkd"){
$service = new RkdService();
}
elseif(isset($_REQUEST['service'])&&$_REQUEST['service']=="aat"){
$service = new AatService();
}
else {
$service = new AatService();
}
$service->Call($_REQUEST);
die;
/*
ob_start();
print_r($_REQUEST);
$out1 = ob_get_contents();
ob_end_clean();
file_put_contents('test.txt', $out1, FILE_APPEND); die;
$infoArray = array(
'name' => 'PACKED AAT service',
'identifierSpace' =>'josnet',
'schemaSpace' => 'jospret',
'defaultTypes' => array(
array(
'id' => 'aat_object',
'name' => "aat_object_name"
)
)
);
$pizza = <<<EOT
{
"name" : "Netflix Reconciliation through Freebase",
"identifierSpace" : "http://rdf.freebase.com/ns/authority.netflix.movie",
"schemaSpace" : "http://rdf.freebase.com/ns/type.object.id",
"view" : {
"url" : "http://www.netflix.com/WiMovie//{{id}}"
},
"preview" : {
"url" : "http://netflix-reconcile.freebaseapps.com/preview/{{id}}",
"width" : 430,
"height" : 300
},
"suggest" : {
"type" : {
"service_url" : "http://netflix-reconcile.freebaseapps.com",
"service_path" : "/suggest_type",
"flyout_service_url" : "http://www.freebase.com"
},
"property" : {
"service_url" : "http://netflix-reconcile.freebaseapps.com",
"service_path" : "/suggest_property",
"flyout_service_url" : "http://www.freebase.com"
},
"entity" : {
"service_url" : "http://netflix-reconcile.freebaseapps.com",
"service_path" : "/suggest",
"flyout_service_path" : "/flyout"
}
},
"defaultTypes" : []
}
EOT;
$pizza = <<<EOT
{
"name": "AAT",
"identifierSpace": "http:\/\/rdf.freebase.com\/ns\/user\/hangy\/viaf",
"schemaSpace": "http:\/\/rdf.freebase.com\/ns\/type.object.id",
"view": {
"url": "http:\/\/viaf.org\/viaf\/{{id}}"
},
"defaultTypes": [
{
"id": "\/objectname",
"name": "Objectname"
}
]
}
EOT;
header ("Content-type: text/json\n\n");
echo $pizza; die;
echo json_encode($infoArray); die;
*/