Commit 6a7def11 authored by Noel Alonso's avatar Noel Alonso
Browse files

Añade componentes para Tracking de observaciones

parent 16144dfb
Loading
Loading
Loading
Loading
+42 −0
Original line number Diff line number Diff line
package es.redmic.api.privatedata.controller;

/*-
 * #%L
 * API
 * %%
 * Copyright (C) 2024 REDMIC Project / Server
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import es.redmic.api.geodata.tracking.controller.RTrackBaseController;
import es.redmic.es.geodata.tracking.common.service.TrackingESService;
import es.redmic.models.es.common.query.dto.GeoDataQueryDTO;
import es.redmic.models.es.geojson.common.model.GeoPointData;
import es.redmic.models.es.geojson.tracking.common.ElementTrackingDTO;

@RestController
@RequestMapping(value = "${controller.mapping.PRIVATE_TRACKING_BY_ACTIVITY_AND_ELEMENT}")
public class AnimalObservationTrackingController
	extends RTrackBaseController<GeoPointData, ElementTrackingDTO, GeoDataQueryDTO> {

	@Autowired
	public AnimalObservationTrackingController(TrackingESService service) {
		super(service);
	}
}
+2 −2
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ public class GeoFixedObservationSeriesController
	extends RGeoDataController<GeoPointData, GeoFixedTimeSeriesDTO, GeoDataQueryDTO> {

	@Autowired
	public GeoFixedObservationSeriesController(GeoFixedObservationSeriesESService ESService) {
		super(ESService);
	public GeoFixedObservationSeriesController(GeoFixedObservationSeriesESService service) {
		super(service);
	}
}
+28 −0
Original line number Diff line number Diff line
package es.redmic.api.privatedata.repository;

import es.redmic.es.geodata.tracking.common.repository.TrackingBaseESRepository;

public class AnimalObservationTrackingESRepository extends TrackingBaseESRepository {

	protected static String[] INDEX = { "private-geodata" };
	protected static String TYPE = "_doc";

	public AnimalObservationTrackingESRepository() {
		super();
	}

	@Override
	public String[] getIndex() {
		return INDEX;
	}

	@Override
	public String getType() {
		return TYPE;
	}

	@Override
	protected String getMappingFilePath(String index, String type) {
		return MAPPING_BASE_PATH + "private/geodata" + MAPPING_FILE_EXTENSION;
	}
}
+14 −0
Original line number Diff line number Diff line
package es.redmic.api.privatedata.service;

import org.springframework.beans.factory.annotation.Autowired;

import es.redmic.api.privatedata.repository.AnimalObservationTrackingESRepository;
import es.redmic.es.geodata.tracking.common.service.TrackingBaseESService;

public class AnimalObservationTrackingESService extends TrackingBaseESService {

    @Autowired
    public AnimalObservationTrackingESService(AnimalObservationTrackingESRepository repository){
        super(repository);
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -314,7 +314,7 @@ controller.mapping.GRID5000_BY_ID_SCHEMA=${controller.mapping.GRID5000_BY_ID}${c
#Private
controller.mapping.PRIVATE_SURVEYSTATIONS_BY_ACTIVITY=/private/activities/{activityId}/observationseriesstations
controller.mapping.PRIVATE_OBSERVATIONSERIES=/private/observationseries
controller.mapping.PRIVATE_ANIMAL_TRACKING_BY_ACTIVITY=/private/activities/{activityId}/animaltracking
controller.mapping.PRIVATE_TRACKING_BY_ACTIVITY_AND_ELEMENT=/private/${controller.mapping.TRACKING_BY_ACTIVITY_AND_ELEMENT}
#Paths

#Worms