Merge branch 'master' of gitlab.eudat.eu:dmp/OpenAIRE-EUDAT-DMP-service-pilot

This commit is contained in:
annampak 2017-10-18 19:35:37 +03:00
commit 1d4878ae4d
1 changed files with 53 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import {DataModel} from '../entities/DataModel';
import {Project} from '../entities/model/project';
import {LoginComponent} from '../../app/login/login-page';
import { TokenService, TokenProvider } from './token.service';
import {RestBase} from './rest-base';
import 'rxjs/Rx';
import './../../assets/xml2json.min.js';
@ -16,6 +17,7 @@ declare var X2JS: any;
@Injectable()
export class ServerService {
xml2jsonOBJ: any;
//fetchURL: string = 'http://dl010.madgik.di.uoa.gr:8080/dmp-backend/rest/DMP/a868dbbb-ee37-4ce6-81c8-27048e0599a9';
//fetchURL: string = 'http://dl010.madgik.di.uoa.gr:8080/dmp-backend/rest/DMP/a71a6a92-5c23-40d7-ab87-e30bc860f5a4';//include rules!
@ -32,10 +34,60 @@ export class ServerService {
//data: any;
constructor(private httpClient: HttpClient, private tokenService: TokenService) { //private http: Http
constructor(private httpClient: HttpClient, private tokenService: TokenService, private restBase: RestBase) { //private http: Http
this.xml2jsonOBJ = new X2JS();
}
listDatasetIDs(){
return this.restBase.get("dataset");
}
getAllDatasets(){
return this.restBase.get("getAllDatasets");
}
getAllDatasetIDs(datasetId: string){
return this.restBase.get("dataset/"+datasetId);
}
getAllDmps(){
return this.restBase.get("dmp/getAll");
}
listDmpsLabelID(){
return this.restBase.get("dmp/listDMPLabelID");
}
getDmp(dmpid : string){
return this.restBase.get("dmps/"+dmpid);
}
listDmpIDs(){
return this.restBase.get("dmps");
}
listProjectIDs(){
return this.restBase.get("projects");
}
getAllProjects(){
return this.restBase.get("project/getAll");
}
getProject(projectID : string){
return this.restBase.get("projects/"+projectID);
}
listProjectsLabelID(){
return this.restBase.get("project/listAllLabelIDs");
}
getData() {