-
Notifications
You must be signed in to change notification settings - Fork 26
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
Conversation
2. POST - Return uris of the Provenances 3. Possibility to add a Dataset to an already existing Provenance
@@ -57,8 +59,9 @@ | |||
public ArrayList<String> agronomicalObjects = new ArrayList<>(); | |||
public String startDate; | |||
public String endDate; | |||
public String provenance; |
There was a problem hiding this comment.
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")); |
There was a problem hiding this comment.
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"))); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment
Jena #4 - Use Jena for Sensor Profiles INSERT and DELETE
POST images metadata
POST image (file)
GET images (search by : uri, rdf type, date, concerned elements)