bounswe / bounswe2017group5

Interestr - Build your own interest-based community
MIT License
6 stars 3 forks source link

Creating an isolated backend for annotations #181

Closed smddzcy closed 6 years ago

smddzcy commented 6 years ago

About

We should create an isolated backend for annotations. The API should implement the Web Annotation Protocol, and ideally, we should create a separate DB for this API as suggested by Suzan Uskudarli many times.

To-do

smddzcy commented 6 years ago

@bounswe/bounswe2017group5 Any volunteers for the annotations team?

Morgazipa commented 6 years ago

I would like to help.

smddzcy commented 6 years ago

@Morgazipa Awesome 👍 Can you please do some research and create a basic roadmap? (e.g. what/how to do, how many people is required etc.)

oal55 commented 6 years ago

I'd like to help as well.

smddzcy commented 6 years ago

So, where are we on this one? We should make some progress as the deadline is approaching :)

murat0431 commented 6 years ago

I'd like to help with this as well. Where are we?

Morgazipa commented 6 years ago

Reading W3C annotation model document, I think the following are valid DB models:

Annotations on text:

{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://interestr.com/annotations/{id}",
  "type": "Annotation",
  "created": "2015-01-28T12:00:00Z",
  "creator": {
    "id": "http://interestr.com/profile/{id}",
    "type": "Person",
    "name": "{firstname} {lastname}",
    "nickname": "{username}",
    "email": "{email}"
    },

  "bodyValue": "Annotation text",
  "target": {
    "source": "http://interestr.com/posts/{id}",
    "type": "Text",
     "selector": {
      "type": "XPathSelector",
      "value": "/html/body/p[2]/table/tr[2]/td[3]/span",
      "refinedBy": {
          "type": "TextPositionSelector",
          "start": 412,
          "end": 795
    }  
    }
  }

}

Annotations on images

{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://interestr.com/annotations/{id}",
  "type": "Annotation",
  "created": "2015-01-28T12:00:00Z",
  "creator": {
    "id": "http://interestr.com/profile/{id}",
    "type": "Person",
    "name": "{firstname} {lastname}",
    "nickname": "{username}",
    "email": "{email}"
    },

  "bodyValue": "Annotation text",
  "target": {
    "source": "http://interestr.com/posts/{id}",
    "type": "Image"
     "selector": {
      "type": "XPathSelector",
      "value": "/html/body/p[2]/table/tr[2]/td[3]/span",
      "refinedBy": {
          "type": "FragmentSelector",
          "conformsTo": "http://www.w3.org/TR/media-frags/",
          xywh=50,50,640,480

    }  
    }
  }

}
ThoAppelsin commented 6 years ago

Not that I am 100% ready and only waiting for this, but it would help to have it sooner than later. Right now, I am developing in the whereabouts of my own imagination of what I would probably have as an API, for the Firefox add-on I mean (#182).

Morgazipa commented 6 years ago

This is done.