/[volute]/trunk/projects/grid/vospace/php_endpoint/vospace_service.php
ViewVC logotype

Contents of /trunk/projects/grid/vospace/php_endpoint/vospace_service.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 734 - (show annotations)
Tue Aug 19 19:37:17 2008 UTC (12 years, 3 months ago) by richard.p.wagner
File size: 2022 byte(s)
working on listing nodes
1 <?php
2
3 require_once('config.inc');
4
5 require_once(BACKEND.'node.php');
6 require_once(BACKEND.'vospace.php');
7
8 class VOSpaceService {
9
10 function GetViews($message)
11 {
12
13 return $data;
14
15 }
16
17 function GetProtocols($message)
18 {
19
20 return $data;
21
22 }
23
24 function GetProperties(){
25
26 $vospace = &new VOSpace();
27
28 $properties = $vospace->getProperties();
29 return $properties;
30 }
31
32 function CreateNode($message)
33 {
34
35 return $data;
36
37 }
38
39 function DeleteNode($message)
40 {
41
42 return $data;
43
44 }
45
46 function MoveNode($message)
47 {
48
49 return $data;
50
51 }
52
53 function CopyNode($message)
54 {
55
56
57 return $data;
58
59 }
60
61 function GetNode($target)
62 {
63
64 $node = new Node($target->target);
65
66 if(!$node->exists()){
67 $bad_target = $target->target;
68 throw new SoapFault("Server", "Node not found.", " ",
69 array("uri" => $bad_target),
70 "NodeNotFoundFault");
71 }
72
73 $node->populateProperties();
74 return array('node' => $node);
75 }
76
77 function SetNode($message)
78 {
79
80
81 return $data;
82
83 }
84
85 function ListNodes($message){
86 $data = array("response"=>array("token" => "foo", "limit" => 100, "detail" => "min", "nodes"=> array()));
87 return $data;
88 }
89
90 function FindNodes($message)
91 {
92
93 return $data;
94
95 }
96
97 function PushToVoSpace($message)
98 {
99
100 return $data;
101
102 }
103
104 function PullToVoSpace($message)
105 {
106
107 return $data;
108
109 }
110
111 function PullFromVoSpace($request)
112 {
113 $node = new Node($request->source);
114
115 if(!$node->exists()){
116 $bad_target = $request->source;
117 throw new SoapFault("Server", "Node not found.", " ",
118 array("uri" => $bad_target),
119 "NodeNotFoundFault");
120 }
121
122 $view = $node->getView();
123 $protocols = $node->getProtocols();
124
125 // transfer element, with at least a view and protocol element
126 $response = array('transfer'=>
127 array('view' => $view,
128 'protocol' => $protocols));
129
130 return $response;
131 }
132
133 function PushFromVoSpace($message){
134
135 return $data;
136
137 }
138
139 }
140
141 ?>

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26