Project

General

Profile

Revision 2148

Added by sgarg over 16 years ago

Made changes to fix bug# 1303 and 1367.(Both are related) - corresponding changes need to be made in tmpl file and testing needs to be done before bugs can be closed.

View differences:

register-dataset.cgi
73 73
$config->define("datasetpubid");
74 74
$config->define("datasetsysid");
75 75
$config->define("hasKeyword", { DEFAULT => 'true'} );
76
$config->define("hasTemporal", { DEFAULT => 'true'} );
77
$config->define("hasSpatial", { DEFAULT => 'true'} );
78
$config->define("hasTaxonomic", { DEFAULT => 'true'} );
79
$config->define("hasMethod", { DEFAULT => 'true'} );
80
$config->define("temporalRequired", { DEFAULT => 'true'} );
81
$config->define("spatialRequired", { DEFAULT => 'true'} );
76 82
$config->define("mailhost");
77 83
$config->define("sender");
78 84
$config->define("recipient");
......
119 125
my $datasetpubid = $config->datasetpubid();
120 126
my $datasetsysid = $config->datasetsysid();
121 127
my $hasKeyword = $config->hasKeyword();
128
my $hasTemporal = $config->hasTemporal();
129
my $hasSpatial = $config->hasSpatial();
130
my $hasTaxonomic = $config->hasTaxonomic();
131
my $hasMethod = $config->hasMethod();
132
my $temporalRequired = $config->temporalRequired();
133
my $spatialRequired = $config->spatialRequired();
122 134
my $mailhost = $config->mailhost();
123 135
my $sender = $config->sender();
124 136
my $recipient = $config->recipient();
......
236 248
    }
237 249

  
238 250
    $$templateVars{'hasKeyword'} = $hasKeyword;
251
    $$templateVars{'hasTemporal'} = $hasTemporal;
252
    $$templateVars{'hasSpatial'} = $hasSpatial;
253
    $$templateVars{'hasTaxonomic'} = $hasTaxonomic;
254
    $$templateVars{'hasMethod'} = $hasMethod;
255
    $$templateVars{'temporalRequired'} = $temporalRequired;
256
    $$templateVars{'spatialRequired'} = $spatialRequired;
239 257

  
240 258
    $$templateVars{'siteList'} = \@sortedSites;
241 259
    $$templateVars{'section'} = "Entry Form";
......
545 563
    push(@invalidParams, "Abstract is missing.")
546 564
        unless hasContent($FORM::abstract);
547 565
    push(@invalidParams, "Beginning year of data set is missing.")
548
        unless hasContent($FORM::beginningYear);
566
        unless (hasContent($FORM::beginningYear) || $FORM::temporalRequired ne 'true');
549 567
    push(@invalidParams, "Geographic description is missing.")
550
        unless (hasContent($FORM::geogdesc));
568
        unless (hasContent($FORM::geogdesc) || $FORM::spatialRequired ne 'true');
551 569

  
552 570
    # If the "use site" coord. box is checked and if the site is in 
553 571
    # the longitude hash ...  && ($siteLatDMS{$FORM::site})
554 572
   
555
    if (($FORM::useSiteCoord) && ($siteLatDMS{$FORM::site}) ) {
573
    if($FORM::hasSpatial eq 'true'){
574
	if (($FORM::useSiteCoord) && ($siteLatDMS{$FORM::site}) ) {
556 575
        
557
        $latDeg1 = $siteLatDMS{$FORM::site}[0];
558
        $latMin1 = $siteLatDMS{$FORM::site}[1];
559
        $latSec1 = $siteLatDMS{$FORM::site}[2];
560
        $hemisphLat1 = $siteLatDMS{$FORM::site}[3];
561
        $longDeg1 = $siteLongDMS{$FORM::site}[0];
562
        $longMin1 = $siteLongDMS{$FORM::site}[1];
563
        $longSec1 = $siteLongDMS{$FORM::site}[2];
564
        $hemisphLong1 = $siteLongDMS{$FORM::site}[3];
565
     
566
    }  else {
567
    
568
        $latDeg1 = $FORM::latDeg1;
569
        $latMin1 = $FORM::latMin1;
570
        $latSec1 = $FORM::latSec1;
571
        $hemisphLat1 = $FORM::hemisphLat1;
572
        $longDeg1 = $FORM::longDeg1;
573
        $longMin1 = $FORM::longMin1;
574
        $longSec1 = $FORM::longSec1;
575
        $hemisphLong1 = $FORM::hemisphLong1;
576
	    $latDeg1 = $siteLatDMS{$FORM::site}[0];
577
	    $latMin1 = $siteLatDMS{$FORM::site}[1];
578
	    $latSec1 = $siteLatDMS{$FORM::site}[2];
579
	    $hemisphLat1 = $siteLatDMS{$FORM::site}[3];
580
	    $longDeg1 = $siteLongDMS{$FORM::site}[0];
581
	    $longMin1 = $siteLongDMS{$FORM::site}[1];
582
	    $longSec1 = $siteLongDMS{$FORM::site}[2];
583
	    $hemisphLong1 = $siteLongDMS{$FORM::site}[3];
584
	    
585
	}  else {
586
	    
587
	    $latDeg1 = $FORM::latDeg1;
588
	    $latMin1 = $FORM::latMin1;
589
	    $latSec1 = $FORM::latSec1;
590
	    $hemisphLat1 = $FORM::hemisphLat1;
591
	    $longDeg1 = $FORM::longDeg1;
592
	    $longMin1 = $FORM::longMin1;
593
	    $longSec1 = $FORM::longSec1;
594
	    $hemisphLong1 = $FORM::hemisphLong1;
595
	}
576 596
    }
577 597
    
578 598
    # Check if latDeg1 and longDeg1 has values if useSiteCoord is used. 
579 599
    # This check is required because some of the sites dont have lat 
580 600
    # and long mentioned in the config file. 
581 601

  
582
    if ($FORM::useSiteCoord) {
583
    push(@invalidParams, "The Data Registry doesn't have latitude and longitude information for the site that you chose. Please go back and enter the spatial information.")
584
        unless(hasContent($latDeg1) && hasContent($longDeg1));
585
    }else{
586
    push(@invalidParams, "Latitude degrees are missing.")
587
        unless hasContent($latDeg1);
588
    push(@invalidParams, "Longitude degrees are missing.")
589
        unless hasContent($longDeg1);
602

  
603
    if($FORM::hasSpatial eq 'true'){
604
	if ($FORM::useSiteCoord ) {
605
	    push(@invalidParams, "The Data Registry doesn't have latitude and longitude information for the site that you chose. Please go back and enter the spatial information.")
606
		unless(hasContent($latDeg1) && hasContent($longDeg1));
607
	}else{
608
	    push(@invalidParams, "Latitude degrees are missing.")
609
		unless hasContent($latDeg1);
610
	    push(@invalidParams, "Longitude degrees are missing.")
611
		unless hasContent($longDeg1);
612
	}
590 613
    }
591 614

  
592
    push(@invalidParams, 
593
        "You must provide a method description if you provide a method title.")
594
        if (hasContent($FORM::methodTitle) && ( !(scalar(@FORM::methodPara) > 0) 
595
                || (! hasContent($FORM::methodPara[0]))));
596
    push(@invalidParams, 
597
        "You must provide a method description if you provide a study extent description.")
598
        if (hasContent($FORM::studyExtentDescription) && (!(scalar(@FORM::methodPara) > 0) 
599
                || (! hasContent($FORM::methodPara[0]))));
600
    push(@invalidParams, 
601
        "You must provide both a study extent description and a sampling description, or neither.")
602
        if (
615
    if($FORM::hasMethod eq 'true'){
616
	push(@invalidParams, 
617
	     "You must provide a method description if you provide a method title.")
618
	    if (hasContent($FORM::methodTitle) && ( !(scalar(@FORM::methodPara) > 0) 
619
						    || (! hasContent($FORM::methodPara[0]))));
620
	push(@invalidParams, 
621
	     "You must provide a method description if you provide a study extent description.")
622
	    if (hasContent($FORM::studyExtentDescription) && (!(scalar(@FORM::methodPara) > 0) 
623
							      || (! hasContent($FORM::methodPara[0]))));
624
	push(@invalidParams, 
625
	     "You must provide both a study extent description and a sampling description, or neither.")
626
	    if (
603 627
                (hasContent($FORM::studyExtentDescription) && !hasContent($FORM::samplingDescription)) ||
604 628
                (!hasContent($FORM::studyExtentDescription) && hasContent($FORM::samplingDescription))
605
           );
629
		);
630
    }
606 631

  
607 632
    push(@invalidParams, "Contact first name is missing.")
608 633
    unless (hasContent($FORM::origNamefirstContact) || 
......
1006 1031
    $doc .= "</offline>\n";
1007 1032
    $doc .= "</distribution>\n";
1008 1033
            
1009
    $doc .= "<coverage>\n";
1010
    $doc .= "<temporalCoverage>\n";
1034
    my $cov = "";
1011 1035

  
1012

  
1013 1036
    if (hasContent($FORM::endingYear)) {
1014
    $doc .= "<rangeOfDates>\n";
1015
    if (hasContent($FORM::beginningMonth)) {
1016
        my $month = ("JAN","FEB","MAR","APR","MAY","JUN",
1017
             "JUL","AUG","SEP","OCT","NOV","DEC")
1018
        [$FORM::beginningMonth - 1];
1019
        $doc .= "<beginDate>\n";
1020
        $doc .= "<calendarDate>";
1021
        $doc .= normalize($FORM::beginningYear)."-".normalize($FORM::beginningMonth)."-".normalize($FORM::beginningDay);
1022
        $doc .= "</calendarDate>\n";
1023
        $doc .= "</beginDate>\n";
1037
	$cov .= "<temporalCoverage>\n";
1038
	$cov .= "<rangeOfDates>\n";
1039
	if (hasContent($FORM::beginningMonth)) {
1040
	    my $month = ("JAN","FEB","MAR","APR","MAY","JUN",
1041
			 "JUL","AUG","SEP","OCT","NOV","DEC")
1042
		[$FORM::beginningMonth - 1];
1043
	    $cov .= "<beginDate>\n";
1044
	    $cov .= "<calendarDate>";
1045
	    $cov .= normalize($FORM::beginningYear)."-".normalize($FORM::beginningMonth)."-".normalize($FORM::beginningDay);
1046
	    $cov .= "</calendarDate>\n";
1047
	    $cov .= "</beginDate>\n";
1048
	} else {
1049
	    $cov .= "<beginDate>\n";
1050
	    $cov .= "<calendarDate>";
1051
	    $cov .= normalize($FORM::beginningYear);
1052
	    $cov .= "</calendarDate>\n";
1053
	    $cov .= "</beginDate>\n";
1054
	}
1055
	
1056
	if (hasContent($FORM::endingMonth)) {
1057
	    my $month = ("JAN","FEB","MAR","APR","MAY","JUN",
1058
			 "JUL","AUG","SEP","OCT","NOV","DEC")
1059
		[$FORM::endingMonth - 1];
1060
	    $cov .= "<endDate>\n";
1061
	    $cov .= "<calendarDate>";
1062
	    $cov .= normalize($FORM::endingYear)."-".normalize($FORM::endingMonth)."-".normalize($FORM::endingDay);
1063
	    $cov .= "</calendarDate>\n";
1064
	    $cov .= "</endDate>\n";
1065
	} else {
1066
	    $cov .= "<endDate>\n";
1067
	    $cov .= "<calendarDate>";
1068
	    $cov .= normalize($FORM::endingYear);
1069
	    $cov .= "</calendarDate>\n";
1070
	    $cov .= "</endDate>\n";
1071
	}
1072
	$cov .= "</rangeOfDates>\n";
1073
	$cov .= "</temporalCoverage>\n";
1024 1074
    } else {
1025
        $doc .= "<beginDate>\n";
1026
        $doc .= "<calendarDate>";
1027
        $doc .= normalize($FORM::beginningYear);
1028
        $doc .= "</calendarDate>\n";
1029
        $doc .= "</beginDate>\n";
1075
	if(hasContent($FORM::beginningYear)) {
1076
	    $cov .= "<temporalCoverage>\n";
1077
	    $cov .= "<singleDateTime>\n";
1078
	    if (hasContent($FORM::beginningMonth)) {
1079
		my $month = ("JAN","FEB","MAR","APR","MAY","JUN",
1080
			     "JUL","AUG","SEP","OCT","NOV","DEC")
1081
		    [$FORM::beginningMonth - 1];
1082
		$cov .= "<calendarDate>";
1083
		$cov .= normalize($FORM::beginningYear)."-".normalize($FORM::beginningMonth)."-".normalize($FORM::beginningDay);
1084
		$cov .= "</calendarDate>\n";
1085
	    } else {
1086
		$cov .= "<calendarDate>";
1087
		$cov .= normalize($FORM::beginningYear);
1088
		$cov .= "</calendarDate>\n";
1089
	    }
1090
	    $cov .= "</singleDateTime>\n";
1091
	    $cov .= "</temporalCoverage>\n";
1092
	}
1030 1093
    }
1031

  
1032
    if (hasContent($FORM::endingMonth)) {
1033
        my $month = ("JAN","FEB","MAR","APR","MAY","JUN",
1034
             "JUL","AUG","SEP","OCT","NOV","DEC")
1035
        [$FORM::endingMonth - 1];
1036
        $doc .= "<endDate>\n";
1037
        $doc .= "<calendarDate>";
1038
        $doc .= normalize($FORM::endingYear)."-".normalize($FORM::endingMonth)."-".normalize($FORM::endingDay);
1039
        $doc .= "</calendarDate>\n";
1040
        $doc .= "</endDate>\n";
1041
    } else {
1042
        $doc .= "<endDate>\n";
1043
        $doc .= "<calendarDate>";
1044
        $doc .= normalize($FORM::endingYear);
1045
        $doc .= "</calendarDate>\n";
1046
        $doc .= "</endDate>\n";
1047
    }
1048
    $doc .= "</rangeOfDates>\n";
1049
    } else {
1050
    $doc .= "<singleDateTime>\n";
1051
    if (hasContent($FORM::beginningMonth)) {
1052
        my $month = ("JAN","FEB","MAR","APR","MAY","JUN",
1053
             "JUL","AUG","SEP","OCT","NOV","DEC")
1054
        [$FORM::beginningMonth - 1];
1055
        $doc .= "<calendarDate>";
1056
	$doc .= normalize($FORM::beginningYear)."-".normalize($FORM::beginningMonth)."-".normalize($FORM::beginningDay);
1057
        $doc .= "</calendarDate>\n";
1058
    } else {
1059
        $doc .= "<calendarDate>";
1060
	$doc .= normalize($FORM::beginningYear);
1061
        $doc .= "</calendarDate>\n";
1062
    }
1063
    $doc .= "</singleDateTime>\n";
1064
    }
1065

  
1066
    $doc .= "</temporalCoverage>\n";
1067 1094
    
1068
    $doc .= "<geographicCoverage>\n";
1069
    $doc .= "<geographicDescription>".normalize($FORM::geogdesc)."</geographicDescription>\n";
1070
    $doc .= "<boundingCoordinates>\n";
1095
    if(hasContent($FORM::geodesc) || ($FORM::latDeg1 != 0 && $FORM::longDeg1 != 0)) {
1096
	$cov .= "<geographicCoverage>\n";
1071 1097

  
1072
    # if the second latitude is missing, then set the second lat/long pair 
1073
    # equal to the first this makes a point appear like a rectangle 
1074
    if ($FORM::latDeg2 == 0 && $FORM::latMin2 == 0 && $FORM::latSec2 == 0) {
1075
    
1076
        $latDeg2 = $latDeg1;
1077
        $latMin2 = $latMin1;
1078
        $latSec2 = $latSec1;
1079
        $hemisphLat2 = $hemisphLat1;
1080
        $longDeg2 = $longDeg1;
1081
        $longMin2 = $longMin1;
1082
        $longSec2 = $longSec1;
1083
        $hemisphLong2 = $hemisphLong1;
1098
	if(hasContent($FORM::geodesc)) {
1099
	    $cov .= "<geographicDescription>".normalize($FORM::geogdesc)."</geographicDescription>\n";
1100
	}
1101
	
1102
	if($FORM::latDeg1 != 0 && $FORM::longDeg1 != 0) {
1103
	    $cov .= "<boundingCoordinates>\n";
1104
	    # if the second latitude is missing, then set the second lat/long pair 
1105
	    # equal to the first this makes a point appear like a rectangle 
1106
	    if ($FORM::latDeg2 == 0 && $FORM::latMin2 == 0 && $FORM::latSec2 == 0) {
1107
		
1108
		$latDeg2 = $latDeg1;
1109
		$latMin2 = $latMin1;
1110
		$latSec2 = $latSec1;
1111
		$hemisphLat2 = $hemisphLat1;
1112
		$longDeg2 = $longDeg1;
1113
		$longMin2 = $longMin1;
1114
		$longSec2 = $longSec1;
1115
		$hemisphLong2 = $hemisphLong1;
1116
	    }
1117
	    else
1118
	    {
1119
		$latDeg2 = $FORM::latDeg2;
1120
		$latMin2 = $FORM::latMin2;
1121
		$latSec2 = $FORM::latSec2;
1122
		$hemisphLat2 = $FORM::hemisphLat2;
1123
		$longDeg2 = $FORM::longDeg2;
1124
		$longMin2 = $FORM::longMin2;
1125
		$longSec2 = $FORM::longSec2;
1126
		$hemisphLong2 = $FORM::hemisphLong2;
1127
	    } 
1128
	
1129
	
1130
	    my $hemisph;
1131
	    $hemisph = ($hemisphLong1 eq "W") ? -1 : 1;
1132
	    $cov .= "<westBoundingCoordinate>";
1133
	    $cov .= $hemisph * ($longDeg1 + (60*$longMin1+$longSec1)/3600);
1134
	    $cov .= "</westBoundingCoordinate>\n";
1135
	    
1136
	    $hemisph = ($hemisphLong2 eq "W") ? -1 : 1;
1137
	    $cov .= "<eastBoundingCoordinate>";
1138
	    $cov .= $hemisph * ($longDeg2 + (60*$longMin2+$longSec2)/3600);
1139
	    $cov .= "</eastBoundingCoordinate>\n";
1140
	    
1141
	    $hemisph = ($hemisphLat1 eq "S") ? -1 : 1;
1142
	    $cov .= "<northBoundingCoordinate>";
1143
	    $cov .= $hemisph * ($latDeg1 + (60*$latMin1+$latSec1)/3600);
1144
	    $cov .= "</northBoundingCoordinate>\n";
1145
	    
1146
	    $hemisph = ($hemisphLat2 eq "S") ? -1 : 1;
1147
	    $cov .= "<southBoundingCoordinate>";
1148
	    $cov .= $hemisph * ($latDeg2 + (60*$latMin2+$latSec2)/3600);
1149
	    $cov .= "</southBoundingCoordinate>\n";
1150
	    
1151
	    $cov .= "</boundingCoordinates>\n";
1152
	}
1153
	$cov .= "</geographicCoverage>\n";
1084 1154
    }
1085
    else
1086
    {
1087
        $latDeg2 = $FORM::latDeg2;
1088
        $latMin2 = $FORM::latMin2;
1089
        $latSec2 = $FORM::latSec2;
1090
        $hemisphLat2 = $FORM::hemisphLat2;
1091
        $longDeg2 = $FORM::longDeg2;
1092
        $longMin2 = $FORM::longMin2;
1093
        $longSec2 = $FORM::longSec2;
1094
        $hemisphLong2 = $FORM::hemisphLong2;
1095
    } 
1096
    
1097
   
1098
    my $hemisph;
1099
    $hemisph = ($hemisphLong1 eq "W") ? -1 : 1;
1100
    $doc .= "<westBoundingCoordinate>";
1101
    $doc .= $hemisph * ($longDeg1 + (60*$longMin1+$longSec1)/3600);
1102
    $doc .= "</westBoundingCoordinate>\n";
1103 1155

  
1104
    $hemisph = ($hemisphLong2 eq "W") ? -1 : 1;
1105
    $doc .= "<eastBoundingCoordinate>";
1106
    $doc .= $hemisph * ($longDeg2 + (60*$longMin2+$longSec2)/3600);
1107
    $doc .= "</eastBoundingCoordinate>\n";
1108

  
1109
    $hemisph = ($hemisphLat1 eq "S") ? -1 : 1;
1110
    $doc .= "<northBoundingCoordinate>";
1111
    $doc .= $hemisph * ($latDeg1 + (60*$latMin1+$latSec1)/3600);
1112
    $doc .= "</northBoundingCoordinate>\n";
1113

  
1114
    $hemisph = ($hemisphLat2 eq "S") ? -1 : 1;
1115
    $doc .= "<southBoundingCoordinate>";
1116
    $doc .= $hemisph * ($latDeg2 + (60*$latMin2+$latSec2)/3600);
1117
    $doc .= "</southBoundingCoordinate>\n";
1118

  
1119
    $doc .= "</boundingCoordinates>\n";
1120
    $doc .= "</geographicCoverage>\n";
1121

  
1122 1156
    # Write out the taxonomic coverage fields
1123 1157
    my $foundFirstTaxon = 0;
1124 1158
    foreach my $trn (param()) {
......
1129 1163
            if ( $taxIndex =~ /[0-9]/ ){
1130 1164
                if (hasContent(param($trn)) && hasContent(param($trv))) {
1131 1165
                    if (! $foundFirstTaxon) {
1132
                        $doc .= "<taxonomicCoverage>\n";
1166
                        $cov .= "<taxonomicCoverage>\n";
1133 1167
                        $foundFirstTaxon = 1;
1134 1168
                        if (hasContent($FORM::taxaAuth)) {
1135
                            $doc .= "<generalTaxonomicCoverage>".normalize($FORM::taxaAuth)."</generalTaxonomicCoverage>\n";
1169
                            $cov .= "<generalTaxonomicCoverage>".normalize($FORM::taxaAuth)."</generalTaxonomicCoverage>\n";
1136 1170
                        }
1137 1171
                    }
1138
                    $doc .= "<taxonomicClassification>\n";
1139
                    $doc .= "  <taxonRankName>".normalize(param($trn))."</taxonRankName>\n";
1140
                    $doc .= "  <taxonRankValue>".normalize(param($trv))."</taxonRankValue>\n";
1141
                    $doc .= "</taxonomicClassification>\n";
1172
                    $cov .= "<taxonomicClassification>\n";
1173
                    $cov .= "  <taxonRankName>".normalize(param($trn))."</taxonRankName>\n";
1174
                    $cov .= "  <taxonRankValue>".normalize(param($trv))."</taxonRankValue>\n";
1175
                    $cov .= "</taxonomicClassification>\n";
1142 1176
                }
1143 1177
            }
1144 1178
        }
1145 1179
    }
1146 1180
    if ($foundFirstTaxon) {
1147
        $doc .= "</taxonomicCoverage>\n";
1181
        $cov .= "</taxonomicCoverage>\n";
1148 1182
    }
1149 1183

  
1150
    $doc .= "</coverage>\n";
1151

  
1184
    $doc .= $cov;
1152 1185
    $doc .= $cont;
1153 1186
    $doc .= $publ;
1154 1187
    
......
1392 1425

  
1393 1426
    # set variable values
1394 1427
    $$templateVars{'hasKeyword'} = $hasKeyword;
1395
    
1428
    $$templateVars{'hasTemporal'} = $hasTemporal;
1429
    $$templateVars{'hasSpatial'} = $hasSpatial;
1430
    $$templateVars{'hasTaxonomic'} = $hasTaxonomic;
1431
    $$templateVars{'hasMethod'} = $hasMethod;
1432
    $$templateVars{'spatialRequired'} = $spatialRequired;
1433
    $$templateVars{'temporalRequired'} = $temporalRequired;
1434

  
1396 1435
    # find out the tag <alternateIdentifier>. 
1397 1436
    $results = $doc->findnodes('//dataset/alternateIdentifier');
1398 1437
    if ($results->size() > 1) {
......
1721 1760
                    $$templateVars{'endingYear'} = $x;
1722 1761
                    $$templateVars{'endingMonth'} = $y;
1723 1762
                    $$templateVars{'endingDay'} = $z;
1724
                
1763

  
1725 1764
                    $tempdate = "";
1726 1765
                    $tempdate = findValue($tempNode, "singleDateTime/calendarDate");
1727 1766
                    if($tempdate ne ""){
......
1730 1769
                        $$templateVars{'beginningMonth'} = $y;
1731 1770
                        $$templateVars{'beginningDay'} = $z;
1732 1771
                    }  
1772
		    
1773
		    $$templateVars{'hasTemporal'} = "true";
1733 1774
                }
1734 1775
            }
1735 1776

  
......
1800 1841
                    eval($$templateVars{'longMin2'} = int($coord));
1801 1842
                    eval($coord = ($coord - int($coord))*60);
1802 1843
                    eval($$templateVars{'longSec2'} = int($coord));
1844

  
1845
		    $$templateVars{'hasSpatial'} = "true";
1803 1846
                }
1804 1847
            }
1805 1848

  
......
1811 1854
                my $taxonRankValue = findValue($tempNode, "taxonRankValue");
1812 1855
                $$templateVars{"taxonRankName".$taxonIndex} = $taxonRankName;
1813 1856
                $$templateVars{"taxonRankValue".$taxonIndex} = $taxonRankValue;
1857
		
1858
		$$templateVars{'hasTaxonomic'} = "true";
1814 1859
            }
1815 1860
            $$templateVars{'taxaCount'} = $taxonIndex;
1816 1861
            my $taxaAuth = findValue($node, "./taxonomicCoverage/generalTaxonomicCoverage");
......
1897 1942
                    $methodPara[scalar(@methodPara)] = $para;
1898 1943
                }
1899 1944
            }
1945
	    $$templateVars{'hasMethod'} = "true";
1900 1946
        }
1901 1947
        if (scalar(@methodPara) > 0) {
1902 1948
            $$templateVars{'methodPara'} = \@methodPara;
......
1911 1957
        foreach $node ($results->get_nodelist) {
1912 1958
            my $studyExtentDescription = $node->textContent();
1913 1959
            $$templateVars{'studyExtentDescription'} = $studyExtentDescription;
1960

  
1961
	    $$templateVars{'hasMethod'} = "true";
1914 1962
        }
1915 1963
    }
1916 1964

  
......
1922 1970
        foreach $node ($results->get_nodelist) {
1923 1971
            my $samplingDescription = $node->textContent();
1924 1972
            $$templateVars{'samplingDescription'} = $samplingDescription;
1973

  
1974
	    $$templateVars{'hasMethod'} = "true";
1925 1975
        }
1926 1976
    }
1927 1977

  
......
2262 2312
    $$templateVars{'origStateContact'} = $FORM::origState;
2263 2313

  
2264 2314
    $$templateVars{'hasKeyword'} = $FORM::hasKeyword;
2315
    $$templateVars{'hasTemporal'} = $FORM::hasTemporal;
2316
    $$templateVars{'hasSpatial'} = $FORM::hasSpatial;
2317
    $$templateVars{'hasTaxonomic'} = $FORM::hasTaxonomic;
2318
    $$templateVars{'hasMethod'} = $FORM::hasMethod;
2319
    $$templateVars{'spatialRequired'} = $FORM::spatialRequired;
2320
    $$templateVars{'temporalRequired'} = $FORM::temporalRequired;
2321

  
2265 2322
    $$templateVars{'docid'} = $FORM::docid;
2266 2323

  
2267 2324
    if (! $error) {
......
2444 2501
    $$templateVars{'studyExtentDescription'} = $FORM::studyExtentDescription;
2445 2502
    $$templateVars{'samplingDescription'} = $FORM::samplingDescription;
2446 2503
    
2447
     $$templateVars{'hasKeyword'} = $FORM::hasKeyword;
2504
    $$templateVars{'hasKeyword'} = $FORM::hasKeyword;
2505
    $$templateVars{'hasTemporal'} = $FORM::hasTemporal;
2506
    $$templateVars{'hasSpatial'} = $FORM::hasSpatial;
2507
    $$templateVars{'hasTaxonomic'} = $FORM::hasTaxonomic;
2508
    $$templateVars{'hasMethod'} = $FORM::hasMethod;
2509
    $$templateVars{'spatialRequired'} = $FORM::spatialRequired;
2510
    $$templateVars{'temporalRequired'} = $FORM::temporalRequired;
2448 2511
}
2449 2512

  
2450 2513
################################################################################

Also available in: Unified diff