public string GetOntologyHash() { string ontology = OntologyService.GetOntology(); using (SHA256 sha256Hash = SHA256.Create()) { string hash = GetHash(sha256Hash, ontology); return(hash); } }
public IActionResult dataValidate(IFormFile rdfFile, Guid repositoryIdentifier) { try { string rdfFileContent = SparqlUtility.GetTextFromFile(rdfFile); RohGraph ontologyGraph = new RohGraph(); ontologyGraph.LoadFromString(OntologyService.GetOntology()); return(Ok(SparqlUtility.ValidateRDF(rdfFileContent, _shapeConfigService.GetShapesConfigs().FindAll(x => x.RepositoryID == repositoryIdentifier), ontologyGraph))); } catch (Exception ex) { return(Problem(ex.ToString())); } }
public IActionResult LoadOntology(IFormFile ontology) { try { OntologyService.SetOntology(ontology); string ontologyGraph = ""; ontologyGraph = _configSparql.GetGraphRoh(); RohGraph graph = new RohGraph(); graph.LoadFromString(OntologyService.GetOntology()); SparqlUtility.LoadOntology(graph, _configSparql.GetEndpoint(), _configSparql.GetQueryParam(), ontologyGraph); return(Ok()); } catch (Exception ex) { return(Problem(ex.ToString())); } }
public IActionResult GetOntology() { return(Ok(OntologyService.GetOntology())); }