From 36a384af43012e98832de92dca754dfa353dbded Mon Sep 17 00:00:00 2001 From: tekay <tom.kaesler@mni.thm.de> Date: Tue, 15 Sep 2015 14:40:36 +0200 Subject: [PATCH] rewrite api doku for entities --- .../java/de/thm/arsnova/entities/Answer.java | 34 +++---- .../arsnova/entities/InterposedQuestion.java | 16 ++-- .../entities/InterposedReadingCount.java | 8 +- .../entities/LearningProgressOptions.java | 6 +- .../thm/arsnova/entities/PossibleAnswer.java | 10 +-- .../de/thm/arsnova/entities/Question.java | 88 +++++++++---------- 6 files changed, 81 insertions(+), 81 deletions(-) diff --git a/src/main/java/de/thm/arsnova/entities/Answer.java b/src/main/java/de/thm/arsnova/entities/Answer.java index 82ea05d7..28196340 100644 --- a/src/main/java/de/thm/arsnova/entities/Answer.java +++ b/src/main/java/de/thm/arsnova/entities/Answer.java @@ -26,7 +26,7 @@ import io.swagger.annotations.ApiModelProperty; * * This class has additional fields to transport generated answer statistics. */ -@ApiModel(value = "Answer", description = "the Answer API") +@ApiModel(value = "Answer", description = "the Answer entity") public class Answer { private String _id; @@ -53,7 +53,7 @@ public class Answer { this.type = "skill_question_answer"; } - @ApiModelProperty(required = true, value = "used to display _id") + @ApiModelProperty(required = true, value = "the couchDB ID") public final String get_id() { return _id; } @@ -62,7 +62,7 @@ public class Answer { this._id = _id; } - @ApiModelProperty(required = true, value = "used to display _rev") + @ApiModelProperty(required = true, value = "the couchDB revision Nr.") public final String get_rev() { return _rev; } @@ -71,7 +71,7 @@ public class Answer { this._rev = _rev; } - @ApiModelProperty(required = true, value = "used to display type") + @ApiModelProperty(required = true, value = "\"skill_question_answer\" - used to filter in the cochDB") public final String getType() { return type; } @@ -80,7 +80,7 @@ public class Answer { this.type = type; } - @ApiModelProperty(required = true, value = "used to display session id") + @ApiModelProperty(required = true, value = "ID of the session, the answer is assigned to") public final String getSessionId() { return sessionId; } @@ -98,7 +98,7 @@ public class Answer { this.questionId = questionId; } - @ApiModelProperty(required = true, value = "used to display answer text") + @ApiModelProperty(required = true, value = "the answer text") public final String getAnswerText() { return answerText; } @@ -107,7 +107,7 @@ public class Answer { this.answerText = answerText; } - @ApiModelProperty(required = true, value = "used to display answer subject") + @ApiModelProperty(required = true, value = "the answer subject") public final String getAnswerSubject() { return answerSubject; } @@ -116,7 +116,7 @@ public class Answer { this.answerSubject = answerSubject; } - @ApiModelProperty(required = true, value = "used to displaypi round ") + @ApiModelProperty(required = true, value = "the peer instruction round nr.") public int getPiRound() { return piRound; } @@ -128,13 +128,13 @@ public class Answer { /* TODO: use JsonViews instead of JsonIgnore when supported by Spring (4.1) * http://wiki.fasterxml.com/JacksonJsonViews * https://jira.spring.io/browse/SPR-7156 */ - @ApiModelProperty(required = true, value = "used to display user") + @ApiModelProperty(required = true, value = "the user") @JsonIgnore public final String getUser() { return user; } - @ApiModelProperty(required = true, value = "used to display answer image") + @ApiModelProperty(required = true, value = "the answer image") @JsonIgnore public String getAnswerImage() { return answerImage; @@ -144,7 +144,7 @@ public class Answer { this.answerImage = answerImage; } - @ApiModelProperty(required = true, value = "used to display answer thumbnail image") + @ApiModelProperty(required = true, value = "the answer thumbnail") public String getAnswerThumbnailImage() { return answerThumbnailImage; } @@ -157,7 +157,7 @@ public class Answer { this.user = user; } - @ApiModelProperty(required = true, value = "used to display timestamp") + @ApiModelProperty(required = true, value = "the creation date timestamp") public long getTimestamp() { return timestamp; } @@ -166,7 +166,7 @@ public class Answer { this.timestamp = timestamp; } - @ApiModelProperty(required = true, value = "read") + @ApiModelProperty(required = true, value = "displays whether the answer is read") public boolean isRead() { return read; } @@ -175,7 +175,7 @@ public class Answer { this.read = read; } - @ApiModelProperty(required = true, value = "used to display answer count") + @ApiModelProperty(required = true, value = "the number of answers given. used for statistics") public final int getAnswerCount() { return answerCount; } @@ -184,7 +184,7 @@ public class Answer { this.answerCount = answerCount; } - @ApiModelProperty(required = true, value = "used to display abstention") + @ApiModelProperty(required = true, value = "the abstention") public boolean isAbstention() { return abstention; } @@ -193,7 +193,7 @@ public class Answer { this.abstention = abstention; } - @ApiModelProperty(required = true, value = "used to display abtention count ") + @ApiModelProperty(required = true, value = "the number of abstentions given. used for statistics") public int getAbstentionCount() { return abstentionCount; } @@ -202,7 +202,7 @@ public class Answer { this.abstentionCount = abstentionCount; } - @ApiModelProperty(required = true, value = "used to display question variant") + @ApiModelProperty(required = true, value = "either lecture or preparation") public String getQuestionVariant() { return questionVariant; } diff --git a/src/main/java/de/thm/arsnova/entities/InterposedQuestion.java b/src/main/java/de/thm/arsnova/entities/InterposedQuestion.java index 3faf7f51..c8c0cdb7 100644 --- a/src/main/java/de/thm/arsnova/entities/InterposedQuestion.java +++ b/src/main/java/de/thm/arsnova/entities/InterposedQuestion.java @@ -24,7 +24,7 @@ import io.swagger.annotations.ApiModelProperty; /** * A question the user is asking the teacher. Also known as feedback or audience question. */ -@ApiModel(value = "audiencequestion", description = "the Interposed Question API") +@ApiModel(value = "audiencequestion", description = "the interposed question entity") public class InterposedQuestion { private String _id; @@ -42,7 +42,7 @@ public class InterposedQuestion { private boolean read; private String creator; - @ApiModelProperty(required = true, value = "used to display question id") + @ApiModelProperty(required = true, value = "the couchDB ID") public String get_id() { return _id; } @@ -50,7 +50,7 @@ public class InterposedQuestion { this._id = _id; } - @ApiModelProperty(required = true, value = "used to display rev") + @ApiModelProperty(required = true, value = "the couchDB revision Nr.") public String get_rev() { return _rev; } @@ -66,7 +66,7 @@ public class InterposedQuestion { this.read = read; } - @ApiModelProperty(required = true, value = "used to display The type") + @ApiModelProperty(required = true, value = "used to display the type") public String getType() { return type; } @@ -74,7 +74,7 @@ public class InterposedQuestion { this.type = type; } - @ApiModelProperty(required = true, value = "used to display Subject") + @ApiModelProperty(required = true, value = "the Subject") public String getSubject() { return subject; } @@ -82,7 +82,7 @@ public class InterposedQuestion { this.subject = subject; } - @ApiModelProperty(required = true, value = "used to display Text") + @ApiModelProperty(required = true, value = "the Text") public String getText() { return text; } @@ -90,7 +90,7 @@ public class InterposedQuestion { this.text = text; } - @ApiModelProperty(required = true, value = "used to display Session id") + @ApiModelProperty(required = true, value = "ID of the session, the question is assigned to") public String getSessionId() { return sessionId; } @@ -98,7 +98,7 @@ public class InterposedQuestion { this.sessionId = sessionId; } - @ApiModelProperty(required = true, value = "used to display Timetamp") + @ApiModelProperty(required = true, value = "creation date timestamp") public long getTimestamp() { return timestamp; } diff --git a/src/main/java/de/thm/arsnova/entities/InterposedReadingCount.java b/src/main/java/de/thm/arsnova/entities/InterposedReadingCount.java index ce1af789..23dcd8d9 100644 --- a/src/main/java/de/thm/arsnova/entities/InterposedReadingCount.java +++ b/src/main/java/de/thm/arsnova/entities/InterposedReadingCount.java @@ -23,7 +23,7 @@ import io.swagger.annotations.ApiModelProperty; /** * Wrapper class for counting read and unread interposed questions for a session or a single user. */ -@ApiModel(value = "audiencequestion/readcount", description = "the Interposed reading count API") +@ApiModel(value = "audiencequestion/readcount", description = "the interposed reading count entity") public class InterposedReadingCount { private int read; @@ -39,7 +39,7 @@ public class InterposedReadingCount { this.unread = 0; } - @ApiModelProperty(required = true, value = "used to display read interposed questions") + @ApiModelProperty(required = true, value = "the number of read interposed questions") public int getRead() { return read; } @@ -48,7 +48,7 @@ public class InterposedReadingCount { this.read = read; } - @ApiModelProperty(required = true, value = "used to display unread interposed questions") + @ApiModelProperty(required = true, value = "the nuber of unread interposed questions") public int getUnread() { return unread; } @@ -57,7 +57,7 @@ public class InterposedReadingCount { this.unread = unread; } - @ApiModelProperty(required = true, value = "used to display Total questions") + @ApiModelProperty(required = true, value = "the number of total interposed questions") public int getTotal() { return getRead() + getUnread(); } diff --git a/src/main/java/de/thm/arsnova/entities/LearningProgressOptions.java b/src/main/java/de/thm/arsnova/entities/LearningProgressOptions.java index 4d079d30..4667dae8 100644 --- a/src/main/java/de/thm/arsnova/entities/LearningProgressOptions.java +++ b/src/main/java/de/thm/arsnova/entities/LearningProgressOptions.java @@ -22,7 +22,7 @@ import io.swagger.annotations.ApiModelProperty; /** * A session's settings regarding the calculation of the learning progress. */ -@ApiModel(value = "learning progress options", description = "the learning progress API") +@ApiModel(value = "learning progress options", description = "the learning progress entity") public class LearningProgressOptions { private String type = "questions"; @@ -37,7 +37,7 @@ public class LearningProgressOptions { public LearningProgressOptions() {} - @ApiModelProperty(required = true, value = "used to display the Type") + @ApiModelProperty(required = true, value = "the type") public String getType() { return type; } @@ -46,7 +46,7 @@ public class LearningProgressOptions { this.type = learningProgressType; } - @ApiModelProperty(required = true, value = "used to display question variant") + @ApiModelProperty(required = true, value = "either lecture or preparation") public String getQuestionVariant() { return questionVariant; } diff --git a/src/main/java/de/thm/arsnova/entities/PossibleAnswer.java b/src/main/java/de/thm/arsnova/entities/PossibleAnswer.java index d8813223..5ffbfe5d 100644 --- a/src/main/java/de/thm/arsnova/entities/PossibleAnswer.java +++ b/src/main/java/de/thm/arsnova/entities/PossibleAnswer.java @@ -23,7 +23,7 @@ import io.swagger.annotations.ApiModelProperty; /** * This class represents an answer option of a question. */ -@ApiModel(value = "session/answer", description = "the Possible Answer API") +@ApiModel(value = "session/answer", description = "the Possible Answer entity") public class PossibleAnswer { private String id; @@ -31,7 +31,7 @@ public class PossibleAnswer { private boolean correct; private int value; - @ApiModelProperty(required = true, value = "used to display id") + @ApiModelProperty(required = true, value = "the id") public String getId() { return this.id; } @@ -40,7 +40,7 @@ public class PossibleAnswer { this.id = id; } - @ApiModelProperty(required = true, value = "used to display text") + @ApiModelProperty(required = true, value = "the text") public String getText() { return text; } @@ -49,7 +49,7 @@ public class PossibleAnswer { this.text = text; } - @ApiModelProperty(required = true, value = "correct") + @ApiModelProperty(required = true, value = "true for a correct answer") public boolean isCorrect() { return correct; } @@ -58,7 +58,7 @@ public class PossibleAnswer { this.correct = correct; } - @ApiModelProperty(required = true, value = "used to display value") + @ApiModelProperty(required = true, value = "the value") public int getValue() { return value; } diff --git a/src/main/java/de/thm/arsnova/entities/Question.java b/src/main/java/de/thm/arsnova/entities/Question.java index 36c0c9f2..61e6e1ff 100644 --- a/src/main/java/de/thm/arsnova/entities/Question.java +++ b/src/main/java/de/thm/arsnova/entities/Question.java @@ -27,7 +27,7 @@ import io.swagger.annotations.ApiModelProperty; /** * A question the teacher is asking. */ -@ApiModel(value = "lecturerquestion", description = "the Question API") +@ApiModel(value = "lecturerquestion", description = "the Question entity") public class Question implements Serializable { private String type; @@ -85,7 +85,7 @@ public class Question implements Serializable { private String hint; private String solution; - @ApiModelProperty(required = true, value = "used to display type") + @ApiModelProperty(required = true, value = "the type") public final String getType() { return type; } @@ -94,7 +94,7 @@ public class Question implements Serializable { this.type = type; } - @ApiModelProperty(required = true, value = "used to display the question type") + @ApiModelProperty(required = true, value = "the question type") public final String getQuestionType() { return questionType; } @@ -103,7 +103,7 @@ public class Question implements Serializable { this.questionType = questionType; } - @ApiModelProperty(required = true, value = "used to display question variant") + @ApiModelProperty(required = true, value = "either lecture or preparation") public final String getQuestionVariant() { return questionVariant; } @@ -121,7 +121,7 @@ public class Question implements Serializable { this.subject = subject; } - @ApiModelProperty(required = true, value = "used to display text") + @ApiModelProperty(required = true, value = "the text") public final String getText() { return text; } @@ -130,7 +130,7 @@ public class Question implements Serializable { this.text = text; } - @ApiModelProperty(required = true, value = "active") + @ApiModelProperty(required = true, value = "true for active question") public final boolean isActive() { return active; } @@ -139,7 +139,7 @@ public class Question implements Serializable { this.active = active; } - @ApiModelProperty(required = true, value = "used to display released for") + @ApiModelProperty(required = true, value = "deprecated - previously used to limitate the audience") public final String getReleasedFor() { return releasedFor; } @@ -148,7 +148,7 @@ public class Question implements Serializable { this.releasedFor = releasedFor; } - @ApiModelProperty(required = true, value = "used to display possible answers") + @ApiModelProperty(required = true, value = "list of possible answers") public final List<PossibleAnswer> getPossibleAnswers() { return possibleAnswers; } @@ -157,7 +157,7 @@ public class Question implements Serializable { this.possibleAnswers = possibleAnswers; } - @ApiModelProperty(required = true, value = "no correct") + @ApiModelProperty(required = true, value = "if true, no answer is marked correct") public final boolean isNoCorrect() { return noCorrect; } @@ -166,7 +166,7 @@ public class Question implements Serializable { this.noCorrect = noCorrect; } - @ApiModelProperty(required = true, value = "used to display session id") + @ApiModelProperty(required = true, value = "couchDB ID of the session, the question is assigned to") public final String getSessionId() { return sessionId; } @@ -175,7 +175,7 @@ public class Question implements Serializable { this.sessionId = sessionId; } - @ApiModelProperty(required = true, value = "used to display session id") + @ApiModelProperty(required = true, value = "couchDB ID of the session, the question is assigned to") public final String getSession() { return sessionId; } @@ -184,7 +184,7 @@ public class Question implements Serializable { sessionId = session; } - @ApiModelProperty(required = true, value = "used to display session keyword") + @ApiModelProperty(required = true, value = "the session keyword, the question is assigned to") public final String getSessionKeyword() { return sessionKeyword; } @@ -193,7 +193,7 @@ public class Question implements Serializable { sessionKeyword = keyword; } - @ApiModelProperty(required = true, value = "used to display timestamp") + @ApiModelProperty(required = true, value = "creation date timestamp") public final long getTimestamp() { return timestamp; } @@ -216,7 +216,7 @@ public class Question implements Serializable { return duration; } - @ApiModelProperty(required = true, value = "used to display image Question") + @ApiModelProperty(required = true, value = "true for image question") public final boolean isImageQuestion() { return imageQuestion; } @@ -229,7 +229,7 @@ public class Question implements Serializable { this.duration = duration; } - @ApiModelProperty(required = true, value = "used to display pi Round") + @ApiModelProperty(required = true, value = "the peer instruction round nr.") public int getPiRound() { return piRound; } @@ -238,7 +238,7 @@ public class Question implements Serializable { this.piRound = piRound; } - @ApiModelProperty(required = true, value = "used to display pi round end time") + @ApiModelProperty(required = true, value = "the peer instruction round end timestamp") public long getPiRoundEndTime() { return piRoundEndTime; } @@ -247,7 +247,7 @@ public class Question implements Serializable { this.piRoundEndTime = piRoundEndTime; } - @ApiModelProperty(required = true, value = "used to display pi round start time") + @ApiModelProperty(required = true, value = "the peer instruction round start timestamp") public long getPiRoundStartTime() { return piRoundStartTime; } @@ -256,7 +256,7 @@ public class Question implements Serializable { this.piRoundStartTime = piRoundStartTime; } - @ApiModelProperty(required = true, value = "piRoundActive ") + @ApiModelProperty(required = true, value = "true for active peer instruction round") public boolean isPiRoundActive() { return piRoundActive; } @@ -265,7 +265,7 @@ public class Question implements Serializable { this.piRoundActive = piRoundActive; } - @ApiModelProperty(required = true, value = "piRoundFinished ") + @ApiModelProperty(required = true, value = "true for finished peer instruction round") public boolean isPiRoundFinished() { return piRoundFinished; } @@ -310,7 +310,7 @@ public class Question implements Serializable { this.abstention = abstention; } - @ApiModelProperty(required = true, value = "used to display _id") + @ApiModelProperty(required = true, value = "the couchDB ID") public final String get_id() { return _id; } @@ -319,7 +319,7 @@ public class Question implements Serializable { this._id = _id; } - @ApiModelProperty(required = true, value = "used to display _rev") + @ApiModelProperty(required = true, value = "the couchDB revision Nr.") public final String get_rev() { return _rev; } @@ -328,7 +328,7 @@ public class Question implements Serializable { this._rev = _rev; } - @ApiModelProperty(required = true, value = "used to display image") + @ApiModelProperty(required = true, value = "the image") public String getImage() { return image; } @@ -337,7 +337,7 @@ public class Question implements Serializable { this.image = image; } - @ApiModelProperty(required = true, value = "used to display fcImage") + @ApiModelProperty(required = true, value = "the fcImage") public String getFcImage() { return fcImage; } @@ -346,7 +346,7 @@ public class Question implements Serializable { this.fcImage = fcImage; } - @ApiModelProperty(required = true, value = "used to display gridSize") + @ApiModelProperty(required = true, value = "the grid size") public int getGridSize() { return gridSize; } @@ -355,7 +355,7 @@ public class Question implements Serializable { this.gridSize = gridSize; } - @ApiModelProperty(required = true, value = "used to display offsetX") + @ApiModelProperty(required = true, value = "the image X offset") public int getOffsetX() { return offsetX; } @@ -364,7 +364,7 @@ public class Question implements Serializable { this.offsetX = offsetX; } - @ApiModelProperty(required = true, value = "used to display offsetY") + @ApiModelProperty(required = true, value = "the image Y offset") public int getOffsetY() { return offsetY; } @@ -373,7 +373,7 @@ public class Question implements Serializable { this.offsetY = offsetY; } - @ApiModelProperty(required = true, value = "used to display zoomLvl") + @ApiModelProperty(required = true, value = "the image zoom level") public int getZoomLvl() { return zoomLvl; } @@ -382,7 +382,7 @@ public class Question implements Serializable { this.zoomLvl = zoomLvl; } - @ApiModelProperty(required = true, value = "used to display gridOffsetX") + @ApiModelProperty(required = true, value = "the grid X offset") public int getGridOffsetX() { return gridOffsetX; } @@ -391,7 +391,7 @@ public class Question implements Serializable { this.gridOffsetX = gridOffsetX; } - @ApiModelProperty(required = true, value = "used to display gridOffsetY") + @ApiModelProperty(required = true, value = "the grid Y offset") public int getGridOffsetY() { return gridOffsetY; } @@ -400,7 +400,7 @@ public class Question implements Serializable { this.gridOffsetY = gridOffsetY; } - @ApiModelProperty(required = true, value = "used to display grid zoom lvl") + @ApiModelProperty(required = true, value = "the grid zoom lvl") public int getGridZoomLvl() { return gridZoomLvl; } @@ -409,7 +409,7 @@ public class Question implements Serializable { this.gridZoomLvl = gridZoomLvl; } - @ApiModelProperty(required = true, value = "used to display grid size X") + @ApiModelProperty(required = true, value = "the grid X size") public int getGridSizeX() { return gridSizeX; } @@ -418,7 +418,7 @@ public class Question implements Serializable { this.gridSizeX = gridSizeX; } - @ApiModelProperty(required = true, value = "used to display grid size Y ") + @ApiModelProperty(required = true, value = "the grid Y size") public int getGridSizeY() { return gridSizeY; } @@ -427,7 +427,7 @@ public class Question implements Serializable { this.gridSizeY = gridSizeY; } - @ApiModelProperty(required = true, value = "grid is hidden") + @ApiModelProperty(required = true, value = "true for hidden grid") public boolean getGridIsHidden() { return gridIsHidden; } @@ -436,7 +436,7 @@ public class Question implements Serializable { this.gridIsHidden = gridIsHidden; } - @ApiModelProperty(required = true, value = "used to display image rotation") + @ApiModelProperty(required = true, value = "the image rotation") public int getImgRotation() { return imgRotation; } @@ -445,7 +445,7 @@ public class Question implements Serializable { this.imgRotation = imgRotation; } - @ApiModelProperty(required = true, value = "used to display toggel fields left") + @ApiModelProperty(required = true, value = "the toggeled lef fields") public boolean getToggleFieldsLeft() { return toggleFieldsLeft; } @@ -454,7 +454,7 @@ public class Question implements Serializable { this.toggleFieldsLeft = toggleFieldsLeft; } - @ApiModelProperty(required = true, value = "used to display number clickable fields") + @ApiModelProperty(required = true, value = "the number of clickable fields") public int getNumClickableFields() { return numClickableFields; } @@ -463,7 +463,7 @@ public class Question implements Serializable { this.numClickableFields = numClickableFields; } - @ApiModelProperty(required = true, value = "used to display threshold correct answers") + @ApiModelProperty(required = true, value = "the threshold of correct answers") public int getThresholdCorrectAnswers() { return thresholdCorrectAnswers; } @@ -472,7 +472,7 @@ public class Question implements Serializable { this.thresholdCorrectAnswers = thresholdCorrectAnswers; } - @ApiModelProperty(required = true, value = "used to display grid line color") + @ApiModelProperty(required = true, value = "the grid line color") public String getGridLineColor() { return gridLineColor; } @@ -481,7 +481,7 @@ public class Question implements Serializable { this.gridLineColor = gridLineColor; } - @ApiModelProperty(required = true, value = "used to display number of dots") + @ApiModelProperty(required = true, value = "the number of dots") public int getNumberOfDots() { return numberOfDots; } @@ -490,7 +490,7 @@ public class Question implements Serializable { this.numberOfDots = numberOfDots; } - @ApiModelProperty(required = true, value = "used to display the grid type") + @ApiModelProperty(required = true, value = "the grid type") public String getGridType() { return gridType; } @@ -503,7 +503,7 @@ public class Question implements Serializable { this.scaleFactor = scaleFactor; } - @ApiModelProperty(required = true, value = "used to display scale factor") + @ApiModelProperty(required = true, value = "the image scale factor") public String getScaleFactor() { return this.scaleFactor; } @@ -512,12 +512,12 @@ public class Question implements Serializable { this.gridScaleFactor = scaleFactor; } - @ApiModelProperty(required = true, value = "used to display grid scale factor") + @ApiModelProperty(required = true, value = "the grid scale factor") public String getGridScaleFactor() { return this.gridScaleFactor; } - @ApiModelProperty(required = true, value = "enabled text nswer") + @ApiModelProperty(required = true, value = "true for a question that can be answered via text") public boolean isTextAnswerEnabled() { return this.textAnswerEnabled; } @@ -526,7 +526,7 @@ public class Question implements Serializable { this.textAnswerEnabled = textAnswerEnabled; } - @ApiModelProperty(required = true, value = "voting disabled") + @ApiModelProperty(required = true, value = "true for disabled voting") public boolean isVotingDisabled() { return votingDisabled; } -- GitLab