public ValidationResult CheckValidationState(string uuid) { if (!string.IsNullOrWhiteSpace(uuid)) { string inspireId = GetInspireId(uuid); if (!string.IsNullOrWhiteSpace(inspireId)) { Log.Info($"Check validation state for metadata. Inspire id: {inspireId}"); string inspireValidationResponse = _httpRequestExecutor.GetRequest(_inspireUrl + _validationStatusEndpoint + inspireId, "application/xml", ""); XDocument xmlDoc = XDocument.Parse(inspireValidationResponse); InspireValidationResponseParser parser = new InspireValidationResponseParser(xmlDoc); return(parser.ParseValidationResponseWithCompletenessIndicator()); } else { throw new Exception($"Cannot retrieve inspire id for {uuid}"); } } else { throw new Exception("Metadata id missing."); } }
public ValidationResult Validate(string rawXmlProcessed, bool allowSpatialDataThemeError, bool allowConformityError = false) { string inspireValidationResponse = RunInspireValidation(rawXmlProcessed); //Log.Debug(inspireValidationResponse); XDocument xmlDoc = XDocument.Parse(inspireValidationResponse); InspireValidationResponseParser parser = new InspireValidationResponseParser(xmlDoc); return parser.ParseValidationResponseWithCompletenessIndicator(); }
// @TODO: Check if this method is obsolete. public ValidationResult Validate(string rawXmlProcessed, bool allowSpatialDataThemeError, bool allowConformityError = false) { string inspireValidationResponse = RunInspireValidation(rawXmlProcessed); Log.Debug(inspireValidationResponse); XDocument xmlDoc = XDocument.Parse(inspireValidationResponse); InspireValidationResponseParser parser = new InspireValidationResponseParser(xmlDoc); return(parser.ParseValidationResponseWithCompletenessIndicator()); }