Code Monkey home page Code Monkey logo

eresearch-dblp-consumer's Introduction

Eresearch Dblp Consumer Service

Description

The purpose of this service is to consume the info which DBLP service provides. See dblp.dtd at http://dblp.org/xml/

We generate POJO classes from dblp.dtd using JAXB binding compiler (xjc -dtd -d generatedsrc -p com.examples dblp.dtd).

We get the info for the 'requested author' in the three following steps:

First we hit the url: "http://dblp.uni-trier.de/search/author?xauthor=" + authorName (eg: http://dblp.uni-trier.de/search/author?xauthor=%20Christos%20Skourlas).

Secondly for each entry of the first url we hit: "http://dblp.uni-trier.de/rec/pers/" + urlpt + "/xk" (eg: http://dblp.uni-trier.de/rec/pers/s/Skourlas:Christos/xk).

Thirdly (and finally) for each entry of the second url we hit: "http://dblp.uni-trier.de/rec/bibtex/" + dblpKeyValue + ".xml" (eg: http://dblp.uni-trier.de/rec/bibtex/conf/petra/SkourlasBSTVM09.xml) which returns a detailed dblp entry (which is what we are looking for) then we return all these dblp entries to the http response (or to a jms queue).

External Dependencies needed in order to run service

  • ActiveMQ
    • Execute: docker-compose up
    • Execute: docker-compose down

Integration Tests (run docker-compose first)

  • Execute: mvn clean verify

Create Docker Image

  • Execute: mvn clean install -DskipITs=true

  • Execute: docker build -t chriniko/eresearch-dblp-consumer:1.0 . in order to build docker image.

  • Fast: mvn clean install -DskipITs=true && docker build -t chriniko/eresearch-dblp-consumer:1.0 .

How to run service (not dockerized)

  • Execute: docker-compose up

  • Two options:

    • Execute:

      • mvn clean install -DskipITs=true
      • java -jar -Dspring.profiles.active=dev target/eresearch-dblp-consumer-1.0-boot.jar
    • Execute:

      • mvn spring-boot:run -Dspring.profiles.active=dev
  • (Optional) When you finish: docker-compose down

How to run service (dockerized)

  • Uncomment the section in docker-compose.yml file for service: eresearch-dblp-consumer:

  • Execute: mvn clean install -DskipITs=true

  • Execute: docker-compose build

  • Execute: docker-compose up

  • (Optional) When you finish: docker-compose down

Example Request

{
	"firstname":"Christos",
	"initials":"",
	"surname":"Skou"
}

Example Response

{
  "operation-result": true,
  "process-finished-date": "2019-04-11T07:42:17.026Z",
  "requested-dblp-consumer-dto": {
    "firstname": "Christos",
    "initials": "",
    "surname": "Skourlas"
  },
  "fetched-results-size": 1,
  "fetched-results": {
    "authorName=Christos Skourlas#urlpt=s/Skourlas:Christos": [
      {
        "mdate": null,
        "articles": null,
        "inproceedings": null,
        "proceedings": null,
        "books": null,
        "incollections": null,
        "phdthesis": null,
        "mastersthesis": null,
        "www": [
          {
            "key": "homepages/65/4173",
            "mdate": "2009-06-10",
            "publtype": null,
            "cdate": null,
            "authors": [
              {
                "aux": null,
                "bibtex": null,
                "orcid": null,
                "value": "Christos Skourlas"
              }
            ],
            "editors": null,
            "titles": [
              {
                "bibtex": null,
                "value": "Home Page"
              }
            ],
            "booktitles": null,
            "pages": null,
            "years": null,
            "addresses": null,
            "journals": null,
            "volumes": null,
            "numbers": null,
            "months": null,
            "urls": null,
            "ees": null,
            "cdroms": null,
            "cites": null,
            "publishers": null,
            "notes": null,
            "crossrefs": null,
            "isbns": null,
            "series": null,
            "schools": null,
            "chapters": null,
            "publnrs": null
          }
        ],
        "persons": null,
        "data": null
      },
      {
        "mdate": null,
        "articles": null,
        "inproceedings": [
          {
            "key": "conf/pci/Anagnostopoulos18",
            "mdate": "2019-01-09",
            "publtype": null,
            "cdate": null,
            "authors": [
              {
                "aux": null,
                "bibtex": null,
                "orcid": null,
                "value": "Theodoros Anagnostopoulos"
              },
              {
                "aux": null,
                "bibtex": null,
                "orcid": null,
                "value": "Klimis S. Ntalianis"
              },
              {
                "aux": null,
                "bibtex": null,
                "orcid": null,
                "value": "Christos Skourlas"
              },
              {
                "aux": null,
                "bibtex": null,
                "orcid": null,
                "value": "S. R. Jino Ramson"
              }
            ],
            "editors": null,
            "titles": [
              {
                "bibtex": null,
                "value": "IoT-enabled fall verification of elderly and impaired people in smart cities."
              }
            ],
            "booktitles": [
              {
                "value": "PCI"
              }
            ],
            "pages": [
              {
                "type": null,
                "value": "88-92"
              }
            ],
            "years": [
              {
                "value": "2018"
              }
            ],
            "addresses": null,
            "journals": null,
            "volumes": null,
            "numbers": null,
            "months": null,
            "urls": [
              {
                "aux": null,
                "value": "db/conf/pci/pci2018.html#Anagnostopoulos18"
              }
            ],
            "ees": [
              {
                "aux": null,
                "value": "https://doi.org/10.1145/3291533.3291553"
              }
            ],
            "cdroms": null,
            "cites": null,
            "publishers": null,
            "notes": null,
            "crossrefs": [
              {
                "value": "conf/pci/2018"
              }
            ],
            "isbns": null,
            "series": null,
            "schools": null,
            "chapters": null,
            "publnrs": null
          }
        ],
        "proceedings": null,
        "books": null,
        "incollections": null,
        "phdthesis": null,
        "mastersthesis": null,
        "www": null,
        "persons": null,
        "data": null
      },
      
      
      ......
      

eresearch-dblp-consumer's People

Watchers

 avatar  avatar

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.