SWE574-Nerds / friendly-eureka

2 stars 1 forks source link

(add)image selection annotation in backend in W3C format #75

Closed ecada closed 6 years ago

ecada commented 6 years ago

I would really appreciate if you review my adjustments to image selections at backend

onatbas commented 6 years ago

Pleasedont add non code xhanges to the repositoryad there are tons of ignored files force added to project. Consider this as a recommendaton for your future work.

There is many dead code added and it’s untested as it will break abnotations with to selector provided or text based selectors.

Furthermore there has been no api changes to support the required parameters, overall the code will never recieve required parameters. Please follow the practices applied in api package.

And there’s no addition on frontend code for this, just adding extra code to backend will not add support new features.

ecada commented 6 years ago

On file "backend/eureka/anno/services/AnnotationService.py" I've updated the createImageAnnotationJSONLD function according to the appropriate format stated below: { "@context": "http://www.w3.org/ns/anno.jsonld", "id": "http://example.org/anno4", "type": "Annotation", "body": "http://example.org/description1", "target": { "id": "http://example.com/image1#xywh=100,100,300,300", "type": "Image", "format": "image/jpeg" } } Id field will be sent from the frontend by forming the appropriate imagelink. I have implemented image selection on mobile but there is no backend to support it that's why I'm making this commit.

In addition to that I've changed AnnotationForm class for the same purpose.

ecada commented 6 years ago

There is no need for an api change since some parts were already implemented also I've changed AnnotationForm.py which is sufficient to support this new feature.