Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-5350

FIWARE.Question.Tech.WebUI.POIDataProvider..Fiware POI add_poi web service fw_media structure

    Details

      Description

      Created question in FIWARE Q/A platform on 19-11-2015 at 14:11
      Please, ANSWER this question AT http://stackoverflow.com/questions/33804924/fiware-poi-add-poi-web-service-fw-media-structure

      Question:
      Fiware POI add_poi web service fw_media structure

      Description:
      I created json for adding new poi with fw_media data included, based on json from example_components/fw_media.json:

      {"fw_core":
      {"location":{"wgs84":{"latitude":1,"longitude":1}},
      "categories":["Field"],
      "name":{"":"poljana 1"}},
      "fw_media": {
      "entities": [
      {
      "type": "photo",
      "short_label":

      { "en": "Sunset at sea" }

      ,
      "caption":

      { "en": "Sunset on the Bothnian Bay, Northwest from Hailuoto summer 2013" }

      ,
      "description":

      { "": "Lorem ipsum dolor sit amet, consectetur adipisci elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat.", "fi": "Oli mukava retki." }

      ,
      "thumbnail": "http://www.example.org/sunset_on_sea_tbn.jpg",
      "url": "http://www.example.org/sunset_on_sea.jpg",
      "copyright": "Photo: Ari Okkonen"
      },
      {
      "type": "audio",
      "short_label":

      { "": "Säkkijärven polkka" }

      ,
      "url": "http://www.example.org/sakkijarven_polkka.mp3"
      }

      ],
      "last_update": {
      "timestamp": 1390203898
      }, "source":

      { "website": "http://www.cie.fi", "name": "CIE, University of Oulu", "id": "7c32c67d-cf00-4d11-9acc-2471141e03a3", "license": "http://www.gnu.org/licenses/gpl.html" } }}

      But im getting error:

      JSON does not validate. Violations:
      [fw_media] The property - source - is not defined and the definition
      does not allow additional properties
      POI data validation failed!

      Can you give me example of working fw_media json?

      And also is it possible to upload image with poi in fw_media?(Not just url to image but whole image)

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2015-11-19 15:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2015-11-19 15:05|CREATED monitor | # answers= 0, accepted answer= False
        Hide
        ariokkon Ari Okkonen added a comment - - edited

        I commented to Stackoverflow:
        ----------

        Thank you for your report.

        It seems that an old example somewhere has the fw_image.source field that is not implemented. Just edit the source structure out of the data, and it should be Ok. Of course there is no sense to have one source description common for all images, etc. for the one POI.

        A source field might be usable in per-item basis. So I'll introduce it to the next release.

        Please, could you tell me where that erroneous Sunset at sea is, so I can go correct it.

        I feel uploading pictures a kind of Specific Enabler stuff. So it left to the community to implement. I suggest using some media repository in combination of a standard POI-DP by a specialized client software.

        Show
        ariokkon Ari Okkonen added a comment - - edited I commented to Stackoverflow: ---------- Thank you for your report. It seems that an old example somewhere has the fw_image.source field that is not implemented. Just edit the source structure out of the data, and it should be Ok. Of course there is no sense to have one source description common for all images, etc. for the one POI. A source field might be usable in per-item basis. So I'll introduce it to the next release. Please, could you tell me where that erroneous Sunset at sea is, so I can go correct it. I feel uploading pictures a kind of Specific Enabler stuff. So it left to the community to implement. I suggest using some media repository in combination of a standard POI-DP by a specialized client software.
        Hide
        ariokkon Ari Okkonen added a comment -

        -

        Show
        ariokkon Ari Okkonen added a comment - -
        Hide
        ariokkon Ari Okkonen added a comment -
        Show
        ariokkon Ari Okkonen added a comment - Corrected now in GitHub https://github.com/Chiru/FIWARE-POIDataProvider .

          People

          • Assignee:
            ariokkon Ari Okkonen
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: