Project

General

Profile

« Previous | Next » 

Revision 55964

[Library|Trunk]

Merge into trunk branch angular7 rev 55729

View differences:

deletedByInference.service.ts
1 1
import {Injectable} from '@angular/core';
2
import {Http, Response} from '@angular/http';
3
import {Observable}     from 'rxjs/Observable';
2
import {HttpClient} from "@angular/common/http";
4 3
import {DeletedByInferenceResult} from '../../../utils/entities/deletedByInferenceResult';
5
import 'rxjs/add/observable/of';
6
import 'rxjs/add/operator/do';
7
import 'rxjs/add/operator/share';
8
import 'rxjs/add/operator/map';
9
import{EnvProperties} from '../../../utils/properties/env-properties';
4
import {EnvProperties} from '../../../utils/properties/env-properties';
5
import {ParsingFunctions} from '../parsingFunctions.class';
6
import {map} from "rxjs/operators";
10 7

  
11

  
12
import { ParsingFunctions } from '../parsingFunctions.class';
13

  
14 8
@Injectable()
15 9
export class DeletedByInferenceService {
16 10
  private sizeOfDescription: number = 270;
17 11

  
18
  constructor(private http: Http ) {
12
  constructor(private http: HttpClient ) {
19 13
    this.parsingFunctions = new ParsingFunctions();
20 14
  }
21 15

  
......
26 20
    let key = url;
27 21

  
28 22
    return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
29
                .map(res => <any> res.json())
30
                .map(res => res['result']['metadata']['oaf:entity'])
31
                .map(res => this.parseDeletedByInferencePublications(res, properties));
23
                //.map(res => <any> res.json())
24
                .pipe(map(res => res['result']['metadata']['oaf:entity']))
25
                .pipe(map(res => this.parseDeletedByInferencePublications(res, properties)));
32 26
  }
33 27

  
34 28
  parseDeletedByInferencePublications (result: any, properties: EnvProperties): DeletedByInferenceResult {

Also available in: Unified diff