Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images service #4

Merged
merged 23 commits into from
Feb 6, 2018
Merged

Images service #4

merged 23 commits into from
Feb 6, 2018

Conversation

Gouga34
Copy link
Member

@Gouga34 Gouga34 commented Jan 3, 2018

POST images metadata
POST image (file)
GET images (search by : uri, rdf type, date, concerned elements)

@@ -57,8 +59,9 @@
public ArrayList<String> agronomicalObjects = new ArrayList<>();
public String startDate;
public String endDate;
public String provenance;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain what "provenance" attribute represents, an uri.

//en discuter avec Anne ?
//pour l'instant, j'ai enlevé la pagination
//\SILEX:todo

try (MongoCursor<Document> phenotypesCursor = phenotypesMongo.iterator()) {
while (phenotypesCursor.hasNext()) {
Document phenotypeDocument = phenotypesCursor.next();

Data data = new Data();
data.setAgronomicalObject(phenotypeDocument.getString("agronomicalObject"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use constant in the header of class or a specific class.

try (MongoCursor<Document> phenotypesCursor = phenotypesMongo.iterator()) {
while (phenotypesCursor.hasNext()) {
Document phenotypeDocument = phenotypesCursor.next();

Data data = new Data();
data.setAgronomicalObject(phenotypeDocument.getString("agronomicalObject"));
data.setDate(new SimpleDateFormat("yyyy-MM-dd").format(phenotypeDocument.getDate("date"))); // TODO: changer le format de la date pour le retour
data.setDate(new SimpleDateFormat("yyyy-MM-dd").format(phenotypeDocument.getDate("date")));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make a specific class for format of date management. Maybe propose sevral type : date, datetimestamp, datetime

Map<String, Object> phenotypeOk = phenotypeDTO.isOk();
/**
* check if a dataset is valid (follows rules).
* @param datasetDTO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add @see to reference "rules"

/**
* check and insert in the mongodb database a list of datasets
* @param datasetsDTO datasets to insert
* @return the insertion result
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add provenance return and why it's needed (to complete a dataset)

public class ShootingConfigurationDTO extends AbstractVerifiedClass {

private String date;
private String position;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what form of position is expected, date of what ?

// Creation date: December, 11 2017
// Contact: [email protected], [email protected], [email protected]
// Last modification date: January, 03 2018
// Subject: A class which allows to start a thread for image sending
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain why you need it


final static Logger LOGGER = LoggerFactory.getLogger(ImageWaitingCheck.class);
final static String PROPS_FILE_NAME = "service";
final static int DEFAUT_WAITING_FILE_TIME = 30;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is it ?

import phis2ws.service.view.model.phis.ImageMetadata;

/**
* Allows the formating of the result of the reqyest about Image Metadata
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"reqyest"
Maybe change brapi package ? package phis2ws.service.view.brapi.form
?issue ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened an issue (#25)

*/
public class ImageMetadata {

private String uri;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment

@annetireau annetireau merged commit 522529e into OpenSILEX:master Feb 6, 2018
annetireau added a commit that referenced this pull request Jan 11, 2019
Jena #4 - Use Jena for Sensor Profiles INSERT and DELETE
annetireau added a commit that referenced this pull request Jan 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants