source: TI02-CSML/trunk/csml/csmllibs/csmlfeaturefilemap.py @ 1466

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI02-CSML/trunk/csml/csmllibs/csmlfeaturefilemap.py@2243
Revision 1466, 1.7 KB checked in by domlowe, 13 years ago (diff)

changes to allow time values to use different reference systems within the same feature

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1#!/usr/bin/env python
2
3
4class FeatureFileMap(object):
5        #this class is important to describe the relationship between the file structure and the feature type 'relationships'
6        #ie. a gridseriesfeature may span multiple files in a directory
7        #or a directory may contain several files each containing separate features.
8       
9       
10        #representative files - files that represent themselves as stand alone feature containers or represent a group of identically
11        #structured files. eg model data
12        #has featureType attribute
13       
14        #relatedFiles - files represented by the represented file (files of same structure as represented file -eg model data)
15        #also has featureType attribute
16               
17        def __init__(self):
18                #list of representativeFile objects,
19                #each representativeFile object has a list of relatedFiles
20                #each representativeFile has a featureType
21                #each relatedFile has a featureType
22                self.repFiles=[]
23               
24        def addRepresentativeFile(self,repfileobj):
25                self.repFiles.append(repfileobj)       
26               
27        def getRepresentativeFiles(self):
28                return self.repFiles
29
30               
31class representativeFile(object):
32        def __init__(self,filename):
33                self.repFile=filename
34                self.relatedFiles=[]
35               
36        def getRepresentativeFileName(self):
37                return self.repFile
38       
39        def addRelatedFile(self,relfile):
40                self.relatedFiles.append(relfile)
41               
42        def getRelatedFiles(self):
43                return self.relatedFiles
44       
45        def setFeatureType(self,ft):
46                self.featureType=ft
47
48        def getFeatureType(self):
49                return self.featureType
50       
51class relatedFile(object):
52        def __init__(self,filename):
53                self.relatedFile=filename
54               
55        def getRelatedFileName(self):
56                return self.relatedFile
57       
58        def setFeatureType(self,ft):
59                self.featureType=ft
60
61        def getFeatureType(self):
62                return self.featureType
63       
64       
65               
66               
Note: See TracBrowser for help on using the repository browser.