Project

General

Profile

« Previous | Next » 

Revision 4554

Added by walbridge about 16 years ago

add start of otherEntity processing for registry edits

View differences:

src/perl/register-dataset.cgi
2410 2410
    if ($results->size() > 1) {
2411 2411
        errMoreThanN("methods/methodStep/description/section");    
2412 2412
    } else {
2413

  
2414 2413
        my @methodPara;
2415 2414
        foreach $node ($results->get_nodelist) {
2416 2415
            my @children = $node->childNodes;
......
2427 2426
                    $methodPara[scalar(@methodPara)] = $para;
2428 2427
                }
2429 2428
            }
2430
	    $$templateVars{'hasMethod'} = "true";
2429
            $$templateVars{'hasMethod'} = "true";
2431 2430
        }
2432 2431
        if (scalar(@methodPara) > 0) {
2433 2432
            $$templateVars{'methodPara'} = \@methodPara;
......
2442 2441
        foreach $node ($results->get_nodelist) {
2443 2442
            my $studyExtentDescription = $node->textContent();
2444 2443
            $$templateVars{'studyExtentDescription'} = $studyExtentDescription;
2445

  
2446
	    $$templateVars{'hasMethod'} = "true";
2444
            $$templateVars{'hasMethod'} = "true";
2447 2445
        }
2448 2446
    }
2449 2447

  
......
2455 2453
        foreach $node ($results->get_nodelist) {
2456 2454
            my $samplingDescription = $node->textContent();
2457 2455
            $$templateVars{'samplingDescription'} = $samplingDescription;
2458

  
2459
	    $$templateVars{'hasMethod'} = "true";
2456
            $$templateVars{'hasMethod'} = "true";
2460 2457
        }
2461 2458
    }
2462 2459

  
......
2511 2508
        push(@errorMessages, $error."\n");
2512 2509
    }
2513 2510

  
2514
    ########################################################
2515

  
2516

  
2511
    # handle otherEntity objects, by populating the relevant file form elements
2512
    $results = $doc->findnodes('./otherEntity');
2513
    foreach $node ($results->get_nodelist) {
2514
        # entityName
2515
        # physical/
2516
        #         size
2517
        #         authentication
2518
        #         dataformat/externallyDefinedFormat/formatName
2519
        #         distribution/online
2520
        #         distribution/access
2521
    }
2517 2522
    dontOccur($doc, "./dataTable", "dataTable");
2518 2523
    dontOccur($doc, "./spatialRaster", "spatialRaster");
2519 2524
    dontOccur($doc, "./spatialVector", "spatialVector");
2520 2525
    dontOccur($doc, "./storedProcedure", "storedProcedure");
2521 2526
    dontOccur($doc, "./view", "view");
2522
    dontOccur($doc, "./otherEntity", "otherEntity");
2523 2527
    dontOccur($doc, "./references", "references");
2524 2528
    
2525 2529
    dontOccur($doc, "//citation", "citation");
......
2528 2532
    $results = $doc->findnodes(
2529 2533
            '//additionalMetadata/moderatorComment');
2530 2534
    if($results->size == 0){
2531
    	dontOccur($doc, "//additionalMetadata", "additionalMetadata");    
2535
        dontOccur($doc, "//additionalMetadata", "additionalMetadata");    
2532 2536
    }
2533 2537
}
2534 2538

  

Also available in: Unified diff