Skip to content

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianKniephoff committed Jan 29, 2025
1 parent 3e7f4b9 commit 10ec87f
Show file tree
Hide file tree
Showing 20 changed files with 789 additions and 1,659 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
/** A class representing a category of the annotation tool. */
public interface Category extends Resource {

/** The video id where the category is */
Option<Long> getVideoId();
/**
* The video id where the category is
*/
long getVideoId();

/** The scale that can be used for this category. */
Option<Long> getScaleId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
import org.opencastproject.mediapackage.MediaPackage;
import org.opencastproject.util.data.Option;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Stream;

Expand Down Expand Up @@ -302,7 +300,7 @@ Annotation createAnnotation(long trackId, double start, Option<Double> duration,
* @throws ExtendedAnnotationException
* if an error occurs while storing/retrieving from persistence storage
*/
Scale createScale(Option<Long> videoId, String name, Option<String> description, Resource resource)
Scale createScale(long videoId, String name, Option<String> description, Resource resource)
throws ExtendedAnnotationException;

/**
Expand Down Expand Up @@ -336,24 +334,11 @@ Scale createScale(Option<Long> videoId, String name, Option<String> description,
/**
* Get all scales from a video.
*
* @param videoId
* the video id
* @param offset
* pagination offset
* @param limit
* limit the result set to the said amount
* @param since
* limit the result set to annotations modified since the said date
* @param tagsAnd
* the tags logical AND Map
* @param tagsOr
* the tags logical OR Map
* @param videoId the video id
* @return the scale list or an empty list if no scale has been found
* @throws ExtendedAnnotationException
* if an error occurs while storing/retrieving from persistence storage
* @throws ExtendedAnnotationException if an error occurs while storing/retrieving from persistence storage
*/
List<Scale> getScales(Option<Long> videoId, Option<Integer> offset, Option<Integer> limit, Option<Date> since,
Option<Map<String, String>> tagsAnd, Option<Map<String, String>> tagsOr) throws ExtendedAnnotationException;
Stream<Scale> getScales(long videoId) throws ExtendedAnnotationException;

/**
* Update a scale.
Expand Down Expand Up @@ -412,24 +397,11 @@ ScaleValue createScaleValue(long scaleId, String name, double value, int order,
/**
* Get all scale values from a scale.
*
* @param scaleId
* the scale id
* @param offset
* pagination offset
* @param limit
* limit the result set to the said amount
* @param since
* limit the result set to annotations modified since the said date
* @param tagsAnd
* the tags logical AND Map
* @param tagsOr
* the tags logical OR Map
* @param scaleId the scale id
* @return the scale value list or an empty list if no scale values has been found
* @throws ExtendedAnnotationException
* if an error occurs while storing/retrieving from persistence storage
* @throws ExtendedAnnotationException if an error occurs while storing/retrieving from persistence storage
*/
List<ScaleValue> getScaleValues(long scaleId, Option<Integer> offset, Option<Integer> limit, Option<Date> since,
Option<Map<String, String>> tagsAnd, Option<Map<String, String>> tagsOr) throws ExtendedAnnotationException;
Stream<ScaleValue> getScaleValues(long scaleId) throws ExtendedAnnotationException;

/**
* Update a scale value
Expand Down Expand Up @@ -554,7 +526,7 @@ Option<Questionnaire> createQuestionnaireFromTemplate(long templateQuestionnaire
* @throws ExtendedAnnotationException
* if an error occurs while storing/retrieving from persistence storage
*/
Category createCategory(Option<String> seriesExtId, Option<Long> seriesCategoryId, Option<Long> videoId,
Category createCategory(Option<String> seriesExtId, Option<Long> seriesCategoryId, long videoId,
Option<Long> scaleId, String name, Option<String> description, Option<String> settings, Resource resource)
throws ExtendedAnnotationException;

Expand Down Expand Up @@ -592,27 +564,12 @@ Option<Category> createCategoryFromTemplate(long templateCategoryId, String seri
/**
* Get all categories from a video.
*
* @param seriesExtId
* the external series the category belongs to
* @param videoId
* the video id
* @param offset
* pagination offset
* @param limit
* limit the result set to the said amount
* @param since
* limit the result set to annotations modified since the said date
* @param tagsAnd
* the tags logical AND Map
* @param tagsOr
* the tags logical OR Map
* @param seriesExtId the external series the category belongs to
* @param videoId the video id
* @return the category list or an empty list if no categories has been found
* @throws ExtendedAnnotationException
* if an error occurs while storing/retrieving from persistence storage
* @throws ExtendedAnnotationException if an error occurs while storing/retrieving from persistence storage
*/
List<Category> getCategories(Option<String> seriesExtId, Option<Long> videoId, Option<Integer> offset,
Option<Integer> limit, Option<Date> since, Option<Map<String, String>> tagsAnd,
Option<Map<String, String>> tagsOr) throws ExtendedAnnotationException;
Stream<Category> getCategories(Option<String> seriesExtId, long videoId) throws ExtendedAnnotationException;

/**
* Update a category.
Expand Down Expand Up @@ -684,24 +641,11 @@ Label createLabel(long categoryId, String value, String abbreviation, Option<Str
/**
* Get all labels from a video.
*
* @param categoryId
* the category id
* @param offset
* pagination offset
* @param limit
* limit the result set to the said amount
* @param since
* limit the result set to lables modified since the said date
* @param tagsAnd
* the tags logical AND Map
* @param tagsOr
* the tags logical OR Map
* @param categoryId the category id
* @return the label list or an empty list if no labels has been found
* @throws ExtendedAnnotationException
* if an error occurs while storing/retrieving from persistence storage
* @throws ExtendedAnnotationException if an error occurs while storing/retrieving from persistence storage
*/
List<Label> getLabels(long categoryId, Option<Integer> offset, Option<Integer> limit, Option<Date> since,
Option<Map<String, String>> tagsAnd, Option<Map<String, String>> tagsOr) throws ExtendedAnnotationException;
Stream<Label> getLabels(long categoryId) throws ExtendedAnnotationException;

/**
* Update a label.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
/** A class representing a scale of the annotation tool. */
public interface Scale extends Resource {

/** The video id where the scale is */
Option<Long> getVideoId();
/**
* The video id where the scale is
*/
long getVideoId();

/** The scale name */
String getName();
Expand Down
6 changes: 0 additions & 6 deletions opencast-backend/annotation-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.10.10</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
Expand Down
Loading

0 comments on commit 10ec87f

Please sign in to comment.