Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
55d53f9
Fixed the nav-bar styling
Sabermahjoub Jul 1, 2026
326b5fa
Merge branch 'Dev-Enhancement-Branch' of https://github.com/sylvainlo…
Sabermahjoub Jul 1, 2026
d6de191
Merge pull request #28 from Sabermahjoub/main
Sabermahjoub Jul 1, 2026
dd39873
Merge pull request #29 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 1, 2026
8acefb2
Enhanced creation entity form
Sabermahjoub Jul 2, 2026
aa1ebe1
Merge pull request #30 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 2, 2026
5dfdbb0
Added a nested interface to create a new entity from the main entity …
Sabermahjoub Jul 2, 2026
edd9627
Merge pull request #31 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 2, 2026
46d67e5
Fixed entity creation error
Sabermahjoub Jul 3, 2026
54ac05a
Merge pull request #32 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 3, 2026
44596b4
Refresh list of ranges when subentity is created in the entity creati…
Sabermahjoub Jul 3, 2026
a5964c4
Merge pull request #33 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 3, 2026
078b34b
Added fileViewer from entityDetails Component to view and edit media …
Sabermahjoub Jul 3, 2026
e3b7dcc
Merge pull request #38 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 3, 2026
908d439
Added autocreation of internal datasources upon project creation
Sabermahjoub Jul 5, 2026
9d178eb
Merge pull request #39 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 5, 2026
eb478bb
The name of ranges of type IRIs is now displayed in the entity editio…
Sabermahjoub Jul 6, 2026
f54ea72
Merge pull request #48 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 6, 2026
64ba39d
Fixed Issue#40
Sabermahjoub Jul 6, 2026
3920bdf
Merge pull request #49 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 6, 2026
3af0bbc
Added commonly used rico types on the entity list (left panel) for th…
Sabermahjoub Jul 7, 2026
cecbf3d
Merge pull request #51 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 7, 2026
6d937ee
Changed the packages and folders names
Sabermahjoub Jul 7, 2026
991ffb4
Merge pull request #53 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 7, 2026
eef31b9
samples rdf graphs
sylvainloiseau Jul 8, 2026
0f0a0ad
Implementation of the issue#41 (IRI generation for both project prefi…
Sabermahjoub Jul 9, 2026
331c1d7
Merge pull request #58 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 9, 2026
e71bed2
Implemented external TTL files import into internal DS of projects (N…
Sabermahjoub Jul 9, 2026
8200f06
Merge pull request #59 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 9, 2026
087babb
Issue#60 : number of entities per accardion
Sabermahjoub Jul 10, 2026
a476a5d
Merge pull request #61 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 10, 2026
e22f6d1
Implemented export of internal datasource of an open project
Sabermahjoub Jul 10, 2026
a020780
Merge pull request #63 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 10, 2026
a229782
Added implementation to export project backup
Sabermahjoub Jul 11, 2026
0def2af
Merge pull request #64 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 11, 2026
79ed31f
Added some logs to debug export on mac environements
Sabermahjoub Jul 13, 2026
bdc1b00
Merge pull request #65 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 13, 2026
c9cb189
Kill Zombie Process in electron config
Sabermahjoub Jul 13, 2026
23d97de
Merge pull request #66 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 13, 2026
ed99ab5
Fixed 404 NOT Found on APIs error by referencing the correct jar file
Sabermahjoub Jul 13, 2026
2128fe1
Merge pull request #67 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 13, 2026
0f17cfe
Implemented backup project import
Sabermahjoub Jul 14, 2026
95bdcaf
Merge pull request #70 from sylvainloiseau/Dev-Enhancement-Branch
Sabermahjoub Jul 14, 2026
70ce1f2
Improved response message upon backup import and datasource import
Sabermahjoub Jul 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 4 additions & 2 deletions RDF_Back/pom.xml → Backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.uspn</groupId>
<artifactId>RDF_Back</artifactId>
<artifactId>Backend</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>RDF_Back</name>
<name>Backend</name>
<description>RDF_Back</description>
<url/>
<licenses>
Expand All @@ -28,6 +28,8 @@
</scm>
<properties>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencies>
<dependency>
Expand Down
Binary file added Backend/projects/archive_2026/store/contexts.dat
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#triple indexes meta-data, DO NOT EDIT!
#Sun Mar 29 12:59:07 CEST 2026
#Wed Jul 15 12:25:02 CEST 2026
triple-indexes=spoc,posc
version=10
Binary file added Backend/projects/archive_2026/store/values.dat
Binary file not shown.
Binary file added Backend/projects/archive_2026/store/values.hash
Binary file not shown.
Binary file added Backend/projects/archive_2026/store/values.id
Binary file not shown.
Binary file added Backend/projects/okok/store/contexts.dat
Binary file not shown.
Binary file added Backend/projects/okok/store/triples-posc.dat
Binary file not shown.
Binary file added Backend/projects/okok/store/triples-spoc.alloc
Binary file not shown.
Binary file added Backend/projects/okok/store/triples-spoc.dat
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#triple indexes meta-data, DO NOT EDIT!
#Thu Mar 19 11:22:37 CET 2026
#Wed Jul 15 12:40:46 CEST 2026
triple-indexes=spoc,posc
version=10
Binary file added Backend/projects/okok/store/values.dat
Binary file not shown.
Binary file added Backend/projects/okok/store/values.hash
Binary file not shown.
Binary file added Backend/projects/okok/store/values.id
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.uspn.rdf_back;
package fr.cnrs.lacito.fieldarchive;

import com.uspn.rdf_back.example.Example;
import fr.cnrs.lacito.fieldarchive.example.Example;
import org.eclipse.rdf4j.spring.RDF4JConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.uspn.rdf_back.config;
package fr.cnrs.lacito.fieldarchive.config;

import org.eclipse.rdf4j.repository.Repository;
import org.eclipse.rdf4j.repository.sail.SailRepository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.uspn.rdf_back.config;
package fr.cnrs.lacito.fieldarchive.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.uspn.rdf_back.controllers;
package fr.cnrs.lacito.fieldarchive.controllers;

import com.uspn.rdf_back.dtos.CreateInternalDataSourceRequest;
import com.uspn.rdf_back.dtos.CreateExternalDataSourceRequest;
import com.uspn.rdf_back.dtos.DataSourceDto;
import com.uspn.rdf_back.dtos.UpdateDataSourceRequest;
import com.uspn.rdf_back.services.DataSourceService;
import fr.cnrs.lacito.fieldarchive.dtos.CreateInternalDataSourceRequest;
import fr.cnrs.lacito.fieldarchive.dtos.CreateExternalDataSourceRequest;
import fr.cnrs.lacito.fieldarchive.dtos.DataSourceDto;
import fr.cnrs.lacito.fieldarchive.dtos.UpdateDataSourceRequest;
import fr.cnrs.lacito.fieldarchive.services.DataSourceService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.uspn.rdf_back.controllers;
package fr.cnrs.lacito.fieldarchive.controllers;

import com.uspn.rdf_back.dtos.OntologyLabelDto;
import com.uspn.rdf_back.dtos.SaveOntologyLabelRequest;
import com.uspn.rdf_back.services.OntologyService;
import fr.cnrs.lacito.fieldarchive.dtos.OntologyLabelDto;
import fr.cnrs.lacito.fieldarchive.dtos.SaveOntologyLabelRequest;
import fr.cnrs.lacito.fieldarchive.services.OntologyService;
import org.springframework.web.bind.annotation.*;
import java.util.List;

import com.uspn.rdf_back.dtos.OntologyClassDto;
import com.uspn.rdf_back.services.BuiltinOntologyService;
import fr.cnrs.lacito.fieldarchive.dtos.OntologyClassDto;
import fr.cnrs.lacito.fieldarchive.services.BuiltinOntologyService;

@RestController
@RequestMapping("/ontology")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
package fr.cnrs.lacito.fieldarchive.controllers;

import fr.cnrs.lacito.fieldarchive.dtos.*;
import fr.cnrs.lacito.fieldarchive.dtos.*;
import fr.cnrs.lacito.fieldarchive.exceptions.ImportException;
import fr.cnrs.lacito.fieldarchive.services.FileExportService;
import fr.cnrs.lacito.fieldarchive.services.FileImportService;
import fr.cnrs.lacito.fieldarchive.services.ProjectService;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
import java.util.Map;

@RestController
@RequestMapping("/projects")
public class ProjectController {

private final ProjectService projectService;
private final FileImportService fileImportService;
private final FileExportService fileExportService;

public ProjectController(ProjectService projectService, FileImportService fileImportService, FileExportService fileExportService) {
this.projectService = projectService;
this.fileImportService = fileImportService;
this.fileExportService = fileExportService;
}

@PostMapping(value = "/import-backup", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public ResponseEntity<Map<String, Object>> importBackup(@RequestParam("file") MultipartFile file) {
try (InputStream is = file.getInputStream()) {
ImportResult result = fileImportService.importBackup(is);
Map<String, Object> body = new HashMap<>();
body.put("status", "ok");
body.put("message", "Project is successfully restored !");
body.put("project", result.message);
return ResponseEntity.ok(body);

} catch (ImportException e) {
return ResponseEntity.badRequest().body(Map.of("status", "error", "message", e.getMessage()));
} catch (IllegalArgumentException e) {
return ResponseEntity.badRequest().body(Map.of("status", "error", "message", e.getMessage()));
} catch (IOException e) {
return ResponseEntity.internalServerError().body(Map.of("status", "error", "message", "Error while reading file."));
}
}

@GetMapping(value = "/export/backup", produces = "application/zip")
public void exportBackup(HttpServletResponse response) throws IOException {
response.setContentType("application/zip");
response.setHeader("Content-Disposition", "attachment; filename=\"project-backup.zip\"");
fileExportService.exportBackup(response.getOutputStream());
}

@GetMapping(value = "/export/internal", produces = "text/turtle")
public void exportInternal(HttpServletResponse response) throws IOException {
response.setContentType("text/turtle");
response.setHeader("Content-Disposition", "attachment; filename=\"internal-data.ttl\"");
fileExportService.exportInternalDataSource(response.getOutputStream());
}

@PostMapping(value = "/import", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public ResponseEntity<Map<String, Object>> importExternalTurtle(
@RequestParam("file") MultipartFile file) {

try (InputStream is = file.getInputStream()) {
String baseURI = projectService.readCurrentProject().prefix;
ImportResult result = fileImportService.importTurtle(is, baseURI);
Map<String, Object> body = new HashMap<>();
body.put("status", "ok");
body.put("message", "Internal DataSource was successfully updated !");
body.put("project", result.message);
return ResponseEntity.ok(body);
} catch (ImportException e) {
return ResponseEntity.badRequest().body(Map.of("status", "error", "message", e.getMessage()));
} catch (IOException e) {
return ResponseEntity.internalServerError().build();
}
}

@PostMapping("/open")
public Map<String, Object> open(@RequestBody CreateProjectRequest req) {
ProjectDto dto = projectService.openProject(req.getName(), req.isPersistent(), req.getDescription(), req.getPrefix());
return Map.of(
"status", "ok",
"project", dto.name
);
}

@PostMapping("/create")
public Map<String, Object> create(@RequestBody CreateProjectRequest req) {
ProjectDto dto = projectService.createProject(req.getName(), req.isPersistent(), req.getDescription(), req.getPrefix());
return Map.of(
"status", "ok",
"project", dto.name
);
}

@GetMapping("/current")
public ProjectDto current() {
return projectService.readCurrentProject();
}

@DeleteMapping("/{projectName}")
public ResponseEntity<String> deleteProject(@PathVariable String projectName) {
try {
projectService.deleteProject(projectName);
return ResponseEntity.ok("Project deleted successfully");

} catch (IllegalArgumentException e) {
return ResponseEntity
.badRequest()
.body(e.getMessage());

} catch (FileNotFoundException e) {
return ResponseEntity
.status(HttpStatus.NOT_FOUND)
.body(e.getMessage());

} catch (IOException e) {
return ResponseEntity
.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body("Error deleting project");
}
}

@PostMapping("/close")
public Map<String, Object> close() {
projectService.closeProject();
return Map.of("status", "ok");
}

@PutMapping("/{oldProjectName}")
public ResponseEntity<?> updateProject(
@PathVariable String oldProjectName,
@RequestBody UpdateProjectObject newProject) {

try {

System.out.println("New Description is "+ newProject.description);
projectService.updateProject(
oldProjectName,
newProject.name,
newProject.description
);

return ResponseEntity.ok(
new ApiResponse<>(true, "Project updated successfully", null)
);

} catch (IllegalArgumentException e) {
return ResponseEntity
.badRequest()
.body(new ApiError(e.getMessage(), "VALIDATION_ERROR"));

} catch (IOException e) {
return ResponseEntity
.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body(new ApiError("Internal error while updating project", "IO_ERROR"));

} catch (Exception e) {
return ResponseEntity
.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body(new ApiError("Unexpected error", "UNKNOWN_ERROR"));
}
}
// Liste simple
// @GetMapping("/list")
// public List<String> listProjects() {
// return projectService.listProjects();
// }

// Liste détaillée
@GetMapping("/list/details")
public List<Map<String, Object>> listProjectsDetailed() {
return projectService.listProjectsDetailed();
}

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package com.uspn.rdf_back.controllers;
package fr.cnrs.lacito.fieldarchive.controllers;

import com.uspn.rdf_back.dtos.*;
import com.uspn.rdf_back.services.RdfEntityService;
import fr.cnrs.lacito.fieldarchive.dtos.*;
import fr.cnrs.lacito.fieldarchive.dtos.CreateRdfEntityRequest;
import fr.cnrs.lacito.fieldarchive.dtos.RdfEntityDto;
import fr.cnrs.lacito.fieldarchive.dtos.RdfEntitySummaryDto;
import fr.cnrs.lacito.fieldarchive.dtos.UpdateRdfEntityRequest;
import fr.cnrs.lacito.fieldarchive.services.RdfEntityService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.uspn.rdf_back.controllers;
package fr.cnrs.lacito.fieldarchive.controllers;

import com.uspn.rdf_back.services.SparqlService;
import fr.cnrs.lacito.fieldarchive.services.SparqlService;
import org.springframework.web.bind.annotation.*;

import java.util.List;
Expand All @@ -18,7 +18,9 @@ public SparqlController(SparqlService service) {

@PostMapping("/select")
public List<Map<String, String>> select(@RequestBody Map<String, String> body) {
return service.select(body.get("query"));
String query = body.get("query");
// System.out.println("SPARQL QUERY:\n" + query);
return service.select(query);
}

@PostMapping("/update")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.uspn.rdf_back.core;
package fr.cnrs.lacito.fieldarchive.core;

import org.eclipse.rdf4j.repository.Repository;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
package com.uspn.rdf_back.core;
package fr.cnrs.lacito.fieldarchive.core;
//un contexte = un graphe nommé
public final class RdfContexts {
private RdfContexts() {}

// Contexte où on stocke les METADONNEES des sources (en RDF)
// graphe nommé pour les métadonnées (projet, sources de données, etc.)
public static final String CTX_META = RdfNamespaces.APP + "context/metadata";

// Contexte éditable interne (source interne)
public static final String CTX_INTERNAL = RdfNamespaces.APP + "context/internal";

public static final String CTX_ONTO_RICO = RdfNamespaces.APP + "context/ontology/rico";
public static final String CTX_META = RdfNamespaces.APP + "/context/metadata";
public static final String CTX_ONTO_RICO = RdfNamespaces.APP + "/context/ontology/rico";
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package com.uspn.rdf_back.core;
package fr.cnrs.lacito.fieldarchive.core;

public final class RdfNamespaces {
private RdfNamespaces() {}

// Namespace interne de l'application
public static final String APP = "http://uspn.fr/app#";
//public static final String APP = "http://example.org/app#";
public static final String APP = "http://cnrs.lacito/app#";
// RIC-O
public static final String RICO = "https://www.ica.org/standards/RiC/ontology#";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.uspn.rdf_back.dtos;
package fr.cnrs.lacito.fieldarchive.dtos;

public record ApiError(
String message,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.uspn.rdf_back.dtos;
package fr.cnrs.lacito.fieldarchive.dtos;

public record ApiResponse<T>(
boolean success,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.uspn.rdf_back.dtos;
package fr.cnrs.lacito.fieldarchive.dtos;


import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.uspn.rdf_back.dtos;
package fr.cnrs.lacito.fieldarchive.dtos;

import lombok.Getter;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.uspn.rdf_back.dtos;
package fr.cnrs.lacito.fieldarchive.dtos;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@AllArgsConstructor
public class CreateInternalDataSourceRequest {

private String shortName; // ex: "internal"
Expand Down
Loading