Giter VIP home page Giter VIP logo

arix-search-adapter's Introduction

Website

This website is a documentation aggregator for all Schulcloud-Verbund software.

It is deployed at https://documentation.dbildungscloud.dev/

This website is built using Docusaurus 2, a modern static website generator.

Installation

$ npm ci

Local Development

$ npm run start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Note that the search will only work with the build command.

Build

$ npm run build

This command generates static content into the build directory and can be served using any static contents hosting service.

Update the docs

Create a new branch. Change the /docs files.

Deployment

Create a pull request and once your changes are merged into main the website will automatically deploy the new version.

Important

Do not remove the branch gh-pages. This branch is auto generated and contains the hosted website.

arix-search-adapter's People

Contributors

niccokunzmann avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arix-search-adapter's Issues

Test the docker container

The service is already tested. The docker container builds the software as a service but this is not tested.
Please run the tests in Travis automatically against the docker container.

Create Resource URL

The resources requested from the search adapter have no valid url. The URL of the adapter should be passed through.

These are different approaches:

  1. Ask the ARIX backend about the URL. Pass the url though to the client.
  2. Create a link to the search adapter which redirects to the link.

Review Search Adapter

The search adapter can

  • return results for a search
  • use the secret to resolve the links

Here you can see example output:

{
  "jsonapi": {
    "version": "1.0",
    "meta": {
      "name": "arix-search-adapter",
      "source": "http://localhost:8080/code",
      "description": "This is a search adapter for Antares connected to http://arix.datenbank-bildungsmedien.net/."
    }
  },
  "links": {
    "self": {
      "href": "http://localhost:8080/v1/search?Q=Biene",
      "meta": {
        "count": 10,
        "offset": 0,
        "limit": 10
      }
    },
    "first": null,
    "last": null,
    "prev": null,
    "next": null
  },
  "data": [
    {
      "type": "resource",
      "id": "ARIX-SHPOOL-36661",
      "attributes": {
        "id": "SHPOOL-36661",
        "title": "Ausgefeilte Konservierung - Multi-Antibiotika-Brutprophylaxe des räuberischen Bienenwolfes",
        "description": "",
        "url": "http://localhost:8080/v1/url/SHPOOL-36661",
        "licenses": null,
        "mimeType": "",
        "contentCategory": "",
        "languages": null,
        "thumbnail": ""
      }
    },
    {
      "type": "resource",
      "id": "ARIX-SHPOOL-39738",
      "attributes": {
        "id": "SHPOOL-39738",
        "title": "Bienen allein reichen nicht - Forscherteam untersucht weltweit die Bestäubungsleistung wilder Insekten",
        "description": "",
        "url": "http://localhost:8080/v1/url/SHPOOL-39738",
        "licenses": null,
        "mimeType": "",
        "contentCategory": "",
        "languages": null,
        "thumbnail": ""
      }
    },
    {
      "type": "resource",
      "id": "ARIX-SHPOOL-24172",
      "attributes": {
        "id": "SHPOOL-24172",
        "title": "Bienen als Schädlingsbekämpfer",
        "description": "",
        "url": "http://localhost:8080/v1/url/SHPOOL-24172",
        "licenses": null,
        "mimeType": "",
        "contentCategory": "",
        "languages": null,
        "thumbnail": ""
      }
    },
    {
      "type": "resource",
      "id": "ARIX-SHPOOL-53507",
      "attributes": {
        "id": "SHPOOL-53507",
        "title": "Bienen lernen im Schlaf",
        "description": "",
        "url": "http://localhost:8080/v1/url/SHPOOL-53507",
        "licenses": null,
        "mimeType": "",
        "contentCategory": "",
        "languages": null,
        "thumbnail": ""
      }
    },
    {
      "type": "resource",
      "id": "ARIX-SHPOOL-45818",
      "attributes": {
        "id": "SHPOOL-45818",
        "title": "Bienen mit Landkarte im Kopf",
        "description": "",
        "url": "http://localhost:8080/v1/url/SHPOOL-45818",
        "licenses": null,
        "mimeType": "",
        "contentCategory": "",
        "languages": null,
        "thumbnail": ""
      }
    },
    {
      "type": "resource",
      "id": "ARIX-SHPOOL-44026",
      "attributes": {
        "id": "SHPOOL-44026",
        "title": "Bienen und Schadstoffe - Gemeinschaft puffert Wirkung von Schadstoffen",
        "description": "",
        "url": "http://localhost:8080/v1/url/SHPOOL-44026",
        "licenses": null,
        "mimeType": "",
        "contentCategory": "",
        "languages": null,
        "thumbnail": ""
      }
    },
    {
      "type": "resource",
      "id": "ARIX-SF-57614",
      "attributes": {
        "id": "SF-57614",
        "title": "Bienen, gefährdete Gedächtniskünstler",
        "description": "",
        "url": "http://localhost:8080/v1/url/SF-57614",
        "licenses": null,
        "mimeType": "",
        "contentCategory": "",
        "languages": null,
        "thumbnail": ""
      }
    },
    {
      "type": "resource",
      "id": "ARIX-SHPOOL-53614",
      "attributes": {
        "id": "SHPOOL-53614",
        "title": "Bienen-Evolution - Mit Nasenhaaren auf Ahnenforschung",
        "description": "",
        "url": "http://localhost:8080/v1/url/SHPOOL-53614",
        "licenses": null,
        "mimeType": "",
        "contentCategory": "",
        "languages": null,
        "thumbnail": ""
      }
    },
    {
      "type": "resource",
      "id": "ARIX-SHPOOL-44032",
      "attributes": {
        "id": "SHPOOL-44032",
        "title": "Bienenplage - Bücherskorpion gegen Varroamilbe",
        "description": "",
        "url": "http://localhost:8080/v1/url/SHPOOL-44032",
        "licenses": null,
        "mimeType": "",
        "contentCategory": "",
        "languages": null,
        "thumbnail": ""
      }
    },
    {
      "type": "resource",
      "id": "ARIX-SHPOOL-61202",
      "attributes": {
        "id": "SHPOOL-61202",
        "title": "Bienensterben - \"Neonicotinoide alleine nicht unbedingt das Problem\"",
        "description": "",
        "url": "http://localhost:8080/v1/url/SHPOOL-61202",
        "licenses": null,
        "mimeType": "",
        "contentCategory": "",
        "languages": null,
        "thumbnail": ""
      }
    }
  ]
}

The urls redirect to the resolved resource. This resource is only available for a certain time.

$ curl -i http://localhost:8080/v1/url/SHPOOL-36661
HTTP/1.1 302 Found
Location: http://xplay.datenbank-bildungsmedien.net/a03d72ee8232fbce3fae7099f885f444/SHPOOL-36661-cnv_mp4_a/DLF-Ausgefeilte_Konservierung.mp3
Date: Wed, 26 Jul 2017 11:14:56 GMT
Content-Length: 154
Content-Type: text/html; charset=utf-8

<a href="http://xplay.datenbank-bildungsmedien.net/a03d72ee8232fbce3fae7099f885f444/SHPOOL-36661-cnv_mp4_a/DLF-Ausgefeilte_Konservierung.mp3">Found</a>.

Please have a look what else you need from this search adapter.

@ArneOb @kremer-io

Implementation Plan

To develop the search adapter, we have to go several steps

  • Serialize Resources to json
  • Convert Arix resources to resources
  • create an http server
  • implement the query interface
  • ask antares
  • parse the result from antares
  • return a search result
  • run api tests against mock data

Mock api for tests

The tests return only an empty list of objects because antares does not allow the travis ips to query the interface.
Solution: start a mock server to request the objects from and provide the results as a file.
This can be combined with #8.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.