<commit_before>/**
 * Created by <NAME> (rfbaumgartner) on 06.10.17.
 */
import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core';
import { Http } from '@angular/http';
import { globalSearchVariableService } from '../../suche/globalSearchVariablesService';

@Component({
  moduleId: module.id,
  selector: 'rae-fassung-diplomatisch-seiten',
  template: ''
})
export class FassungDiplomatischSeitenComponent implements OnChanges {

  @Input() pageIRI: string;

  @Output() propertiesReset = new EventEmitter();

  properties = { 'pageIRI': '', 'pagenumber': '', 'picData': '' };

  private sub: any;

  constructor(private http: Http) {
  }

  ngOnChanges() {
    if (this.pageIRI) {
      this.sub = this.http.get(globalSearchVariableService.API_URL + '/resources/' + encodeURIComponent(this.pageIRI))
        .map(results => results.json())
        .subscribe(res => {
          this.properties[ 'pagenumber' ] = res.props[ 'http://www.knora.org/ontology/work#hasPageNumber' ].values[ 0 ].utf8str;
          this.properties[ 'picData' ] = res.resinfo.locdata;
          this.properties[ 'pageIRI' ] = this.pageIRI;
          this.propertiesReset.emit(this.properties);
          console.log(res.props);
        });
    }
  }
}<commit_msg>remove console log<commit_after>/**
 * Created by <NAME> (rfbaumgartner) on 06.10.17.
 */
import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core';
import { Http } from '@angular/http';
import { globalSearchVariableService } from '../../suche/globalSearchVariablesService';

@Component({
  moduleId: module.id,
  selector: 'rae-fassung-diplomatisch-seiten',
  template: ''
})
export class FassungDiplomatischSeitenComponent implements OnChanges {

  @Input() pageIRI: string;

  @Output() propertiesReset = new EventEmitter();

  properties = { 'pageIRI': '', 'pagenumber': '', 'picData': '' };

  private sub: any;

  constructor(private http: Http) {
  }

  ngOnChanges() {
    if (this.pageIRI) {
      this.sub = this.http.get(globalSearchVariableService.API_URL + '/resources/' + encodeURIComponent(this.pageIRI))
        .map(results => results.json())
        .subscribe(res => {
          this.properties[ 'pagenumber' ] = res.props[ 'http://www.knora.org/ontology/work#hasPageNumber' ].values[ 0 ].utf8str;
          this.properties[ 'picData' ] = res.resinfo.locdata;
          this.properties[ 'pageIRI' ] = this.pageIRI;
          this.propertiesReset.emit(this.properties);
        });
    }
  }
}
{'fraction_non_alphanumeric': 0.15726290516206481, 'fraction_numerical': 0.006402561024409764, 'mean_word_length': 3.528985507246377, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7395622', 'n_tokens_mistral': 811, 'n_tokens_neox': 793, 'n_words': 153}