Changeset 25648


Ignore:
Timestamp:
2012-05-23T16:44:28+12:00 (12 years ago)
Author:
sjm84
Message:

More reformatting and minor fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/GS2Construct.java

    r25635 r25648  
    168168        waitUntilReady(request);
    169169        Element buildResponse = processBuildCollection(request);
    170         if(buildResponse.getElementsByTagName(GSXML.ERROR_ELEM).getLength() > 0)
     170        if (buildResponse.getElementsByTagName(GSXML.ERROR_ELEM).getLength() > 0)
    171171        {
    172172            return buildResponse;
    173173        }
    174        
     174
    175175        Element statusElem = (Element) buildResponse.getElementsByTagName(GSXML.STATUS_ELEM).item(0);
    176176        String id = statusElem.getAttribute("pid");
     
    755755        return null;
    756756    }
    757    
     757
    758758    protected void waitUntilReady(Element request)
    759759    {
     
    763763        String collection = (String)params.get(COL_PARAM);
    764764
    765         if(checkCollectionIsNotBusy(collection))
     765        if (checkCollectionIsNotBusy(collection))
    766766        {
    767767            return;
    768768        }
    769769
    770         while(collectionOperationMap.get(collection) != null)
     770        while (collectionOperationMap.get(collection) != null)
    771771        {
    772772            try
     
    774774                Thread.currentThread().sleep(1000);
    775775            }
    776             catch(Exception ex)
     776            catch (Exception ex)
    777777            {
    778778                ex.printStackTrace();
     
    780780        }
    781781    }
    782    
     782
    783783    protected void signalReady(Element request)
    784784    {
     
    790790        collectionOperationMap.remove(collection);
    791791    }
    792    
     792
    793793    protected synchronized boolean checkCollectionIsNotBusy(String collection)
    794794    {
    795         if(collectionOperationMap.get(collection) == null)
     795        if (collectionOperationMap.get(collection) == null)
    796796        {
    797797            collectionOperationMap.put(collection, true);
Note: See TracChangeset for help on using the changeset viewer.