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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 734 - (hide annotations)
Tue Aug 19 19:37:17 2008 UTC (12 years, 5 months ago) by richard.p.wagner
File size: 2022 byte(s)
working on listing nodes
1 richard.p.wagner 106 <?php
2    
3 richard.p.wagner 731 require_once('config.inc');
4 richard.p.wagner 106
5 richard.p.wagner 108 require_once(BACKEND.'node.php');
6 richard.p.wagner 734 require_once(BACKEND.'vospace.php');
7 richard.p.wagner 106
8     class VOSpaceService {
9    
10     function GetViews($message)
11     {
12    
13 richard.p.wagner 730 return $data;
14 richard.p.wagner 106
15     }
16    
17     function GetProtocols($message)
18     {
19    
20 richard.p.wagner 730 return $data;
21 richard.p.wagner 106
22     }
23    
24 richard.p.wagner 528 function GetProperties(){
25 richard.p.wagner 106
26 richard.p.wagner 734 $vospace = &new VOSpace();
27 richard.p.wagner 106
28 richard.p.wagner 734 $properties = $vospace->getProperties();
29     return $properties;
30 richard.p.wagner 106 }
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 richard.p.wagner 730 return $data;
50 richard.p.wagner 106
51     }
52    
53     function CopyNode($message)
54     {
55    
56    
57 richard.p.wagner 730 return $data;
58 richard.p.wagner 106
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 richard.p.wagner 731 $node->populateProperties();
74 richard.p.wagner 106 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 richard.p.wagner 734
90 richard.p.wagner 106 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 richard.p.wagner 731 function PullFromVoSpace($request)
112 richard.p.wagner 106 {
113 richard.p.wagner 731 $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 richard.p.wagner 106
122 richard.p.wagner 731 $view = $node->getView();
123     $protocols = $node->getProtocols();
124 richard.p.wagner 106
125 richard.p.wagner 734 // transfer element, with at least a view and protocol element
126     $response = array('transfer'=>
127     array('view' => $view,
128     'protocol' => $protocols));
129 richard.p.wagner 731
130     return $response;
131 richard.p.wagner 106 }
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