<commit_before>import { Component, OnInit } from '@angular/core';
import {MdDialogRef} from "@angular/material";
import {DataSetDetail} from "../../../model/DataSetDetail";

@Component({
  selector: 'app-citation-dialog',
  templateUrl: './citation-dialog.component.html',
  styleUrls: ['./citation-dialog.component.css']
})
export class CitationDialogComponent implements OnInit {

  constructor(public dialogRef: MdDialogRef<CitationDialogComponent>) { }

  public title: string;
  public messageAPA: string;
  public messageAMA: string;
  public datasetDetail:DataSetDetail;

  /**************************************************************************
  APA style:

  [dataset] <NAME>., <NAME>., <NAME>., <NAME>. (2015).

  Structural comparison of the oxidized ternary electron transfer complex of methylamine dehydrogenase, amicyanin and cytochrome c551i from Paracoccus denitrificans with the substrate-reduced, copper free complex at 1.9 A resolution, Protein Data Bank, V1. http://identifiers.org/pdb:2gc4.

*** Some notes here: In bold the Name of the Database or Provider. Also the version. For now all of our versions will be V1 until we start controlling the versioning.

  AMA style:
  [dataset] 27. <NAME>, <NAME>, <NAME>, Mathews FS. Structural comparison of the oxidized ternary electron transfer complex of methylamine dehydrogenase, amicyanin and cytochrome c551i from Paracoccus denitrificans with the substrate-reduced, copper free complex at 1.9 A resolution, Protein Data Bank, V1; 2006. http://identifiers.org/pdb:2gc4.
  ***********************************************************************/

  ngOnInit() {
    var p: string = "[dataset] ";
    var m: string = "[dataset] ";
    var i: number = 0;


    var submitters = "";
    for (var s of this.datasetDetail.submitter) {
      i++;
      if(i<10) {
        submitters += (submitters == "" ? "" : ",") + s;
      }else if ((i<this.datasetDetail.submitter.length) && (!submitters.endsWith("..."))) {
        submitters + ",..."
      }
    }

    p+=submitters;
    m+=submitters;

    var publicationDate = new Date(this.datasetDetail.publicationDate);

    p+= " (" + publicationDate.getFullYear() +"). ";
    m += ". ";

    p += this.datasetDetail.name + ", ";
    m += this.datasetDetail.name + ", ";

    p += this.datasetDetail.source + ", V1.";
    m += this.datasetDetail.source + ", V1; " + publicationDate.getFullYear() + ".";
<commit_msg>citation without submitters<commit_after>import { Component, OnInit } from '@angular/core';
import {MdDialogRef} from "@angular/material";
import {DataSetDetail} from "../../../model/DataSetDetail";

@Component({
  selector: 'app-citation-dialog',
  templateUrl: './citation-dialog.component.html',
  styleUrls: ['./citation-dialog.component.css']
})
export class CitationDialogComponent implements OnInit {

  constructor(public dialogRef: MdDialogRef<CitationDialogComponent>) { }

  public title: string;
  public messageAPA: string;
  public messageAMA: string;
  public datasetDetail:DataSetDetail;

  /**************************************************************************
  APA style:

  [dataset] <NAME>., <NAME>., <NAME>., <NAME>. (2015).

  Structural comparison of the oxidized ternary electron transfer complex of methylamine dehydrogenase, amicyanin and cytochrome c551i from Paracoccus denitrificans with the substrate-reduced, copper free complex at 1.9 A resolution, Protein Data Bank, V1. http://identifiers.org/pdb:2gc4.

*** Some notes here: In bold the Name of the Database or Provider. Also the version. For now all of our versions will be V1 until we start controlling the versioning.

  AMA style:
  [dataset] 27. <NAME>, <NAME>, <NAME>, <NAME>. Structural comparison of the oxidized ternary electron transfer complex of methylamine dehydrogenase, amicyanin and cytochrome c551i from Paracoccus denitrificans with the substrate-reduced, copper free complex at 1.9 A resolution, Protein Data Bank, V1; 2006. http://identifiers.org/pdb:2gc4.
  ***********************************************************************/

  ngOnInit() {
    var p: string = "[dataset] ";
    var m: string = "[dataset] ";
    var i: number = 0;


    var submitters = "";
    if(this.datasetDetail.submitter) {
      for (var s of this.datasetDetail.submitter) {
        i++;
        if (i < 10) {
          submitters += (submitters == "" ? "" : ",") + s;
        } else if ((i < this.datasetDetail.submitter.length) && (!submitters.endsWith("..."))) {
          submitters + ",..."
        }
      }
    }

    p+=submitters;
    m+=submitters;

    var publicationDate = new Date(this.datasetDetail.publicationDate);

    p+= " (" + publicationDate.getFullYear() +"). ";
    m += ". ";

    p += this.datasetDetail.name + ", ";
    m += this.datasetDetail.name + ", ";

    p += this.datasetDetail.source + ", V1.";
    m += this.datasetDetail.source + ", V1; " + publicationDate.getFullYear() + ".";

{'fraction_non_alphanumeric': 0.18829722615914152, 'fraction_numerical': 0.012958088681919416, 'mean_word_length': 3.8289345063538613, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5831813', 'n_tokens_mistral': 1499, 'n_tokens_neox': 1358, 'n_words': 415}