Changeset 29065

Show
Ignore:
Timestamp:
19.05.2014 13:23:56 (6 years ago)
Author:
kjdon
Message:

configure the collection with the OAIConfig xml. this breaks the split between receptionist and MR as mostly this is used by receptionist.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/OAIMessageRouter.java

    r28989 r29065  
    5555    static Logger logger = Logger.getLogger(org.greenstone.gsdl3.core.MessageRouter.class.getName()); 
    5656 
    57  
     57  public Element oai_config = null; 
    5858    //*************************************************************** 
    5959    // public methods 
     
    7474        cleanUpModuleMapEntire(); 
    7575 
     76        // for oai, we don't do anything with the site config file. But we'll read it in and keep it in case need it later, eg for replace elements when retrieving metadata - which I don't think has been implemented 
    7677        File configFile = new File(GSFile.siteConfigFile(this.site_home)); 
    7778 
     
    9192        this.config_info = config_doc.getDocumentElement(); 
    9293 
    93         // for oai, we don't do anything with the config file. But we'll keep it in case need it later, eg for replace elements when retrieving metadata - which I don't think has been implemented 
    94  
     94        // this is the receptionists OAIConfig.xml. Need to rethink how the MR gets this this if we ever talk to remote site, and whether it should be using it anyway 
     95        this.oai_config = OAIXML.getOAIConfigXML(); 
     96        if (this.oai_config == null) 
     97        { 
     98          logger.error("Couldn't load in OAIConfig.xml"); 
     99          return false; 
     100        } 
    95101        Document doc = XMLConverter.newDOM(); 
    96102        // load up the collections 
     
    131137        if (!c.hasOAI()) { 
    132138          logger.info ("collection "+col_name+" has no OAI services. Not keeping it loaded"); 
     139          return false; 
     140        } 
     141        if (!c.configureOAI(this.oai_config)) { 
     142          logger.info("couldn't configure the collection : "+col_name +" with the oai config info"); 
    133143          return false; 
    134144        }