You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-63Lines changed: 23 additions & 63 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ HERMES REST API is a Spring Boot service that exposes the server-side capabiliti
4
4
5
5
## About the repository
6
6
7
-
The repository is described on GitHub as **"HERMES AI Server Component"**. The codebase is written in Java, and the main Maven module is `hai`, a Spring Boot application that depends on Spring Web, Spring Data MongoDB, Apache Jena, and PLATINUm. The application entry point is `HaiRestApi`, which also declares the REST endpoints documented below. citeturn158797view0turn713210view0turn803605view0
7
+
The repository is described on GitHub as **"HERMES AI Server Component"**. The codebase is written in Java, and the main Maven module is `hai`, a Spring Boot application that depends on Spring Web, Spring Data MongoDB, Apache Jena, and PLATINUm. The application entry point is `HaiRestApi`, which also declares the REST endpoints documented below.
8
8
9
9
## Repository structure
10
10
@@ -24,15 +24,15 @@ HERMES_REST_API/
24
24
└── target/
25
25
```
26
26
27
-
This layout is based on the public repository tree, which shows the root placeholder `README.md`, the `hai/` Maven module, top-level `resources/`, and test-related folders. Inside `hai/src/main/resources`, the project includes `application.properties`, several RDF/OWL knowledge files, and a `platinum` resource directory. citeturn158797view0turn872002view0turn103635view0turn141464view0
27
+
This layout is based on the public repository tree, which shows the root placeholder `README.md`, the `hai/` Maven module, top-level `resources/`, and test-related folders. Inside `hai/src/main/resources`, the project includes `application.properties`, several RDF/OWL knowledge files, and a `platinum` resource directory.
28
28
29
29
## Features
30
30
31
-
- REST endpoints for browsing HERMES knowledge topics and cultural entities. citeturn803605view0
32
-
- Planning endpoint for generating personalized trips from selected topics and a requested duration. citeturn803605view0turn196169view0
33
-
- Endpoint for posting a new cultural entity and attaching a topic-tagged textual description to the knowledge graph. citeturn803605view0turn196169view1
34
-
- MongoDB-backed storage for incoming trip requests, generated POIs, planned trips, and posted entity requests. citeturn803605view0turn196169view0turn196169view1turn242977view0turn242977view1
35
-
- Knowledge-graph support built on Apache Jena, with a configurable default RDF model loaded at startup or on first use. citeturn713210view0turn803605view0turn803605view1
31
+
- REST endpoints for browsing HERMES knowledge topics and cultural entities.
32
+
- Planning endpoint for generating personalized trips from selected topics and a requested duration.
33
+
- Endpoint for posting a new cultural entity and attaching a topic-tagged textual description to the knowledge graph.
34
+
- MongoDB-backed storage for incoming trip requests, generated POIs, planned trips, and posted entity requests.
35
+
- Knowledge-graph support built on Apache Jena, with a configurable default RDF model loaded at startup or on first use.
36
36
37
37
## Tech stack
38
38
@@ -42,7 +42,7 @@ This layout is based on the public repository tree, which shows the root placeho
42
42
- Spring Data MongoDB
43
43
- Apache Jena 5.0.0
44
44
- PLATINUm 2.3.0
45
-
- Maven Wrapper (`mvnw`) in the `hai/` module citeturn713210view0turn872002view0
45
+
- Maven Wrapper (`mvnw`) in the `hai/` module
46
46
47
47
## Requirements
48
48
@@ -58,7 +58,7 @@ The default application configuration expects:
The main class is `it.cnr.istc.hermes.hai.HaiRestApi`. citeturn713210view0turn803605view0
108
+
The main class is `it.cnr.istc.hermes.hai.HaiRestApi`.
109
109
110
110
## API overview
111
111
112
-
The application exposes REST endpoints directly from `HaiRestApi`. The home endpoint is `/`, and the controller also registers a generic `/error` handler. Several knowledge endpoints are declared as `GET` methods but still accept a JSON request body containing a `uri` field. That is unusual for many HTTP clients, so in practice you may prefer to test them with tools such as cURL or Postman that allow bodies on `GET` requests. citeturn803605view0turn196169view2
112
+
The application exposes REST endpoints directly from `HaiRestApi`. The home endpoint is `/`, and the controller also registers a generic `/error` handler. Several knowledge endpoints are declared as `GET` methods but still accept a JSON request body containing a `uri` field. That is unusual for many HTTP clients, so in practice you may prefer to test them with tools such as cURL or Postman that allow bodies on `GET` requests.
113
113
114
114
### Base endpoint
115
115
@@ -131,14 +131,14 @@ Example response:
131
131
OPS! Invalid or missing request parameters!
132
132
```
133
133
134
-
Both endpoints are declared in `HaiRestApi`. citeturn803605view0
134
+
Both endpoints are declared in `HaiRestApi`.
135
135
136
136
## Endpoint reference
137
137
138
138
### Knowledge endpoints
139
139
140
140
#### `GET /knowledge/topics`
141
-
Returns a taxonomy of available trip topics. The result is a map where each parent topic is associated with its child topics. Topics are built from RDF resources and labels in the knowledge graph. citeturn803605view0turn196169view3
141
+
Returns a taxonomy of available trip topics. The result is a map where each parent topic is associated with its child topics. Topics are built from RDF resources and labels in the knowledge graph.
142
142
143
143
Example response shape:
144
144
@@ -152,7 +152,7 @@ Example response shape:
152
152
```
153
153
154
154
#### `GET /knowledge/entities`
155
-
Returns all cultural entities belonging to the `CulturalProperty` class, including both tangible and intangible entities. citeturn803605view0turn242977view2
155
+
Returns all cultural entities belonging to the `CulturalProperty` class, including both tangible and intangible entities.
156
156
157
157
Example response shape:
158
158
@@ -179,7 +179,7 @@ Request body:
179
179
}
180
180
```
181
181
182
-
The request uses the `KnowledgeQuery` model, which contains a required `uri` field. citeturn803605view0turn196169view2
182
+
The request uses the `KnowledgeQuery` model, which contains a required `uri` field.
183
183
184
184
#### `GET /knowledge/descriptions`
185
185
Returns the contextual descriptions associated with a specific cultural entity.
@@ -192,7 +192,7 @@ Request body:
192
192
}
193
193
```
194
194
195
-
The endpoint resolves the URI in the knowledge graph, extracts the cultural entity, and then fetches all of its descriptions. citeturn803605view0
195
+
The endpoint resolves the URI in the knowledge graph, extracts the cultural entity, and then fetches all of its descriptions.
196
196
197
197
#### `GET /knowledge/entity/data`
198
198
Returns detailed data for a specific cultural entity.
@@ -205,7 +205,7 @@ Request body:
205
205
}
206
206
```
207
207
208
-
For tangible entities, the returned object can include fields such as visiting time, open hours, coordinates, accessibility flags, price, group visit support, and address. citeturn803605view0turn242977view3
208
+
For tangible entities, the returned object can include fields such as visiting time, open hours, coordinates, accessibility flags, price, group visit support, and address.
209
209
210
210
### Planning endpoint
211
211
@@ -216,7 +216,7 @@ Generates a personalized trip from a user request. The server:
216
216
2. finds cultural entities related to the requested topics,
217
217
3. builds POIs around relevant tangible entities,
218
218
4. invokes the PLATINUm-based planner when the total visit time exceeds the requested duration,
219
-
5. returns a `PlannedTrip` object. citeturn803605view0turn196169view0turn242977view0turn242977view1
219
+
5. returns a `PlannedTrip` object.
220
220
221
221
Request body example:
222
222
@@ -244,7 +244,7 @@ Relevant `TripRequest` fields inferred from the model:
Creates a new knowledge-graph resource for a cultural entity and links it to a generated description tagged with one or more topics. The request is also persisted in MongoDB, and the endpoint returns the URI of the created node. citeturn803605view0turn196169view1
262
+
Creates a new knowledge-graph resource for a cultural entity and links it to a generated description tagged with one or more topics. The request is also persisted in MongoDB, and the endpoint returns the URI of the created node.
263
263
264
264
Request body example:
265
265
@@ -289,51 +289,11 @@ Relevant `PostEntityRequest` fields inferred from the model:
Returns all planned trips stored in MongoDB. citeturn803605view0turn242977view0
304
-
305
-
#### `GET /service/pois`
306
-
Returns all generated POIs stored in MongoDB. A POI contains a tangible cultural entity, a set of relevant descriptions, linked entities, ranking data, and usage counters. citeturn803605view0turn242977view1
Represents the input used to generate a trip. Required fields are `userId`, `duration`, and a non-empty `topics` list. citeturn196169view0
323
-
324
-
### `PlannedTrip`
325
-
Stores a generated itinerary, including requested duration, ordered POI hops, the original request, ranking, and a usage counter. citeturn242977view0
326
-
327
-
### `Poi`
328
-
Represents a generated point of interest built around a tangible cultural entity, enriched with topic-relevant descriptions and linked entities. citeturn242977view1
329
-
330
-
## Notes and caveats
331
-
332
-
- The repository root `README.md` is currently just `# HERMES REST API TODO`, so replacing it with this file would immediately improve repository documentation. citeturn884965view0
333
-
- The `src` entry at repository root is a symbolic link to `hai/src/main/java`. citeturn512769view0
334
-
- Several read endpoints use `GET` together with a request body. Some clients, proxies, and API gateways do not handle GET bodies consistently, so this is worth documenting for users or revisiting in a future API revision. citeturn803605view0turn196169view2
335
-
- The controller contains a `TODO` comment indicating that entity creation is not yet complete with all expected data properties. citeturn803605view0
336
-
337
-
## License
338
-
339
-
No license file was visible in the repository pages I inspected, so this README intentionally does not declare one. Add a license section once a repository license is published. citeturn158797view0
0 commit comments