transformed JenaRosenkeller importer to use Result-driven pipeline

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2024-12-19 16:25:48 +01:00
parent a17b322001
commit ed8cef3738
8 changed files with 272 additions and 69 deletions
+1
View File
@@ -1,4 +1,5 @@
description = "OpenCloudCal : API"
dependencies {
implementation("de.srsoftware:tools.util:1.1.1")
}
@@ -60,6 +60,13 @@ public interface Appointment {
*/
Set<String> tags();
/**
* the title of the appointment
* @return the title
*/
String title();
/**
* set of Links that point to related information
* @return set of links
@@ -1,8 +1,9 @@
/* © SRSoftware 2024 */
package de.srsoftware.cal.api;
import de.srsoftware.tools.Result;
import java.io.IOException;
import java.util.List;
import java.util.stream.Stream;
/**
* Instances of this class can be used to read Appointments from various sources
@@ -18,5 +19,5 @@ public interface Importer {
* get the list of appointments from the source associated with this importer
* @return a list of appointments
*/
List<Appointment> fetch() throws IOException;
Stream<Result<Appointment>> fetch() throws IOException;
}