Ignore:
Timestamp:
19/01/09 09:53:38 (11 years ago)
Author:
cbyrom
Message:

Temporarily disable validation of vocab term data - whilst the editor
produces docs with terms that haven't been defined yet + add a check
to avoid testing spatial data integrity unless actually required.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ndgCommon/trunk/ndg/common/src/lib/atomvalidator.py

    r4810 r4830  
    121121         
    122122        # now check the vocab terms 
    123         self.__validateVocabData() 
     123        # NB, lots of vocab terms are not properly defined ATM - so disable this 
     124        # so we can use the editor for testing purposes 
     125        #self.__validateVocabData() 
    124126         
    125127        # check the atom conforms to the schema 
     
    176178                spatialError += "Spatial coverage data not in numerical format.%s"  %self._nl 
    177179 
    178             if not self.__isRangeValid(self._atom.minX ,self._atom.maxX): 
    179                 spatialError += "Max longitude is less than min longitude.%s"  %self._nl 
    180                  
    181             if not self.__isRangeValid(self._atom.minY ,self._atom.maxY): 
    182                 spatialError += "Max latitude is less than min latitude.%s"  %self._nl 
     180            # don't bother checking ranges, if a problem has already been found 
     181            if not spatialError: 
     182                if not self.__isRangeValid(self._atom.minX ,self._atom.maxX): 
     183                    spatialError += "Max longitude is less than min longitude.%s"  %self._nl 
     184                     
     185                if not self.__isRangeValid(self._atom.minY ,self._atom.maxY): 
     186                    spatialError += "Max latitude is less than min latitude.%s"  %self._nl 
    183187                 
    184188                 
     
    323327        atomPath = self._atom.getDefaultCollectionPath() + self._atom.atomName 
    324328        try: 
    325             errors = self._eXist.checkAtomSchemaCompliance(atomPath, atom = self._atom, \ 
     329            errors = self._eXist.checkAtomSchemaCompliance(atomPath, atom = self._atom, 
    326330                                                           isDebug = self._isDebug) 
    327331            for error in errors: 
Note: See TracChangeset for help on using the changeset viewer.