PublicationsManager

PublicationsManager

Gathers all the methods in the module

Constructor

new PublicationsManager(authorData, publicationsData)

Source:

Class constructor. Receives only two parameters, the raw publications and author data.

Parameters:
Name Type Description
authorData Object

The raw data of the author received from publications, in this format

publicationsData Object

The raw data received from publications, in this format

Methods

(private) __getPublicationDate(publication) → {Date}

Source:

Returns a publication date in a Javascript Date object, or null if the publication has no date.

Parameters:
Name Type Description
publication Object

Publication object

Returns:

Publication date

Type
Date

__isPublication(publication) → {void}

Source:

Checks if the parameter passed is a publication. If not, throws assertion error

Parameters:
Name Type Description
publication Object

Publication object

Throws:

Throws an error if the parameter passed is not a publication object

Type
AssertionError
Returns:

Nothing

Type
void

filterPublications(publicationsType) → {PublicationsManager}

Source:

Filters the publications to retain only the type passed as parameter.

Parameters:
Name Type Description
publicationsType String

A string indicating the type of publications to retain. The accepted values are 'article', 'conference' or 'all'

Throws:

Throws an error publicationsTypeis null or undefined or if it's not a valid string

Type
AssertionError
Returns:

Returns an object of the same type as this for chaining operations. The class publications attribute is the one that is modified.

Type
PublicationsManager

getCitesPerYear(from, to) → {Array}

Source:

Returns an array with every publication citation number, grouped by year. The output array has the following format:

[...{
 "year": 2014,
 "cites": [...Number]
}]

The cites property contains an array representing the number of cites of each publication

Parameters:
Name Type Description
from Number

The year from which start to look for citations

to Number

The year to end looking for citations

Throws:

Throws an error if the range is not valid (i.e. the starting year is greater than the ending year)

Type
AssertionError
Returns:

Array with the citations found, grouped by year

Type
Array

getLastPublicationYear() → (nullable) {Number}

Source:

Returns the last year in which an researcher published

Returns:

The last year in which the researcher published or null if there are no years

Type
Number

getPublication(scopusId) → {Object}

Source:

Returns a publication object given a scopus id.

Parameters:
Name Type Description
scopusId String

Scopus id

Throws:

Throws an error there is no given scopus id, it isn't a string or there is no publication with that id.

Type
AssertionError
Returns:

publication Publication object

Type
Object

getPublicationCites(scopusId) → {Number}

Source:

Returns an integer representing the number of cites of the publication with the given scopusId

Parameters:
Name Type Description
scopusId String

The scopus id of desired publication

Returns:

Number of cites

Type
Number

getPublicationCiteScore(scopusId) → {Number}

Source:

Returns a number with the publication cite score in the year it was published, or the last year with data

Parameters:
Name Type Description
scopusId String

The scopus id of desired publication

Returns:

Publication's cite score

Type
Number

getPublicationConfName(scopusId) → {String}

Source:

Returns the conference name where the paper was published. This method is intended to be used with conference papers. For articles, it makes not much sense.

Parameters:
Name Type Description
scopusId String

The scopus id of the publication

Returns:

The conference name of the publication, or null if it's not present

Type
String

getPublicationConfNameFromPublication(publication) → {String}

Source:

Returns the conference name where the paper was published. This method is intended to be used with conference papers. For articles, it makes not much sense.

Parameters:
Name Type Description
publication Object

The publication object

Returns:

The conference name of the publication, or null if it's not present

Type
String

getPublicationDate(scopusId) → {Date}

Source:

Returns a Date object with publication date of given scopus id

Parameters:
Name Type Description
scopusId String

The scopus id of desired publication

Returns:

Publication date of the publication object

Type
Date

getPublicationDateFromPublication(publication) → {Date}

Source:

Returns a Date object with publication date of given publication

Parameters:
Name Type Description
publication Object

The publication object

Returns:

Publication date of the publication object

Type
Date

getPublicationDOI(scopusId) → {String}

Source:

Returns a string with publication DOI of given scopus id

Parameters:
Name Type Description
scopusId String

The scopus id of desired publication

Returns:

Publication DOI of the publication object

Type
String

getPublicationISSN(scopusId) → {String}

Source:

Returns the ISSN of the journal where the article was published. This method is intended to be used with articles. For conference papers, it makes not much sense, since conferences ar retrieved for acronym, not ISSN

Parameters:
Name Type Description
scopusId String

The scopus id of the publication

Returns:

The ISSN of the journal or book, or null if it's not present

Type
String

getPublicationISSNFromPublication(publication) → {String}

Source:

Returns the ISSN of the journal where the article was published. This method is intended to be used with articles. For conference papers, it makes not much sense, since conferences ar retrieved for acronym, not ISSN

Parameters:
Name Type Description
publication Object

The publication object

Returns:

The ISSN of the journal or book, or null if it's not present

Type
String

getPublicationIssueOrPages(scopusId) → (nullable) {String}

Source:

Returns the publication issue or, if it doesn't have issue, the pages.

Parameters:
Name Type Description
scopusId String

The scopus id of desired publication

Returns:

Publication's issue, pages or null if the publication has no issue

Type
String

getPublicationJournalName(publication) → {String}

Source:

Returns the journal name where the paper was published. This method is intended to be used with journal papers. For conferences, it makes not much sense.

Parameters:
Name Type Description
publication Object

The publication object

Returns:

The journal name of the publication

Type
String

getPublicationJournalName(scopusId) → {String}

Source:

Returns the journal name where the paper was published. This method is intended to be used with journal papers. For conferences, it makes not much sense.

Parameters:
Name Type Description
scopusId String

The scopus id of the publication

Returns:

The journal name of the publication

Type
String

getPublicationPercentile(scopusId) → {String}

Source:

Returns an integer with maximun publication percentile of given scopus id

Parameters:
Name Type Description
scopusId String

The scopus id of desired publication

Returns:

Publication percentile of the publication object

Type
String

getPublicationPrintDate(scopusId) → (nullable) {Date}

Source:

Returns the date in which a publication was printed

Parameters:
Name Type Description
scopusId String

The scopus id of desired publication

Returns:

Publication's print date of null if the publication hasn't been printed yet

Type
Date

getPublicationPrintDate(scopusId) → (nullable) {Date}

Source:

Returns the date in which a publication (by scopusId) was printed

Parameters:
Name Type Description
scopusId String

The scopus id of desired publication

Returns:

Publication's print date of null if the publication hasn't been printed yet

Type
Date

getPublicationsAuthors(scopusId) → {Array}

Source:

Returns an array with some information about authors of a publication of given scopus id:

 [
        {                        
            "@seq": "1",
            "@auid": "6507957743",
         "name": "Doe, Jane"
        },
        {
            "@seq": "2",
            "@auid": "22333454800",
         "name": "Doe J."
        },
        {
            "@seq": "3",
            "@auid": "24802465400",
         "name": "Doe Jane"
        },
        {
            "@seq": "4",
            "@auid": "15120180100",
         "name": "Doe, Jane"
     }
    ]

"@seq" is the number that each author hold. "@auid" is the authorId of each author.

Parameters:
Name Type Description
scopusId String

The scopus id of desired publication

Returns:

Array with authors information

Type
Array

getPublicationScopusId(rawPublication) → {String}

Source:

Returns the SCOPUS ID of a publication

Parameters:
Name Type Description
rawPublication Object

The raw publication from which you want to extract the SCOPUS_ID

Returns:

The publication SCOPUS ID

Type
String

getPublicationsInRange(from, to) → {Array}

Source:

Returns an array with the publications found in the input range, ungrouped. The output array has the following format:

[...{publicationsRawDataFragment}]

Each publicationsRawDataFragment contains all the data from each publication

Parameters:
Name Type Description
from Number

The year from which start to look for publications

to Number

The year to end looking for publications

Throws:

Throws an error if the range is not valid (i.e. the starting year is greater than the ending year)

Type
AssertionError
Returns:

Array with the publications found, ungrouped

Type
Array

getPublicationsPerYear(from, to) → {Array}

Source:

Returns an array with the publications found in the input range, grouped by year. The output array has the following format:

[
 {"year": 2014, "publications": [...{publicationsRawDataFragment}]},
 {"year": 2015, "publications": [...{publicationsRawDataFragment}]},
 {"year": 2016, "publications": [...{publicationsRawDataFragment}]},
]

Each publicationsRawDataFragment contains all the data from each publication

Parameters:
Name Type Description
from Number

The year from which start to look for publications

to Number

The year to end looking for publications

Throws:

Throws an error if the range is not valid (i.e. the starting year is greater than the ending year)

Type
AssertionError
Returns:

Array with the publications found, grouped by year

Type
Array

getPublicationSubjectAreas(scopusId) → {Array}

Source:

Returns an array with subject areas information in a publication of given scopus id:

[
  {
      "@abbrev": "COMP",
      "@code": "1712",
      "$": "Software",
      "@_fa": "true"
  },
  {
      "@abbrev": "COMP",
      "@code": "1710",
      "$": "Information Systems",
      "@_fa": "true"
  },
  {
      "@abbrev": "COMP",
      "@code": "1708",
      "$": "Hardware and Architecture",
      "@_fa": "true"
  }
]
Parameters:
Name Type Description
scopusId String

The scopus id of desired publication

Returns:

Array with the information about subject areas of the publication

Type
Array

getPublicationTitle(scopusId) → {String}

Source:

Returns a string with publication title of given scopus id

Parameters:
Name Type Description
scopusId String

The scopus id of desired publication

Returns:

Publication title of the publication object

Type
String

getPublicationType(scopusId) → {Object}

Source:

Returns an object with the three fields about the publication category of given scopus id:

 {
     "aggregationType": "Journal",
     "subtype": "ar",
     "subtypeDescription": "Article"
 }
Parameters:
Name Type Description
scopusId String

The scopus id of the publication

Returns:

Three fields of publication category

Type
Object

getPublicationUniqueType(scopusId) → {String}

Source:

Returns a unique publication category given its scopus id

Parameters:
Name Type Description
scopusId String

The scopus id of the publication

Returns:

The publication category. It can be 'article', 'conference' or 'other'

Type
String

getPublicationUniqueTypeFromPublication(publication) → {String}

Source:

Returns a unique publication category given a publication object

Parameters:
Name Type Description
publication Object

The publication object

Returns:

The publication category. It can be 'article', 'conference' or 'other'

Type
String

getPublicationVolume(scopusId) → (nullable) {String}

Source:

Returns the volume in which the publication has been published

Parameters:
Name Type Description
scopusId String

The scopus id of desired publication

Returns:

Publication's volume or null if the publication hasn't been published yet

Type
String

getScopusIds() → {Array}

Source:

Returns the array of publications scopus ids

Returns:

Array of the publications scopus ids

Type
Array

removeDuplicates() → {PublicationsManager}

Source:

Remove all duplicated publications in the array of publications.

Returns:

Returns an object of the same type as this for chaining operations. The class publications attribute is the one that is modified.

Type
PublicationsManager