Ignore:
Timestamp:
11/01/07 06:00:15 (13 years ago)
Author:
lawrence
Message:

Modifications to support new exist database layout for discovery
(don't yet work on glue!)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI07-MOLES/trunk/PythonCode/wsgi/DocumentRetrieve.py

    r1955 r1989  
    3333            raise TypeError('DocumentRetrieve code does not yet know how to find specific CSML Documents') 
    3434         
    35         elif schema[0:5] == 'NDG-B': 
     35        elif (schema[0:5] == 'NDG-B' or schema[0:3]=='DIF'): 
    3636             
    3737            # find out what type of object actually exists of this sort 
    3838            # 0 - None, 1 - Activity, 2 - DPT, 3 - ObsStn, 4 - DE 
     39            # if the schema is a DIF, we expect to find a DE from the DIF ingestion to MOLES ... 
    3940             
    4041            # the following xquery can be used to generate a listing of the database 
     
    4647            xquery=ObjectTypeQuery 
    4748            xquery=queryReplace(xquery,repository,localID,targetCollection) 
    48  
     49            print xquery 
    4950            id,summary=self.executeQuery(xquery) 
    5051            hits=summary['hits'] 
    5152             
    52             if hits!=1: raise ('[%s] documents match this query - internal error!'%hits) 
     53            if hits!=1: raise ValueError,'%s documents returned for uri %s:%s:%s'%(hits,repository,'NDG-B0',localID) 
    5354             
    5455            # check output formats 
Note: See TracChangeset for help on using the changeset viewer.