Ignore:
Timestamp:
26/11/08 10:06:40 (12 years ago)
Author:
cbyrom
Message:

Create new class, AtomValidator?, to act as a utility class for the Atom class - allowing validation of the following data:
i) External links

ii) Vocab data
iii) Schema compliance
iv) unicode compliance - with utf-8 encoding
v) data consistency within the atom data model


Store an instance in a global MILK variable for easy re-use by the atom-editor. Also, remove redundant geoUtilities class.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/config/milkMiddleware.py

    r4485 r4491  
    44from paste.deploy import CONFIG 
    55from ndgUtils.models.myconfig import myConfig 
     6from ndgUtils.lib.atomvalidator import AtomValidator 
    67 
    78class NDGConfigError(Exception):   
     
    6061        if cf.config.has_option('DISCOVERY', 'discoveryServiceURL'): 
    6162            self.globals.discoveryServiceURL = \ 
    62                 cf.config.get('DISCOVERY', 'discoveryServiceURL')        
     63                cf.config.get('DISCOVERY', 'discoveryServiceURL') 
     64                 
     65        self.globals.pwFile = cf.get('NDG_EXIST','passwordFile') 
     66        # set up the validator for atoms - to allow re-use across the app 
     67        self.globals.validator = AtomValidator(None, dbConfigFile = self.globals.pwFile, \ 
     68                                       raiseException = True, newLineChar="<br/>") 
    6369 
    64          
    6570        # Security Related 
    6671 
Note: See TracChangeset for help on using the changeset viewer.