CPD Results

The following document contains the results of PMD's CPD 7.17.0.

Duplications

File Line
de/dlr/shepard/data/timeseries/endpoints/TimeseriesRest.java 299
de/dlr/shepard/data/timeseries/endpoints/TimeseriesRest.java 352
content = @Content(schema = @Schema(implementation = TimeseriesWithDataPoints.class))
  )
  @APIResponse(responseCode = "400", description = "bad request")
  @APIResponse(responseCode = "401", description = "not authorized")
  @APIResponse(responseCode = "403", description = "forbidden")
  @APIResponse(responseCode = "404", description = "not found")
  @Parameter(name = Constants.TIMESERIES_CONTAINER_ID)
  @Parameter(name = Constants.MEASUREMENT, required = true)
  @Parameter(name = Constants.LOCATION, required = true)
  @Parameter(name = Constants.DEVICE, required = true)
  @Parameter(name = Constants.SYMBOLICNAME, required = true)
  @Parameter(name = Constants.FIELD, required = true)
  @Parameter(name = Constants.START, required = true)
  @Parameter(name = Constants.END, required = true)
  @Parameter(name = Constants.FUNCTION)
  @Parameter(name = Constants.GROUP_BY)
  @Parameter(name = Constants.FILLOPTION)
File Line
de/dlr/shepard/context/references/timeseriesreference/endpoints/TimeseriesReferenceRest.java 204
de/dlr/shepard/context/references/timeseriesreference/endpoints/TimeseriesReferenceRest.java 263
public Response getTimeseriesPayload(
    @PathParam(Constants.COLLECTION_ID) @NotNull @PositiveOrZero Long collectionId,
    @PathParam(Constants.DATA_OBJECT_ID) @NotNull @PositiveOrZero Long dataObjectId,
    @PathParam(Constants.TIMESERIES_REFERENCE_ID) @NotNull @PositiveOrZero Long timeseriesReferenceId,
    @QueryParam(Constants.FUNCTION) AggregateFunction function,
    @QueryParam(Constants.GROUP_BY) Long groupBy,
    @QueryParam(Constants.FILLOPTION) FillOption fillOption,
    @QueryParam(Constants.DEVICE) Set<String> deviceFilterTag,
    @QueryParam(Constants.LOCATION) Set<String> locationFilterTag,
    @QueryParam(Constants.SYMBOLICNAME) Set<String> symbolicNameFilterTag,
    @QueryParam(Constants.MEASUREMENT) Set<String> measurementFilterTag,
    @QueryParam(Constants.FIELD) Set<String> fieldFilterTag
File Line
de/dlr/shepard/data/timeseries/endpoints/TimeseriesRest.java 316
de/dlr/shepard/data/timeseries/endpoints/TimeseriesRest.java 371
public Response getTimeseries(
    @PathParam(Constants.TIMESERIES_CONTAINER_ID) @NotNull @PositiveOrZero Long timeseriesContainerId,
    @QueryParam(Constants.MEASUREMENT) @NotBlank String measurement,
    @QueryParam(Constants.LOCATION) @NotBlank String location,
    @QueryParam(Constants.DEVICE) @NotBlank String device,
    @QueryParam(Constants.SYMBOLICNAME) @NotBlank String symbolicName,
    @QueryParam(Constants.FIELD) @NotBlank String field,
    @QueryParam(Constants.START) @NotNull @PositiveOrZero Long start,
    @QueryParam(Constants.END) @NotNull @PositiveOrZero Long end,
    @QueryParam(Constants.FUNCTION) AggregateFunction function,
    @QueryParam(Constants.GROUP_BY) Long groupBy,
    @QueryParam(Constants.FILLOPTION) FillOption fillOption
File Line
de/dlr/shepard/context/references/timeseriesreference/endpoints/TimeseriesReferenceMetricsRest.java 62
de/dlr/shepard/context/references/timeseriesreference/endpoints/TimeseriesReferenceMetricsRest.java 109
content = @Content(schema = @Schema(type = SchemaType.ARRAY, implementation = MetricsIO.class))
  )
  @APIResponse(description = "not found", responseCode = "404")
  @Parameter(name = Constants.COLLECTION_ID, required = true)
  @Parameter(name = Constants.DATA_OBJECT_ID, required = true)
  @Parameter(name = Constants.TIMESERIES_REFERENCE_ID, required = true)
  @Parameter(name = Constants.MEASUREMENT, required = true)
  @Parameter(name = Constants.DEVICE, required = true)
  @Parameter(name = Constants.LOCATION, required = true)
  @Parameter(name = Constants.SYMBOLICNAME, required = true)
  @Parameter(name = Constants.FIELD, required = true)
  @Parameter(name = Constants.VERSION_UID)
File Line
de/dlr/shepard/common/neo4j/io/BasicEntityIO.java 20
de/dlr/shepard/context/labjournal/io/LabJournalEntryIO.java 21
@Schema(readOnly = true, required = true)
  private Long id;

  @JsonFormat(shape = JsonFormat.Shape.STRING)
  @Schema(readOnly = true, required = true, format = "date-time", example = "2024-08-15T11:18:44.632+00:00")
  private Date createdAt;

  @Schema(readOnly = true, required = true)
  private String createdBy;

  @JsonFormat(shape = JsonFormat.Shape.STRING)
  @Schema(
    readOnly = true,
    nullable = true,
    required = true,
    format = "date-time",
    example = "2024-08-15T11:18:44.632+00:00"
  )
  private Date updatedAt;

  @Schema(readOnly = true, nullable = true, required = true)
  private String updatedBy;
File Line
de/dlr/shepard/data/spatialdata/endpoints/SpatialDataPointRest.java 80
de/dlr/shepard/data/timeseries/endpoints/TimeseriesRest.java 101
public Response getSpatialDataContainers(
    @QueryParam(Constants.QP_NAME) String name,
    @QueryParam(Constants.QP_PAGE) @PositiveOrZero Integer page,
    @QueryParam(Constants.QP_SIZE) @PositiveOrZero Integer size,
    @QueryParam(Constants.QP_ORDER_BY_ATTRIBUTE) ContainerAttributes orderBy,
    @QueryParam(Constants.QP_ORDER_DESC) Boolean orderDesc
  ) {
    var params = new QueryParamHelper();
    if (name != null) params = params.withName(name);
    if (page != null && size != null) params = params.withPageAndSize(page, size);
    if (orderBy != null) params = params.withOrderByAttribute(orderBy, orderDesc);

    var containers = containerService.getAllContainers(params);
File Line
de/dlr/shepard/data/spatialdata/endpoints/SpatialDataPointRest.java 80
de/dlr/shepard/data/structureddata/endpoints/StructuredDataRest.java 76
de/dlr/shepard/data/timeseries/endpoints/TimeseriesRest.java 101
public Response getSpatialDataContainers(
    @QueryParam(Constants.QP_NAME) String name,
    @QueryParam(Constants.QP_PAGE) @PositiveOrZero Integer page,
    @QueryParam(Constants.QP_SIZE) @PositiveOrZero Integer size,
    @QueryParam(Constants.QP_ORDER_BY_ATTRIBUTE) ContainerAttributes orderBy,
    @QueryParam(Constants.QP_ORDER_DESC) Boolean orderDesc
  ) {
    var params = new QueryParamHelper();
    if (name != null) params = params.withName(name);
    if (page != null && size != null) params = params.withPageAndSize(page, size);
    if (orderBy != null) params = params.withOrderByAttribute(orderBy, orderDesc);
File Line
de/dlr/shepard/context/references/file/endpoints/FileReferenceRest.java 182
de/dlr/shepard/context/references/timeseriesreference/endpoints/TimeseriesReferenceRest.java 238
@Operation(description = "Get file payload")
  @APIResponse(
    description = "ok",
    responseCode = "200",
    content = @Content(
      mediaType = MediaType.APPLICATION_OCTET_STREAM,
      schema = @Schema(type = SchemaType.STRING, format = "binary")
    )
  )
  @APIResponse(responseCode = "400", description = "bad request")
  @APIResponse(responseCode = "401", description = "not authorized")
  @APIResponse(responseCode = "403", description = "forbidden")
  @APIResponse(responseCode = "404", description = "not found")
  @Parameter(name = Constants.COLLECTION_ID)
  @Parameter(name = Constants.DATA_OBJECT_ID)
  @Parameter(name = Constants.FILE_REFERENCE_ID)
File Line
de/dlr/shepard/context/references/timeseriesreference/endpoints/TimeseriesReferenceMetricsRest.java 74
de/dlr/shepard/context/references/timeseriesreference/endpoints/TimeseriesReferenceMetricsRest.java 122
public Response getMetricsOfTimeseriesReference(
    @PathParam(Constants.COLLECTION_ID) @NotNull @PositiveOrZero Long collectionId,
    @PathParam(Constants.DATA_OBJECT_ID) @NotNull @PositiveOrZero Long dataObjectId,
    @PathParam(Constants.TIMESERIES_REFERENCE_ID) @NotNull @PositiveOrZero Long timeseriesReferenceId,
    @QueryParam(Constants.MEASUREMENT) @NotBlank String measurement,
    @QueryParam(Constants.DEVICE) @NotBlank String device,
    @QueryParam(Constants.LOCATION) @NotBlank String location,
    @QueryParam(Constants.SYMBOLICNAME) @NotBlank String symbolicName,
    @QueryParam(Constants.FIELD) @NotBlank String field,
    @QueryParam(Constants.VERSION_UID) @org.hibernate.validator.constraints.UUID String versionUID
File Line
de/dlr/shepard/context/semantic/endpoints/CollectionSemanticAnnotationRest.java 55
de/dlr/shepard/context/semantic/endpoints/DataObjectSemanticAnnotationRest.java 78
return getAllByShepardId(collectionId);
  }

  @GET
  @Tag(name = Constants.SEMANTIC_ANNOTATION)
  @APIResponse(
    description = "ok",
    responseCode = "200",
    content = @Content(schema = @Schema(implementation = SemanticAnnotationIO.class))
  )
  @APIResponse(responseCode = "400", description = "bad request")
  @APIResponse(responseCode = "401", description = "not authorized")
  @APIResponse(responseCode = "403", description = "forbidden")
  @APIResponse(responseCode = "404", description = "not found")
  @Path("{" + Constants.SEMANTIC_ANNOTATION_ID + "}")
  @Operation(operationId = "getCollectionAnnotation", description = "Get semantic annotation")
File Line
de/dlr/shepard/context/semantic/endpoints/TimeseriesSemanticAnnotationRest.java 59
de/dlr/shepard/context/semantic/endpoints/TimeseriesSemanticAnnotationRest.java 85
)
  @APIResponse(
    description = "ok",
    responseCode = "200",
    content = @Content(schema = @Schema(type = SchemaType.ARRAY, implementation = SemanticAnnotationIO.class))
  )
  @APIResponse(responseCode = "400", description = "bad request")
  @APIResponse(responseCode = "401", description = "not authorized")
  @APIResponse(responseCode = "403", description = "forbidden")
  @APIResponse(responseCode = "404", description = "not found")
  @Parameter(name = Constants.TIMESERIES_CONTAINER_ID, deprecated = true)
  @Parameter(name = Constants.TIMESERIES_ID)
File Line
de/dlr/shepard/context/semantic/endpoints/BasicReferenceSemanticAnnotationRest.java 123
de/dlr/shepard/context/semantic/endpoints/CollectionSemanticAnnotationRest.java 80
de/dlr/shepard/context/semantic/endpoints/DataObjectSemanticAnnotationRest.java 113
assertSemanticAnnotationBelongsToEntity(basicReference, semanticAnnotationId);
    return get(semanticAnnotationId);
  }

  @POST
  @Tag(name = Constants.SEMANTIC_ANNOTATION)
  @APIResponse(
    description = "created",
    responseCode = "201",
    content = @Content(schema = @Schema(implementation = SemanticAnnotationIO.class))
  )
  @APIResponse(responseCode = "400", description = "bad request")
  @APIResponse(responseCode = "401", description = "not authorized")
  @APIResponse(responseCode = "403", description = "forbidden")
  @APIResponse(responseCode = "404", description = "not found")
  @Subscribable
  @Operation(operationId = "createReferenceAnnotation", description = "Create a new semantic annotation")