initial commit
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package de.frigosped.dc.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
/**
|
||||
* Deserialisiertes JSON-Ergebnis aus der KI-Auswertung.
|
||||
* Die KI gibt dieses Objekt als JSON-String zurück.
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class EvaluationResult {
|
||||
|
||||
/** Antwort auf Deutsch (Zitate in Originalsprache + Übersetzung) */
|
||||
private String answer;
|
||||
|
||||
/** Erfüllungsgrad 0–100 */
|
||||
private Integer score;
|
||||
|
||||
/** OK | UNKLAR | NOK */
|
||||
private String resultType;
|
||||
|
||||
/** Kommentar auf Deutsch */
|
||||
private String theComment;
|
||||
|
||||
public EvaluationResult() {}
|
||||
|
||||
public String getAnswer() { return answer; }
|
||||
public void setAnswer(String v) { this.answer = v; }
|
||||
|
||||
public Integer getScore() { return score; }
|
||||
public void setScore(Integer v) { this.score = v; }
|
||||
|
||||
public String getResultType() { return resultType; }
|
||||
public void setResultType(String v) { this.resultType = v; }
|
||||
|
||||
public String getTheComment() { return theComment; }
|
||||
public void setTheComment(String v) { this.theComment = v; }
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package de.frigosped.dc.model;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* DTO für ORDS-Endpunkt GET /api/dc/projects/:id/documents/
|
||||
* Kein BLOB; has_original_text / has_translated_text kommen als 0/1.
|
||||
*/
|
||||
public class OrdsDocument {
|
||||
|
||||
private Long id;
|
||||
private String filename;
|
||||
private String mimeType;
|
||||
private Long documentTypeId;
|
||||
private Long catalogId;
|
||||
private LocalDateTime uploadedAt;
|
||||
private Integer hasOriginalText; // 0 oder 1
|
||||
private Integer hasTranslatedText; // 0 oder 1
|
||||
private Integer rowVersion;
|
||||
private LocalDateTime created;
|
||||
private LocalDateTime updated;
|
||||
|
||||
public OrdsDocument() {}
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
|
||||
public String getFilename() { return filename; }
|
||||
public void setFilename(String filename) { this.filename = filename; }
|
||||
|
||||
public String getMimeType() { return mimeType; }
|
||||
public void setMimeType(String mimeType) { this.mimeType = mimeType; }
|
||||
|
||||
public Long getDocumentTypeId() { return documentTypeId; }
|
||||
public void setDocumentTypeId(Long v) { this.documentTypeId = v; }
|
||||
|
||||
public Long getCatalogId() { return catalogId; }
|
||||
public void setCatalogId(Long catalogId) { this.catalogId = catalogId; }
|
||||
|
||||
public LocalDateTime getUploadedAt() { return uploadedAt; }
|
||||
public void setUploadedAt(LocalDateTime v) { this.uploadedAt = v; }
|
||||
|
||||
public Integer getHasOriginalText() { return hasOriginalText; }
|
||||
public void setHasOriginalText(Integer v) { this.hasOriginalText = v; }
|
||||
|
||||
public Integer getHasTranslatedText() { return hasTranslatedText; }
|
||||
public void setHasTranslatedText(Integer v) { this.hasTranslatedText = v; }
|
||||
|
||||
public Integer getRowVersion() { return rowVersion; }
|
||||
public void setRowVersion(Integer v) { this.rowVersion = v; }
|
||||
|
||||
public LocalDateTime getCreated() { return created; }
|
||||
public void setCreated(LocalDateTime v) { this.created = v; }
|
||||
|
||||
public LocalDateTime getUpdated() { return updated; }
|
||||
public void setUpdated(LocalDateTime v) { this.updated = v; }
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package de.frigosped.dc.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ORDS COLLECTION_FEED-Antwort für Dokumente.
|
||||
* {"items":[...], "hasMore":false, "count":N}
|
||||
*/
|
||||
public class OrdsDocumentList {
|
||||
|
||||
private List<OrdsDocument> items;
|
||||
private Boolean hasMore;
|
||||
private Integer count;
|
||||
|
||||
public OrdsDocumentList() {}
|
||||
|
||||
public List<OrdsDocument> getItems() { return items; }
|
||||
public void setItems(List<OrdsDocument> items) { this.items = items; }
|
||||
|
||||
public Boolean getHasMore() { return hasMore; }
|
||||
public void setHasMore(Boolean hasMore) { this.hasMore = hasMore; }
|
||||
|
||||
public Integer getCount() { return count; }
|
||||
public void setCount(Integer count) { this.count = count; }
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package de.frigosped.dc.model;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* DTO für den ORDS-Endpunkt GET /api/dc/projects/:project_id
|
||||
* (COLLECTION_ITEM – einzelnes JSON-Objekt, snake_case von ORDS)
|
||||
*/
|
||||
public class OrdsProject {
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
private String description;
|
||||
private Long catalogId;
|
||||
private Long createdByUser;
|
||||
private String status; // PENDING | IN_PROGRESS | COMPLETED
|
||||
private Integer progress; // 0–100
|
||||
private LocalDateTime completedAt;
|
||||
private String notificationEmail;
|
||||
private Integer rowVersion;
|
||||
private LocalDateTime created;
|
||||
private LocalDateTime updated;
|
||||
|
||||
public OrdsProject() {}
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
|
||||
public String getName() { return name; }
|
||||
public void setName(String name) { this.name = name; }
|
||||
|
||||
public String getDescription() { return description; }
|
||||
public void setDescription(String d) { this.description = d; }
|
||||
|
||||
public Long getCatalogId() { return catalogId; }
|
||||
public void setCatalogId(Long catalogId) { this.catalogId = catalogId; }
|
||||
|
||||
public Long getCreatedByUser() { return createdByUser; }
|
||||
public void setCreatedByUser(Long v) { this.createdByUser = v; }
|
||||
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
|
||||
public Integer getProgress() { return progress; }
|
||||
public void setProgress(Integer progress) { this.progress = progress; }
|
||||
|
||||
public LocalDateTime getCompletedAt() { return completedAt; }
|
||||
public void setCompletedAt(LocalDateTime v) { this.completedAt = v; }
|
||||
|
||||
public String getNotificationEmail() { return notificationEmail; }
|
||||
public void setNotificationEmail(String v) { this.notificationEmail = v; }
|
||||
|
||||
public Integer getRowVersion() { return rowVersion; }
|
||||
public void setRowVersion(Integer v) { this.rowVersion = v; }
|
||||
|
||||
public LocalDateTime getCreated() { return created; }
|
||||
public void setCreated(LocalDateTime v) { this.created = v; }
|
||||
|
||||
public LocalDateTime getUpdated() { return updated; }
|
||||
public void setUpdated(LocalDateTime v) { this.updated = v; }
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package de.frigosped.dc.model;
|
||||
|
||||
/**
|
||||
* DTO für ORDS-Endpunkt GET /api/dc/catalogs/:id/questions/
|
||||
* Flache Darstellung: Kategorie + Frage in einer Zeile.
|
||||
*/
|
||||
public class OrdsQuestion {
|
||||
|
||||
private Long questionId;
|
||||
private Long categoryId;
|
||||
private String categoryName;
|
||||
private String categoryDescription;
|
||||
private String questionText;
|
||||
private String evaluationType; // z.B. SCORE, BINARY
|
||||
private Integer threshold; // Schwellwert 0–100
|
||||
private String resultHandling; // ABWEICHUNG | HINWEIS
|
||||
private String example0Percent; // Beispiel: Anforderung nicht erfüllt
|
||||
private String example100Percent; // Beispiel: Anforderung voll erfüllt
|
||||
private Integer rowVersion;
|
||||
|
||||
public OrdsQuestion() {}
|
||||
|
||||
public Long getQuestionId() { return questionId; }
|
||||
public void setQuestionId(Long v) { this.questionId = v; }
|
||||
|
||||
public Long getCategoryId() { return categoryId; }
|
||||
public void setCategoryId(Long v) { this.categoryId = v; }
|
||||
|
||||
public String getCategoryName() { return categoryName; }
|
||||
public void setCategoryName(String v) { this.categoryName = v; }
|
||||
|
||||
public String getCategoryDescription() { return categoryDescription; }
|
||||
public void setCategoryDescription(String v) { this.categoryDescription = v; }
|
||||
|
||||
public String getQuestionText() { return questionText; }
|
||||
public void setQuestionText(String v) { this.questionText = v; }
|
||||
|
||||
public String getEvaluationType() { return evaluationType; }
|
||||
public void setEvaluationType(String v) { this.evaluationType = v; }
|
||||
|
||||
public Integer getThreshold() { return threshold; }
|
||||
public void setThreshold(Integer v) { this.threshold = v; }
|
||||
|
||||
public String getResultHandling() { return resultHandling; }
|
||||
public void setResultHandling(String v) { this.resultHandling = v; }
|
||||
|
||||
public String getExample0Percent() { return example0Percent; }
|
||||
public void setExample0Percent(String v) { this.example0Percent = v; }
|
||||
|
||||
public String getExample100Percent() { return example100Percent; }
|
||||
public void setExample100Percent(String v) { this.example100Percent = v; }
|
||||
|
||||
public Integer getRowVersion() { return rowVersion; }
|
||||
public void setRowVersion(Integer v) { this.rowVersion = v; }
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package de.frigosped.dc.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ORDS COLLECTION_FEED-Antwort für Fragen.
|
||||
* {"items":[...], "hasMore":false, "count":N}
|
||||
*/
|
||||
public class OrdsQuestionList {
|
||||
|
||||
private List<OrdsQuestion> items;
|
||||
private Boolean hasMore;
|
||||
private Integer count;
|
||||
|
||||
public OrdsQuestionList() {}
|
||||
|
||||
public List<OrdsQuestion> getItems() { return items; }
|
||||
public void setItems(List<OrdsQuestion> items) { this.items = items; }
|
||||
|
||||
public Boolean getHasMore() { return hasMore; }
|
||||
public void setHasMore(Boolean hasMore) { this.hasMore = hasMore; }
|
||||
|
||||
public Integer getCount() { return count; }
|
||||
public void setCount(Integer count) { this.count = count; }
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package de.frigosped.dc.model;
|
||||
|
||||
/**
|
||||
* Request-Body für PUT /api/dc/projects/:id/progress
|
||||
* {"progress": 45}
|
||||
*/
|
||||
public class ProgressRequest {
|
||||
|
||||
private Integer progress;
|
||||
|
||||
public ProgressRequest() {}
|
||||
|
||||
public ProgressRequest(int progress) {
|
||||
this.progress = progress;
|
||||
}
|
||||
|
||||
public Integer getProgress() { return progress; }
|
||||
public void setProgress(Integer v) { this.progress = v; }
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package de.frigosped.dc.model;
|
||||
|
||||
/**
|
||||
* Request-Body für POST /api/dc/projects/:id/results
|
||||
*/
|
||||
public class ResultRequest {
|
||||
|
||||
private Long questionId;
|
||||
private Long docId;
|
||||
private String answer;
|
||||
private Integer score;
|
||||
private String resultType; // OK | UNKLAR | NOK
|
||||
private Integer deviation; // 0 oder 1
|
||||
private Integer warning; // 0 oder 1
|
||||
private String theComment;
|
||||
|
||||
public ResultRequest() {}
|
||||
|
||||
public ResultRequest(Long questionId, Long docId, String answer,
|
||||
Integer score, String resultType,
|
||||
Integer deviation, Integer warning, String theComment) {
|
||||
this.questionId = questionId;
|
||||
this.docId = docId;
|
||||
this.answer = answer;
|
||||
this.score = score;
|
||||
this.resultType = resultType;
|
||||
this.deviation = deviation;
|
||||
this.warning = warning;
|
||||
this.theComment = theComment;
|
||||
}
|
||||
|
||||
public Long getQuestionId() { return questionId; }
|
||||
public void setQuestionId(Long v) { this.questionId = v; }
|
||||
|
||||
public Long getDocId() { return docId; }
|
||||
public void setDocId(Long v) { this.docId = v; }
|
||||
|
||||
public String getAnswer() { return answer; }
|
||||
public void setAnswer(String v) { this.answer = v; }
|
||||
|
||||
public Integer getScore() { return score; }
|
||||
public void setScore(Integer v) { this.score = v; }
|
||||
|
||||
public String getResultType() { return resultType; }
|
||||
public void setResultType(String v) { this.resultType = v; }
|
||||
|
||||
public Integer getDeviation() { return deviation; }
|
||||
public void setDeviation(Integer v) { this.deviation = v; }
|
||||
|
||||
public Integer getWarning() { return warning; }
|
||||
public void setWarning(Integer v) { this.warning = v; }
|
||||
|
||||
public String getTheComment() { return theComment; }
|
||||
public void setTheComment(String v) { this.theComment = v; }
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package de.frigosped.dc.model;
|
||||
|
||||
/**
|
||||
* Request-Body für PUT /api/dc/documents/:id/texts
|
||||
* {"original_text": "...", "translated_text": "..."}
|
||||
*/
|
||||
public class TextsRequest {
|
||||
|
||||
private String originalText;
|
||||
private String translatedText;
|
||||
|
||||
public TextsRequest() {}
|
||||
|
||||
public TextsRequest(String originalText, String translatedText) {
|
||||
this.originalText = originalText;
|
||||
this.translatedText = translatedText;
|
||||
}
|
||||
|
||||
public String getOriginalText() { return originalText; }
|
||||
public void setOriginalText(String v) { this.originalText = v; }
|
||||
|
||||
public String getTranslatedText() { return translatedText; }
|
||||
public void setTranslatedText(String v) { this.translatedText = v; }
|
||||
}
|
||||
Reference in New Issue
Block a user