r4554 - trunk/src/perl
walbridge at ecoinformatics.org
walbridge at ecoinformatics.org
Mon Nov 10 18:35:28 PST 2008
Author: walbridge
Date: 2008-11-10 18:35:28 -0800 (Mon, 10 Nov 2008)
New Revision: 4554
Modified:
trunk/src/perl/register-dataset.cgi
Log:
add start of otherEntity processing for registry edits
Modified: trunk/src/perl/register-dataset.cgi
===================================================================
--- trunk/src/perl/register-dataset.cgi 2008-11-11 02:21:09 UTC (rev 4553)
+++ trunk/src/perl/register-dataset.cgi 2008-11-11 02:35:28 UTC (rev 4554)
@@ -2410,7 +2410,6 @@
if ($results->size() > 1) {
errMoreThanN("methods/methodStep/description/section");
} else {
-
my @methodPara;
foreach $node ($results->get_nodelist) {
my @children = $node->childNodes;
@@ -2427,7 +2426,7 @@
$methodPara[scalar(@methodPara)] = $para;
}
}
- $$templateVars{'hasMethod'} = "true";
+ $$templateVars{'hasMethod'} = "true";
}
if (scalar(@methodPara) > 0) {
$$templateVars{'methodPara'} = \@methodPara;
@@ -2442,8 +2441,7 @@
foreach $node ($results->get_nodelist) {
my $studyExtentDescription = $node->textContent();
$$templateVars{'studyExtentDescription'} = $studyExtentDescription;
-
- $$templateVars{'hasMethod'} = "true";
+ $$templateVars{'hasMethod'} = "true";
}
}
@@ -2455,8 +2453,7 @@
foreach $node ($results->get_nodelist) {
my $samplingDescription = $node->textContent();
$$templateVars{'samplingDescription'} = $samplingDescription;
-
- $$templateVars{'hasMethod'} = "true";
+ $$templateVars{'hasMethod'} = "true";
}
}
@@ -2511,15 +2508,22 @@
push(@errorMessages, $error."\n");
}
- ########################################################
-
-
+ # handle otherEntity objects, by populating the relevant file form elements
+ $results = $doc->findnodes('./otherEntity');
+ foreach $node ($results->get_nodelist) {
+ # entityName
+ # physical/
+ # size
+ # authentication
+ # dataformat/externallyDefinedFormat/formatName
+ # distribution/online
+ # distribution/access
+ }
dontOccur($doc, "./dataTable", "dataTable");
dontOccur($doc, "./spatialRaster", "spatialRaster");
dontOccur($doc, "./spatialVector", "spatialVector");
dontOccur($doc, "./storedProcedure", "storedProcedure");
dontOccur($doc, "./view", "view");
- dontOccur($doc, "./otherEntity", "otherEntity");
dontOccur($doc, "./references", "references");
dontOccur($doc, "//citation", "citation");
@@ -2528,7 +2532,7 @@
$results = $doc->findnodes(
'//additionalMetadata/moderatorComment');
if($results->size == 0){
- dontOccur($doc, "//additionalMetadata", "additionalMetadata");
+ dontOccur($doc, "//additionalMetadata", "additionalMetadata");
}
}
More information about the Metacat-cvs
mailing list