/[volute]/trunk/projects/grid/vospace/php_endpoint/backends/file_system/node.php
ViewVC logotype

Diff of /trunk/projects/grid/vospace/php_endpoint/backends/file_system/node.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 733 by richard.p.wagner, Tue Aug 19 05:41:49 2008 UTC revision 734 by richard.p.wagner, Tue Aug 19 19:37:17 2008 UTC
# Line 7  Line 7 
7    public $uri;    public $uri;
8    public $file_path;    public $file_path;
9    public $properties;    public $properties;
10      public $endpoint;
11    
12    function __construct($uri) {    function __construct($uri) {
   
13      $this->uri = $uri;      $this->uri = $uri;
14        $this->properties = array();
15      $this->file_path = str_replace( VOSPACE_ROOT.'/', FILE_SYSTEM_ROOT, $uri );      $this->file_path = str_replace( VOSPACE_ROOT.'/', FILE_SYSTEM_ROOT, $uri );
16        $this->endpoint = str_replace( VOSPACE_ROOT.'/', HTTP_ROOT, $uri );
17    }    }
18    
19    function populateProperties($detail = "min"){    function populateProperties($detail = "min"){
20      // tells the node to fill in it's properties values      // Tells the node to fill in it's properties values.
21      // file or directory had better exist!      // File or directory had better exist!
22      global $provided_properties;      global $provided_properties;
23      $f_stats = stat($this->file_path);      $f_stats = stat($this->file_path);
24      $this->properties = $provided_properties;      $this->properties = $provided_properties;
# Line 29  Line 31 
31    function exists(){    function exists(){
32      if( file_exists( $this->file_path ) )      if( file_exists( $this->file_path ) )
33        return True;        return True;
   
34      return False;      return False;
35    }    }
36    
37      function getView(){
38        return array('uri' => 'ivo://net.ivoa.vospace/views#identity',
39                     'original'=>True);
40      }
41    
42      function getProtocols(){
43        return array('endpoint' => $this->endpoint,
44                     'uri' => 'ivo://net.ivoa.vospace/protocols#http-client');
45      }
46  }  }
47    
48  ?>  ?>

Legend:
Removed from v.733  
changed lines
  Added in v.734

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