From 17a56975b521c27149bf70db991f18c8c6acf288 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 12 Jan 2024 13:32:13 +0000 Subject: [PATCH] Get Modification dates --- src/DDSERVICES/SOAP/DDserverWeb.php | 43 +++++++++++++++++++++++++++++++++++++++++++ src/DDSERVICES/SOAP/dd.wsdl.in | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 0 deletions(-) diff --git a/src/DDSERVICES/SOAP/DDserverWeb.php b/src/DDSERVICES/SOAP/DDserverWeb.php index bf6fbda..df5a775 100644 --- a/src/DDSERVICES/SOAP/DDserverWeb.php +++ b/src/DDSERVICES/SOAP/DDserverWeb.php @@ -101,6 +101,49 @@ return $result; } + +/** +* Returns list of datasets with TimeRestriction +*/ +function getDatasetsModificationDates() +{ + $result = array( + ); + $referXML = baseDir."/DDsys.xml"; + $DDsys = new DOMDocument("1.0"); + @$DDsys->load($referXML); + $xp = new domxpath($DDsys); + $VINodes = $xp->query("//VI"); + if ($VINodes->length == 0) { + return $result; + } + + foreach ($VINodes as $VINode) + { + $locationNode = $VINode->getElementsByTagName("LOCATION"); + $nameNode = $VINode->getElementsByTagName("NAME"); + $timesNode = $VINode->getElementsByTagName("TIMES"); + if (($locationNode->length > 0) && ($nameNode->length > 0) && ($timesNode->length > 0)) + { + $locationNode = $locationNode->item(0); + $nameNode = $nameNode->item(0); + $location = $locationNode->nodeValue; + $viName = $nameNode->nodeValue; + $timesNode = $timesNode->item(0); + $timesFile = $location.$timesNode->nodeValue; + if (!empty($location) && !empty($viName)) { + $result[] = array( + 'vi' => $viName, + 'releaseDate' => "2008-01-01T00:00:00.000Z", + 'modificationDate' => "2018-01-01T00:00:00.000Z", + ); + } + } + } + + return $result; +} + /** * Returns restricted TimeRestriction and GlobalStop in case of time restriction */ diff --git a/src/DDSERVICES/SOAP/dd.wsdl.in b/src/DDSERVICES/SOAP/dd.wsdl.in index 483a5c1..a1d9901 100644 --- a/src/DDSERVICES/SOAP/dd.wsdl.in +++ b/src/DDSERVICES/SOAP/dd.wsdl.in @@ -47,6 +47,19 @@ + + + + + + + + + + + + + @@ -174,6 +187,11 @@ + + + + + @@ -256,6 +274,12 @@ + + + + + + @@ -481,6 +505,17 @@ encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> + + + + + + + + + -- libgit2 0.21.2