Project

General

Profile

« Previous | Next » 

Revision 6064

replace whitespace in generated docid scope (sanparks patch from 1.9.4 branch)

View differences:

src/edu/ucsb/nceas/metacat/clientview/ClientViewHelper.java
433 433
            //*** Keep it here for updating.
434 434
            setMetadataDoc(inputStream);
435 435
            //*** Get the Metadata File's DOC ID.
436
            lastDocId = getMetacatClient().getLastDocid(clientViewBean.getUsername());
437
            metaDocId = lastDocId = nextDocId(lastDocId, clientViewBean.getUsername());
436
            String scope = clientViewBean.getUsername();
437
            scope = scope.replaceAll(" ", "_");
438
            scope = scope.toLowerCase();
439
            lastDocId = getMetacatClient().getLastDocid(scope);
440
            metaDocId = lastDocId = nextDocId(lastDocId, scope);
438 441
            
439 442
            //*** Loop thru all of the data files, get fileName and inputStream.
440 443
            dataDocIDs = new HashMap();
441 444
            fileName = new StringBuffer();
442 445
            while ((inputStream = getNextInputStream(multipartParser, fileName, paramsMap)) != null) {
443 446
                //*** Get the data file's DOC ID.
444
                nextDocId = nextDocId(lastDocId, clientViewBean.getUsername());
447
                nextDocId = nextDocId(lastDocId, scope);
445 448
                
446 449
                fileInfo = parseFileInfo(fileName.toString());
447 450
                dataDocIDs.put(nextDocId, fileInfo);

Also available in: Unified diff