Changeset 5746
- Timestamp:
- 22/09/09 12:48:50 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ndgCommon/trunk/ndg/common/src/models/ndgObject.py
r5608 r5746 81 81 ok=1 82 82 if len(bits)==3: 83 83 84 repository,schema,localID=bits 84 85 self.uri=uri.replace(':','__') 85 86 elif len(bits2)==3: 87 86 88 repository,schema,localID=bits2 87 89 self.uri=uri 88 90 elif len(bits2)>3: 91 89 92 repository,schema,localID=bits2[0],bits2[1],'__'.join(bits2[2:]) 90 93 self.uri=uri … … 114 117 Set up the configuration for retrieving this document 115 118 ''' 119 120 116 121 logging.debug("Setting up configuration for retrieving document") 122 123 124 117 125 self.config=config 118 if not config: 126 if not config: 119 127 return 128 129 self.discoveryServiceURL = self.config.get('DISCOVERY','discoveryServiceURL') 130 120 131 121 132 self.server=self.config.get('DISCOVERY','default') … … 127 138 self.viewService='%s/view/'%server 128 139 discoveryBASE='%s%s__%s__%s'%(self.viewService,self.repository,self.schema,self.localID) 129 140 130 141 # set default return format - if not set, just return in original format 131 142 fmt = self.config.get('DISCOVERY','formatDefault') 132 143 logging.info("Default discovery format set to: %s" %fmt) 133 144 134 145 # We'll build the following even if it can't be used (as would be the case for 135 146 # a non data entity B record or an A record) because it's a useful template. … … 138 149 139 150 self.discoveryURL=self.__buildURL(discoveryBASE,[qs]) 140 151 141 152 # config file should have details on the service to use for the repository 142 153 # - if not, default to 'unknown'
Note: See TracChangeset
for help on using the changeset viewer.