You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2020/08/23 21:32:29 UTC

[incubator-streampipes] branch dev updated (a292124 -> c495a1b)

This is an automated email from the ASF dual-hosted git repository.

riemer pushed a change to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git.


    from a292124  [hotfix] Add loading screen to notification view
     new beeb46f  [hotfix] Fix bug in FileResource
     new 81adbc4  [STREAMPIPES-207][WIP] Fix image widget in data explorer
     new c495a1b  [STREAMPIPES-206] Remove tson-ld serializer and service

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../master/management/WorkerRestClient.java        |   3 +-
 .../container/worker/rest/FileResource.java        |  16 +-
 .../app-image-labeling.component.ts                |  15 +-
 .../datalake/datalake-rest.service.ts              |   9 +-
 .../image-categorize/image-categorize.component.ts |   9 +-
 .../image-labeling/image-labeling.component.ts     |  33 +-
 .../image/image-viewer/image-viewer.component.ts   |  12 +-
 ui/src/app/core-ui/image/image.component.ts        |   5 +-
 ui/src/app/dashboard/services/dashboard.service.ts |   8 +-
 .../widgets/base/base-data-explorer-widget.ts      |   2 +-
 .../widgets/image/image-widget.component.css       |   4 -
 .../widgets/image/image-widget.component.html      |  24 +-
 .../widgets/image/image-widget.component.ts        |  52 ++-
 .../line-chart/line-chart-widget.component.html    |   2 +-
 .../services/data-view-data-explorer.service.ts    |   5 +-
 .../apis/pipeline-template.service.ts              |  14 +-
 ui/src/app/platform-services/platform.module.ts    |   2 -
 .../platform-services/tsonld-serializer.service.ts | 229 ------------
 ui/src/app/platform-services/tsonld/index.ts       |  19 -
 .../app/platform-services/tsonld/model/Person.js   |  63 ----
 .../app/platform-services/tsonld/model/Person.ts   |  54 ---
 ui/src/app/platform-services/tsonld/tsonld.js      | 245 ------------
 ui/src/app/platform-services/tsonld/tsonld.ts      | 410 ---------------------
 23 files changed, 92 insertions(+), 1143 deletions(-)
 delete mode 100644 ui/src/app/platform-services/tsonld-serializer.service.ts
 delete mode 100644 ui/src/app/platform-services/tsonld/index.ts
 delete mode 100644 ui/src/app/platform-services/tsonld/model/Person.js
 delete mode 100644 ui/src/app/platform-services/tsonld/model/Person.ts
 delete mode 100644 ui/src/app/platform-services/tsonld/tsonld.js
 delete mode 100644 ui/src/app/platform-services/tsonld/tsonld.ts


[incubator-streampipes] 02/03: [STREAMPIPES-207][WIP] Fix image widget in data explorer

Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit 81adbc4b2c12ca1195646928bcc6ec883faba4c2
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Sun Aug 23 22:58:18 2020 +0200

    [STREAMPIPES-207][WIP] Fix image widget in data explorer
---
 .../app-image-labeling.component.ts                | 10 +----
 .../datalake/datalake-rest.service.ts              |  9 ++--
 .../image-categorize/image-categorize.component.ts |  5 +--
 .../image-labeling/image-labeling.component.ts     |  6 +--
 .../image/image-viewer/image-viewer.component.ts   |  7 +--
 ui/src/app/core-ui/image/image.component.ts        |  5 ++-
 .../widgets/base/base-data-explorer-widget.ts      |  2 +-
 .../widgets/image/image-widget.component.css       |  4 --
 .../widgets/image/image-widget.component.html      | 24 +++++-----
 .../widgets/image/image-widget.component.ts        | 52 ++++++++++------------
 .../line-chart/line-chart-widget.component.html    |  2 +-
 .../apis/pipeline-template.service.ts              | 13 +++---
 12 files changed, 59 insertions(+), 80 deletions(-)

diff --git a/ui/src/app/app-image-labeling/app-image-labeling.component.ts b/ui/src/app/app-image-labeling/app-image-labeling.component.ts
index b044527..b06195b 100644
--- a/ui/src/app/app-image-labeling/app-image-labeling.component.ts
+++ b/ui/src/app/app-image-labeling/app-image-labeling.component.ts
@@ -33,22 +33,16 @@ export class AppImageLabelingComponent implements  OnInit {
 
   @Output() appOpened = new EventEmitter<boolean>();
 
-  constructor(private restService: DatalakeRestService,
-              private tsonLdSerializerService: TsonLdSerializerService) {
+  constructor(private restService: DatalakeRestService) {
 
   }
 
   ngOnInit() {
       this.appOpened.emit(true);
-        this.restService.getAllInfos().map(data => {
-          return this.tsonLdSerializerService.fromJsonLdContainer(data, 'sp:DataLakeMeasure');
-        }).subscribe(
-          res => {
+        this.restService.getAllInfos().subscribe(res => {
               this.dataLakeMeasures = res;
               this.selectedMeasure = res[0];
           }
         );
   }
-
-
 }
diff --git a/ui/src/app/core-services/datalake/datalake-rest.service.ts b/ui/src/app/core-services/datalake/datalake-rest.service.ts
index 6235e9d..d0ce8b1 100644
--- a/ui/src/app/core-services/datalake/datalake-rest.service.ts
+++ b/ui/src/app/core-services/datalake/datalake-rest.service.ts
@@ -18,12 +18,13 @@
 
 import { HttpClient, HttpRequest } from '@angular/common/http';
 import { Injectable } from '@angular/core';
-import { Observable } from 'rxjs/Observable';
+import { Observable } from 'rxjs';
 import { DataResult } from '../../core-model/datalake/DataResult';
 import { GroupedDataResult } from '../../core-model/datalake/GroupedDataResult';
 import { PageResult } from '../../core-model/datalake/PageResult';
 import { AuthStatusService } from '../../services/auth-status.service';
 import {DataLakeMeasure} from "../../core-model/gen/streampipes-model";
+import {map} from "rxjs/operators";
 
 @Injectable()
 export class DatalakeRestService {
@@ -40,8 +41,10 @@ export class DatalakeRestService {
         return this.baseUrl + '/api/v3/users/' + this.authStatusService.email + '/datalake';
     }
 
-    getAllInfos() {
-        return this.http.get<DataLakeMeasure[]>(this.dataLakeUrlV3 + '/info');
+    getAllInfos(): Observable<DataLakeMeasure[]> {
+        return this.http.get(this.dataLakeUrlV3 + '/info').pipe(map(response => {
+          return (response as any[]).map(p => DataLakeMeasure.fromData(p));
+        }));
     }
 
     getDataPage(index, itemsPerPage, page) {
diff --git a/ui/src/app/core-ui/image/image-categorize/image-categorize.component.ts b/ui/src/app/core-ui/image/image-categorize/image-categorize.component.ts
index 59bd6bb..2e062dd 100644
--- a/ui/src/app/core-ui/image/image-categorize/image-categorize.component.ts
+++ b/ui/src/app/core-ui/image/image-categorize/image-categorize.component.ts
@@ -57,10 +57,7 @@ export class ImageCategorizeComponent implements OnInit, AfterViewInit {
     // TODO: Get Labels
     this.labels = this.restService.getLabels();
 
-    this.restService.getAllInfos().map(data => {
-      return this.tsonLdSerializerService.fromJsonLdContainer(data, 'sp:DataLakeMeasure');
-    }).subscribe(
-      res => {
+    this.restService.getAllInfos().subscribe(res => {
         this.eventSchema = res.find(elem => elem.measureName === this.measureName).eventSchema;
         const properties = this.eventSchema.eventProperties;
         for (const prop of properties) {
diff --git a/ui/src/app/core-ui/image/image-labeling/image-labeling.component.ts b/ui/src/app/core-ui/image/image-labeling/image-labeling.component.ts
index 8c3238c..696505c 100644
--- a/ui/src/app/core-ui/image/image-labeling/image-labeling.component.ts
+++ b/ui/src/app/core-ui/image/image-labeling/image-labeling.component.ts
@@ -73,7 +73,6 @@ export class ImageLabelingComponent implements OnInit, AfterViewInit, OnChanges
   constructor(private restService: DatalakeRestService, private reactLabelingService: ReactLabelingService,
               private polygonLabelingService: PolygonLabelingService, private brushLabelingService: BrushLabelingService,
               private snackBar: MatSnackBar, private cocoFormatService: CocoFormatService,
-              private tsonLdSerializerService: TsonLdSerializerService,
               public labelingMode: LabelingModeService) { }
 
   ngOnInit(): void {
@@ -85,10 +84,7 @@ export class ImageLabelingComponent implements OnInit, AfterViewInit, OnChanges
 
     // TODO remove for production, if default dev values are not necessary
     if (this.eventSchema === undefined) {
-      this.restService.getAllInfos().map(data => {
-        return this.tsonLdSerializerService.fromJsonLdContainer(data, 'sp:DataLakeMeasure');
-      }).subscribe(
-        res => {
+      this.restService.getAllInfos().subscribe(res => {
           this.eventSchema = res.find(elem => elem.measureName === this.measureName).eventSchema;
           const properties = this.eventSchema.eventProperties;
           for (const prop of properties) {
diff --git a/ui/src/app/core-ui/image/image-viewer/image-viewer.component.ts b/ui/src/app/core-ui/image/image-viewer/image-viewer.component.ts
index 348b754..83ac05d 100644
--- a/ui/src/app/core-ui/image/image-viewer/image-viewer.component.ts
+++ b/ui/src/app/core-ui/image/image-viewer/image-viewer.component.ts
@@ -40,7 +40,7 @@ export class ImageViewerComponent implements OnInit {
   private setImagesIndexToFirst = false;
   private setImagesIndexToLast = false;
 
-  constructor(private restService: DatalakeRestService, private tsonLdSerializerService: TsonLdSerializerService) { }
+  constructor(private restService: DatalakeRestService) { }
 
   ngOnInit(): void {
 
@@ -50,10 +50,7 @@ export class ImageViewerComponent implements OnInit {
     //   });
     // }
 
-    this.restService.getAllInfos().map(data => {
-      return this.tsonLdSerializerService.fromJsonLdContainer(data, 'sp:DataLakeMeasure');
-    }).subscribe(
-      res => {
+    this.restService.getAllInfos().subscribe( res => {
         this.eventSchema = res.find(elem => elem.measureName === this.measureName).eventSchema;
         const properties = this.eventSchema.eventProperties;
         for (const prop of properties) {
diff --git a/ui/src/app/core-ui/image/image.component.ts b/ui/src/app/core-ui/image/image.component.ts
index b312fea..1e1b408 100644
--- a/ui/src/app/core-ui/image/image.component.ts
+++ b/ui/src/app/core-ui/image/image.component.ts
@@ -16,7 +16,8 @@
  *
  */
 
-import { Component, OnInit } from '@angular/core';
+import {Component, Input, OnInit} from '@angular/core';
+import {DataResult} from "../../core-model/datalake/DataResult";
 
 @Component({
   selector: 'sp-image',
@@ -25,6 +26,8 @@ import { Component, OnInit } from '@angular/core';
 })
 export class ImageComponent implements OnInit {
 
+  @Input()
+  availableImageData: DataResult;
 
   constructor() {
 
diff --git a/ui/src/app/data-explorer/components/widgets/base/base-data-explorer-widget.ts b/ui/src/app/data-explorer/components/widgets/base/base-data-explorer-widget.ts
index 6870cf6..ee55f5b 100644
--- a/ui/src/app/data-explorer/components/widgets/base/base-data-explorer-widget.ts
+++ b/ui/src/app/data-explorer/components/widgets/base/base-data-explorer-widget.ts
@@ -151,7 +151,7 @@ export abstract class BaseDataExplorerWidget implements OnChanges {
     return p.domainProperties.some(dp => dp === 'http://schema.org/DateTime');
   }
 
-  getRuntimeNames(properties: EventProperty[]): string[] {
+  getRuntimeNames(properties: EventPropertyUnion[]): string[] {
     const result = [];
     properties.forEach(p => {
         result.push(p.runtimeName);
diff --git a/ui/src/app/data-explorer/components/widgets/image/image-widget.component.css b/ui/src/app/data-explorer/components/widgets/image/image-widget.component.css
index 84e0b73..14ad10f 100644
--- a/ui/src/app/data-explorer/components/widgets/image/image-widget.component.css
+++ b/ui/src/app/data-explorer/components/widgets/image/image-widget.component.css
@@ -32,10 +32,6 @@
     padding: 5px;
 }
 
-::ng-deep .mat-form-field-wrapper {
-    padding: 0px !important;
-}
-
 .assemblyOptionsDataExplorer {
     background: #f6f6f6;
     border-bottom: 1px solid #ccc;
diff --git a/ui/src/app/data-explorer/components/widgets/image/image-widget.component.html b/ui/src/app/data-explorer/components/widgets/image/image-widget.component.html
index 37f9add..ce441e2 100644
--- a/ui/src/app/data-explorer/components/widgets/image/image-widget.component.html
+++ b/ui/src/app/data-explorer/components/widgets/image/image-widget.component.html
@@ -17,22 +17,22 @@
   -->
 
 
-<div fxLayout="column" fxLayoutAlign="stretch">
-    <div class="assemblyOptionsDataExplorer sp-blue-bg m-0 row header h-40" style="margin-left: 0px;margin-right: 0px;">
-        <div fxFlex="100" layout="row" fxLayoutAlign="end center" style="margin-left: 0px;margin-right: 0px;">
-            <sp-select-properties (changeSelectedProperties)="setSelectedColumn($event)" [availableProperties]="availableColumns" [selectedProperties]="selectedColumns"></sp-select-properties>
+<div class="widget-content">
+    <div class="widget-inner-options" style="margin-left: 0;margin-right: 0;margin-top: 0;">
+        <div fxFlex="100" fxLayout="row">
+            <div fxFlex="100" fxLayout="row" fxLayoutAlign="start center" style="margin-left: 0px;margin-right: 0px;">
+                <sp-select-properties multiple="true" (changeSelectedProperties)="setSelectedColumn($event)" [availableProperties]="availableColumns" [selectedProperties]="selectedColumns"></sp-select-properties>
+            </div>
         </div>
     </div>
 
-    <div style=" overflow-y: auto;" [style.max-height.px]="gridsterItem.rows * 100 - 40">
+    <div class="widget-inner-content">
+        <sp-load-data-spinner *ngIf="showIsLoadingData"></sp-load-data-spinner>
+        <sp-no-data-in-date-range *ngIf="showNoDataInDateRange" [viewDateRange]="viewDateRange"></sp-no-data-in-date-range>
+<!--        <sp-image [availableImageData]="availableImageData"></sp-image>-->
+        <div class="image-container">
 
-<!--        <sp-load-data-spinner *ngIf="showIsLoadingData"></sp-load-data-spinner>-->
-
-<!--        <sp-no-data-in-date-range *ngIf="showNoDataInDateRange" [viewDateRange]="viewDateRange"></sp-no-data-in-date-range>-->
-
-
-        <sp-image></sp-image>
+        </div>
 
     </div>
-
 </div>
diff --git a/ui/src/app/data-explorer/components/widgets/image/image-widget.component.ts b/ui/src/app/data-explorer/components/widgets/image/image-widget.component.ts
index d4c7566..d37c077 100644
--- a/ui/src/app/data-explorer/components/widgets/image/image-widget.component.ts
+++ b/ui/src/app/data-explorer/components/widgets/image/image-widget.component.ts
@@ -16,14 +16,14 @@
  *
  */
 
-import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
-import { MatSort } from '@angular/material/sort';
-import { MatTableDataSource } from '@angular/material/table';
-import { DataResult } from '../../../../core-model/datalake/DataResult';
-import { DatalakeRestService } from '../../../../core-services/datalake/datalake-rest.service';
-import { BaseDataExplorerWidget } from '../base/base-data-explorer-widget';
-import { MatDialog } from '@angular/material/dialog';
-import {EventPropertyUnion} from "../../../../core-model/gen/streampipes-model";
+import {Component, OnDestroy, OnInit, ViewChild} from '@angular/core';
+import {MatSort} from '@angular/material/sort';
+import {MatTableDataSource} from '@angular/material/table';
+import {DataResult} from '../../../../core-model/datalake/DataResult';
+import {DatalakeRestService} from '../../../../core-services/datalake/datalake-rest.service';
+import {BaseDataExplorerWidget} from '../base/base-data-explorer-widget';
+import {MatDialog} from '@angular/material/dialog';
+import {EventPropertyUnion, EventSchema} from "../../../../core-model/gen/streampipes-model";
 
 @Component({
   selector: 'sp-data-explorer-image-widget',
@@ -38,47 +38,41 @@ export class ImageWidgetComponent extends BaseDataExplorerWidget implements OnIn
   selectedColumns: EventPropertyUnion[];
   columnNames: string[];
 
-  dataSource = new MatTableDataSource();
+  availableImageData: DataResult;
 
-  constructor(protected dataLakeRestService: DatalakeRestService, protected dialog: MatDialog, ) {
+  constructor(protected dataLakeRestService: DatalakeRestService, protected dialog: MatDialog,) {
     super(dataLakeRestService, dialog);
   }
 
   ngOnInit(): void {
-    // this.dataSource.sort = this.sort;
-    // this.availableColumns = [this.getTimestampProperty(this.dataExplorerWidget.dataLakeMeasure.eventSchema)];
-    // this.availableColumns = this.availableColumns.concat(this.getValuePropertyKeys(this.dataExplorerWidget.dataLakeMeasure.eventSchema));
-    //
-    // // Reduce selected columns when more then 6
-    // this.selectedColumns = this.availableColumns.length > 6 ? this.availableColumns.slice(0, 5) : this.availableColumns;
-    // this.columnNames = this.getRuntimeNames(this.selectedColumns);
-    //
+    this.availableColumns = this.getImageProperties(this.dataExplorerWidget.dataLakeMeasure.eventSchema);
+    this.selectedColumns = [this.availableColumns[0]];
     this.updateData();
+  }
 
+  getImageProperties(eventSchema: EventSchema): EventPropertyUnion[] {
+    return eventSchema.eventProperties.filter(ep => ep.domainProperties.some(dp => dp === "https://image.com"));
   }
 
   updateData() {
     this.setShownComponents(false, false, true);
 
     this.dataLakeRestService.getDataAutoAggregation(
-      this.dataExplorerWidget.dataLakeMeasure.measureName, this.viewDateRange.startDate.getTime(), this.viewDateRange.endDate.getTime())
-      .subscribe(
-      (res: DataResult) => {
-        // this.dataSource.data = this.transformData(res);
-      }
-    );
+        this.dataExplorerWidget.dataLakeMeasure.measureName, this.viewDateRange.startDate.getTime(), this.viewDateRange.endDate.getTime())
+        .subscribe(
+            (res: DataResult) => {
+             this.availableImageData = res;
+             this.showIsLoadingData = false;
+            }
+        );
   }
 
-
   setSelectedColumn(selectedColumns: EventPropertyUnion[]) {
     this.selectedColumns = selectedColumns;
     this.columnNames = this.getRuntimeNames(this.selectedColumns);
   }
 
   ngOnDestroy(): void {
-    this.dataSource.data = [];
-  }
-
-
 
+  }
 }
diff --git a/ui/src/app/data-explorer/components/widgets/line-chart/line-chart-widget.component.html b/ui/src/app/data-explorer/components/widgets/line-chart/line-chart-widget.component.html
index c56025a..a75f3fe 100644
--- a/ui/src/app/data-explorer/components/widgets/line-chart/line-chart-widget.component.html
+++ b/ui/src/app/data-explorer/components/widgets/line-chart/line-chart-widget.component.html
@@ -19,7 +19,7 @@
 <div class="widget-content">
     <div class="widget-inner-options" style="margin-left: 0;margin-right: 0;margin-top: 0;">
         <div fxFlex="100" fxLayout="row">
-            <div fxFlex="100" layout="row" fxLayoutAlign="start center" style="margin-left: 0px;margin-right: 0px;">
+            <div fxFlex="100" fxLayout="row" fxLayoutAlign="start center" style="margin-left: 0px;margin-right: 0px;">
                 <sp-select-properties
                         label="Select Properties"
                         multiple = true
diff --git a/ui/src/app/platform-services/apis/pipeline-template.service.ts b/ui/src/app/platform-services/apis/pipeline-template.service.ts
index 93251d5..efa06e8 100644
--- a/ui/src/app/platform-services/apis/pipeline-template.service.ts
+++ b/ui/src/app/platform-services/apis/pipeline-template.service.ts
@@ -33,7 +33,6 @@ export class PipelineTemplateService {
     constructor(
         private http: HttpClient,
         private authStatusService: AuthStatusService,
-        private tsonLdSerializerService: TsonLdSerializerService,
     ) {}
 
     getServerUrl() {
@@ -80,7 +79,7 @@ export class PipelineTemplateService {
 
                 // Currently tsonld dows not support objects that just contain one root object without an enclosing @graph array
                 if ('@graph' in response) {
-                    res = this.tsonLdSerializerService.fromJsonLd(response, 'sp:PipelineTemplateInvocation');
+                    //res = this.tsonLdSerializerService.fromJsonLd(response, 'sp:PipelineTemplateInvocation');
                 } else {
                     res = new PipelineTemplateInvocation(response['@id']);
                     res.dataSetId = response['sp:hasDataSetId'];
@@ -111,11 +110,11 @@ export class PipelineTemplateService {
 
     createPipelineTemplateInvocation(invocation: PipelineTemplateInvocation) {
 
-        this.tsonLdSerializerService.toJsonLd(invocation).subscribe(res => {
-            this.http
-                .post(this.getServerUrl() + '/api/v2/users/'+ this.authStatusService.email + '/pipeline-templates', res)
-                .subscribe();
-        });
+        // this.tsonLdSerializerService.toJsonLd(invocation).subscribe(res => {
+        //     this.http
+        //         .post(this.getServerUrl() + '/api/v2/users/'+ this.authStatusService.email + '/pipeline-templates', res)
+        //         .subscribe();
+        // });
     }
 
 }
\ No newline at end of file


[incubator-streampipes] 01/03: [hotfix] Fix bug in FileResource

Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit beeb46f96f49d943f708bc5e493e5b2efa63021d
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Sun Aug 23 20:37:14 2020 +0200

    [hotfix] Fix bug in FileResource
---
 .../container/master/management/WorkerRestClient.java    |  3 +--
 .../connect/container/worker/rest/FileResource.java      | 16 +++++++++-------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/management/WorkerRestClient.java b/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/management/WorkerRestClient.java
index e60aba0..8c87a67 100644
--- a/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/management/WorkerRestClient.java
+++ b/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/management/WorkerRestClient.java
@@ -18,7 +18,6 @@
 
 package org.apache.streampipes.connect.container.master.management;
 
-import com.google.gson.Gson;
 import org.apache.http.client.fluent.Request;
 import org.apache.http.entity.ContentType;
 import org.apache.http.entity.mime.MultipartEntity;
@@ -196,7 +195,7 @@ public class WorkerRestClient {
                     .connectTimeout(1000)
                     .socketTimeout(100000)
                     .execute().returnContent().asString();
-            List<String> paths = new Gson().fromJson(stringResponse, List.class);
+            List<String> paths = JacksonSerializer.getObjectMapper().readValue(stringResponse, List.class);
 
             logger.info("Got File paths successfully");
             return paths;
diff --git a/streampipes-connect-container-worker/src/main/java/org/apache/streampipes/connect/container/worker/rest/FileResource.java b/streampipes-connect-container-worker/src/main/java/org/apache/streampipes/connect/container/worker/rest/FileResource.java
index b89fbe7..2671ad6 100644
--- a/streampipes-connect-container-worker/src/main/java/org/apache/streampipes/connect/container/worker/rest/FileResource.java
+++ b/streampipes-connect-container-worker/src/main/java/org/apache/streampipes/connect/container/worker/rest/FileResource.java
@@ -18,21 +18,21 @@
 
 package org.apache.streampipes.connect.container.worker.rest;
 
+import org.apache.streampipes.connect.container.worker.management.FileManagement;
+import org.apache.streampipes.connect.rest.AbstractContainerResource;
+import org.apache.streampipes.model.message.Notifications;
+import org.apache.streampipes.rest.shared.annotation.JacksonSerialized;
 import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
 import org.glassfish.jersey.media.multipart.FormDataParam;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.streampipes.connect.container.worker.management.FileManagement;
-import org.apache.streampipes.connect.rest.AbstractContainerResource;
-import org.apache.streampipes.model.message.Notifications;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
 
 import javax.ws.rs.*;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
 
 @Path("/api/v1/{username}/worker/file")
 public class FileResource extends AbstractContainerResource {
@@ -81,6 +81,8 @@ public class FileResource extends AbstractContainerResource {
     }
 
     @GET
+    @Produces(MediaType.APPLICATION_JSON)
+    @JacksonSerialized
     public Response getFilePaths(@PathParam("username") String username) {
         return ok(fileManagement.getFilePaths());
     }


[incubator-streampipes] 03/03: [STREAMPIPES-206] Remove tson-ld serializer and service

Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit c495a1b91d6345281a3b9fdf16b55c476c8d0bf5
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Sun Aug 23 23:22:14 2020 +0200

    [STREAMPIPES-206] Remove tson-ld serializer and service
---
 .../app-image-labeling.component.ts                |   5 +-
 .../image-categorize/image-categorize.component.ts |   4 +-
 .../image-labeling/image-labeling.component.ts     |  27 +-
 .../image/image-viewer/image-viewer.component.ts   |   5 +-
 ui/src/app/dashboard/services/dashboard.service.ts |   8 +-
 .../services/data-view-data-explorer.service.ts    |   5 +-
 .../apis/pipeline-template.service.ts              |   1 -
 ui/src/app/platform-services/platform.module.ts    |   2 -
 .../platform-services/tsonld-serializer.service.ts | 229 ------------
 ui/src/app/platform-services/tsonld/index.ts       |  19 -
 .../app/platform-services/tsonld/model/Person.js   |  63 ----
 .../app/platform-services/tsonld/model/Person.ts   |  54 ---
 ui/src/app/platform-services/tsonld/tsonld.js      | 245 ------------
 ui/src/app/platform-services/tsonld/tsonld.ts      | 410 ---------------------
 14 files changed, 23 insertions(+), 1054 deletions(-)

diff --git a/ui/src/app/app-image-labeling/app-image-labeling.component.ts b/ui/src/app/app-image-labeling/app-image-labeling.component.ts
index b06195b..e867e3f 100644
--- a/ui/src/app/app-image-labeling/app-image-labeling.component.ts
+++ b/ui/src/app/app-image-labeling/app-image-labeling.component.ts
@@ -15,9 +15,8 @@
  * limitations under the License.
  */
 
-import { Component, EventEmitter, OnInit, Output } from '@angular/core';
-import { DatalakeRestService } from "../core-services/datalake/datalake-rest.service";
-import { TsonLdSerializerService } from "../platform-services/tsonld-serializer.service";
+import {Component, EventEmitter, OnInit, Output} from '@angular/core';
+import {DatalakeRestService} from "../core-services/datalake/datalake-rest.service";
 import {DataLakeMeasure} from "../core-model/gen/streampipes-model";
 
 @Component({
diff --git a/ui/src/app/core-ui/image/image-categorize/image-categorize.component.ts b/ui/src/app/core-ui/image/image-categorize/image-categorize.component.ts
index 2e062dd..bead55f 100644
--- a/ui/src/app/core-ui/image/image-categorize/image-categorize.component.ts
+++ b/ui/src/app/core-ui/image/image-categorize/image-categorize.component.ts
@@ -18,7 +18,6 @@
 import { AfterViewInit, Component, OnInit } from '@angular/core';
 import { MatSnackBar } from '@angular/material/snack-bar';
 import { DatalakeRestService } from '../../../core-services/datalake/datalake-rest.service';
-import { TsonLdSerializerService } from '../../../platform-services/tsonld-serializer.service';
 import { ColorService } from '../services/color.service';
 
 
@@ -47,8 +46,7 @@ export class ImageCategorizeComponent implements OnInit, AfterViewInit {
   private setImagesIndexToFirst = false;
   private setImagesIndexToLast = false;
 
-  constructor(private restService: DatalakeRestService, public colorService: ColorService, private snackBar: MatSnackBar,
-              private tsonLdSerializerService: TsonLdSerializerService) { }
+  constructor(private restService: DatalakeRestService, public colorService: ColorService, private snackBar: MatSnackBar) { }
 
   ngOnInit(): void {
     // TODO: Load labels for images
diff --git a/ui/src/app/core-ui/image/image-labeling/image-labeling.component.ts b/ui/src/app/core-ui/image/image-labeling/image-labeling.component.ts
index 696505c..64ab20e 100644
--- a/ui/src/app/core-ui/image/image-labeling/image-labeling.component.ts
+++ b/ui/src/app/core-ui/image/image-labeling/image-labeling.component.ts
@@ -17,21 +17,20 @@
  */
 
 
-import { AfterViewInit, Component, Input, OnChanges, OnInit, ViewChild } from '@angular/core';
-import { MatSnackBar } from '@angular/material/snack-bar';
+import {AfterViewInit, Component, Input, OnChanges, OnInit, ViewChild} from '@angular/core';
+import {MatSnackBar} from '@angular/material/snack-bar';
 import Konva from 'konva';
-import { Annotation } from '../../../core-model/coco/Annotation';
-import { CocoFormat } from '../../../core-model/coco/Coco.format';
-import { DatalakeRestService } from '../../../core-services/datalake/datalake-rest.service';
-import { TsonLdSerializerService } from '../../../platform-services/tsonld-serializer.service';
-import { ImageContainerComponent } from '../components/image-container/image-container.component';
-import { ICoordinates } from '../model/coordinates';
-import { LabelingMode } from '../model/labeling-mode';
-import { BrushLabelingService } from '../services/BrushLabeling.service';
-import { CocoFormatService } from '../services/CocoFormat.service';
-import { LabelingModeService } from '../services/LabelingMode.service';
-import { PolygonLabelingService } from '../services/PolygonLabeling.service';
-import { ReactLabelingService } from '../services/ReactLabeling.service';
+import {Annotation} from '../../../core-model/coco/Annotation';
+import {CocoFormat} from '../../../core-model/coco/Coco.format';
+import {DatalakeRestService} from '../../../core-services/datalake/datalake-rest.service';
+import {ImageContainerComponent} from '../components/image-container/image-container.component';
+import {ICoordinates} from '../model/coordinates';
+import {LabelingMode} from '../model/labeling-mode';
+import {BrushLabelingService} from '../services/BrushLabeling.service';
+import {CocoFormatService} from '../services/CocoFormat.service';
+import {LabelingModeService} from '../services/LabelingMode.service';
+import {PolygonLabelingService} from '../services/PolygonLabeling.service';
+import {ReactLabelingService} from '../services/ReactLabeling.service';
 
 @Component({
   selector: 'sp-image-labeling',
diff --git a/ui/src/app/core-ui/image/image-viewer/image-viewer.component.ts b/ui/src/app/core-ui/image/image-viewer/image-viewer.component.ts
index 83ac05d..afa3b7c 100644
--- a/ui/src/app/core-ui/image/image-viewer/image-viewer.component.ts
+++ b/ui/src/app/core-ui/image/image-viewer/image-viewer.component.ts
@@ -15,9 +15,8 @@
  * limitations under the License.
  */
 
-import { Component, OnInit } from '@angular/core';
-import { DatalakeRestService } from '../../../core-services/datalake/datalake-rest.service';
-import { TsonLdSerializerService } from '../../../platform-services/tsonld-serializer.service';
+import {Component, OnInit} from '@angular/core';
+import {DatalakeRestService} from '../../../core-services/datalake/datalake-rest.service';
 
 @Component({
   selector: 'sp-image-viewer',
diff --git a/ui/src/app/dashboard/services/dashboard.service.ts b/ui/src/app/dashboard/services/dashboard.service.ts
index defa4fe..07563a6 100644
--- a/ui/src/app/dashboard/services/dashboard.service.ts
+++ b/ui/src/app/dashboard/services/dashboard.service.ts
@@ -16,13 +16,12 @@
  *
  */
 
-import {HttpClient, HttpHeaders} from "@angular/common/http";
+import {HttpClient} from "@angular/common/http";
 import {Injectable} from "@angular/core";
 import {map} from "rxjs/operators";
-import {from, Observable} from "rxjs";
+import {Observable} from "rxjs";
 import {AuthStatusService} from "../../services/auth-status.service";
 import {Dashboard} from "../models/dashboard.model";
-import {TsonLdSerializerService} from "../../platform-services/tsonld-serializer.service";
 import {MeasurementUnit} from "../../core-model/measurement-unit/MeasurementUnit";
 import {DashboardWidgetModel, VisualizablePipeline} from "../../core-model/gen/streampipes-model";
 
@@ -31,8 +30,7 @@ export class DashboardService {
 
 
     constructor(private http: HttpClient, 
-                private authStatusService: AuthStatusService,
-                private tsonLdSerializerService: TsonLdSerializerService) {
+                private authStatusService: AuthStatusService) {
     }
 
 
diff --git a/ui/src/app/data-explorer/services/data-view-data-explorer.service.ts b/ui/src/app/data-explorer/services/data-view-data-explorer.service.ts
index efe58ec..9566b17 100644
--- a/ui/src/app/data-explorer/services/data-view-data-explorer.service.ts
+++ b/ui/src/app/data-explorer/services/data-view-data-explorer.service.ts
@@ -16,14 +16,13 @@
  *
  */
 
-import {HttpClient, HttpHeaders} from '@angular/common/http';
+import {HttpClient} from '@angular/common/http';
 import {Injectable} from '@angular/core';
-import {from, Observable} from 'rxjs';
+import {Observable} from 'rxjs';
 import 'rxjs-compat/add/observable/of';
 import {map} from 'rxjs/operators';
 import {DatalakeRestService} from '../../core-services/datalake/datalake-rest.service';
 import {SharedDatalakeRestService} from '../../core-services/shared/shared-dashboard.service';
-import {TsonLdSerializerService} from '../../platform-services/tsonld-serializer.service';
 import {AuthStatusService} from '../../services/auth-status.service';
 import {IDataViewDashboard} from '../models/dataview-dashboard.model';
 import {DataExplorerWidgetModel, DataLakeMeasure} from "../../core-model/gen/streampipes-model";
diff --git a/ui/src/app/platform-services/apis/pipeline-template.service.ts b/ui/src/app/platform-services/apis/pipeline-template.service.ts
index efa06e8..d806ac6 100644
--- a/ui/src/app/platform-services/apis/pipeline-template.service.ts
+++ b/ui/src/app/platform-services/apis/pipeline-template.service.ts
@@ -25,7 +25,6 @@ import {PipelineTemplateInvocation} from '../../connect/model/PipelineTemplateIn
 import {StaticProperty} from '../../connect/model/StaticProperty';
 import {AuthStatusService} from '../../services/auth-status.service';
 import 'rxjs-compat/add/operator/map';
-import {TsonLdSerializerService} from '../tsonld-serializer.service';
 
 @Injectable()
 export class PipelineTemplateService {
diff --git a/ui/src/app/platform-services/platform.module.ts b/ui/src/app/platform-services/platform.module.ts
index 5df955d..66588e3 100644
--- a/ui/src/app/platform-services/platform.module.ts
+++ b/ui/src/app/platform-services/platform.module.ts
@@ -17,7 +17,6 @@
  */
 
 import {NgModule} from '@angular/core';
-import {TsonLdSerializerService} from './tsonld-serializer.service';
 import {PipelineTemplateService} from './apis/pipeline-template.service';
 import {PipelineElementService} from "./apis/pipeline-element.service";
 import {PipelineService} from "./apis/pipeline.service";
@@ -30,7 +29,6 @@ import {PipelineElementEndpointService} from "./apis/pipeline-element-endpoint.s
   providers: [
     PlatformServicesCommons,
     PipelineElementEndpointService,
-    TsonLdSerializerService,
     PipelineTemplateService,
     PipelineElementService,
     PipelineService
diff --git a/ui/src/app/platform-services/tsonld-serializer.service.ts b/ui/src/app/platform-services/tsonld-serializer.service.ts
deleted file mode 100644
index 34c408e..0000000
--- a/ui/src/app/platform-services/tsonld-serializer.service.ts
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import {Injectable} from '@angular/core';
-import {AnyStaticProperty} from '../connect/model/AnyStaticProperty';
-import {OneOfStaticProperty} from '../connect/model/OneOfStaticProperty';
-import {ProtocolDescription} from '../connect/model/connect/grounding/ProtocolDescription';
-import {ProtocolDescriptionList} from '../connect/model/connect/grounding/ProtocolDescriptionList';
-import {FreeTextStaticProperty} from '../connect/model/FreeTextStaticProperty';
-import {FileStaticProperty} from '../connect/model/FileStaticProperty';
-import {FormatDescriptionList} from '../connect/model/connect/grounding/FormatDescriptionList';
-import {FormatDescription} from '../connect/model/connect/grounding/FormatDescription';
-import {AdapterDescriptionList} from '../connect/model/connect/AdapterDescriptionList';
-import {Option} from '../connect/model/Option';
-import {AdapterDescription} from '../connect/model/connect/AdapterDescription';
-import {AdapterSetDescription} from '../connect/model/connect/AdapterSetDescription';
-import {AdapterStreamDescription} from '../connect/model/connect/AdapterStreamDescription';
-import {DataSetDescription} from '../connect/model/DataSetDescription';
-import {EventSchema} from '../connect/schema-editor/model/EventSchema';
-import {EventProperty} from '../connect/schema-editor/model/EventProperty';
-import {EventPropertyNested} from '../connect/schema-editor/model/EventPropertyNested';
-import {EventPropertyList} from '../connect/schema-editor/model/EventPropertyList';
-import {EventPropertyPrimitive} from '../connect/schema-editor/model/EventPropertyPrimitive';
-import {DomainPropertyProbability} from '../connect/schema-editor/model/DomainPropertyProbability';
-import {DomainPropertyProbabilityList} from '../connect/schema-editor/model/DomainPropertyProbabilityList';
-import {GuessSchema} from '../connect/schema-editor/model/GuessSchema';
-import {URI} from '../connect/model/URI';
-import {RenameRuleDescription} from '../connect/model/connect/rules/RenameRuleDescription';
-import {DeleteRuleDescription} from '../connect/model/connect/rules/DeleteRuleDescription';
-import {AddNestedRuleDescription} from '../connect/model/connect/rules/AddNestedRuleDescription';
-import {RemoveDuplicatesRuleDescription} from '../connect/model/connect/rules/RemoveDuplicatesRuleDescription';
-import {AddTimestampRuleDescription} from '../connect/model/connect/rules/AddTimestampRuleDescription';
-import {AddValueTransformationRuleDescription} from '../connect/model/connect/rules/AddValueTransformationRuleDescription';
-import {MoveRuleDescription} from '../connect/model/connect/rules/MoveRuleDesctiption';
-import {UnitTransformRuleDescription} from '../connect/model/connect/rules/UnitTransformRuleDescription';
-import {TsonLd} from './tsonld/index';
-import {Observable} from 'rxjs';
-import {TransformationRuleDescription} from '../connect/model/connect/rules/TransformationRuleDescription';
-import {GenericAdapterSetDescription} from '../connect/model/connect/GenericAdapterSetDescription';
-import {SpecificAdapterSetDescription} from '../connect/model/connect/SpecificAdapterSetDescription';
-import {GenericAdapterStreamDescription} from '../connect/model/connect/GenericAdapterStreamDescription';
-import {SpecificAdapterStreamDescription} from '../connect/model/connect/SpecificAdapterStreamDescription';
-import {MessageLd} from '../connect/model/message/MessageLd';
-import {NotificationLd} from '../connect/model/message/NotificationLd';
-import {SuccessMessageLd} from '../connect/model/message/SuccessMessage';
-import {ErrorMessageLd} from '../connect/model/message/ErrorMessage';
-import {TimestampTransformationRuleDescription} from '../connect/model/connect/rules/TimestampTransformationRuleDescription';
-import {DataStreamDescription} from '../connect/model/DataStreamDescription';
-import {PipelineTemplateInvocation} from '../connect/model/PipelineTemplateInvocation';
-import {MappingPropertyUnary} from '../connect/model/MappingPropertyUnary';
-import {DataProcessorInvocation} from '../connect/model/DataProcessorInvocation';
-import {AppendOutputStrategy} from '../connect/model/output/AppendOutputStrategy';
-import {CustomOutputStrategy} from '../connect/model/output/CustomOutputStrategy';
-import {CustomTransformOutputStrategy} from '../connect/model/output/CustomTransformOutputStrategy';
-import {FixedOutputStrategy} from '../connect/model/output/FixedOutputStrategy';
-import {KeepOutputStrategy} from '../connect/model/output/KeepOutputStrategy';
-import {ListOutputStrategy} from '../connect/model/output/ListOutputStrategy';
-import {OutputStrategy} from '../connect/model/output/OutputStrategy';
-import {PropertyRenameRule} from '../connect/model/output/PropertyRenameRule';
-import {TransformOutputStrategy} from '../connect/model/output/TransformOutputStrategy';
-import {TransformOperation} from '../connect/model/output/TransformOperation';
-import {DataStreamContainer} from '../connect/model/DataStreamContainer';
-import {Enumeration} from '../connect/schema-editor/model/Enumeration';
-import {QuantitativeValue} from '../connect/schema-editor/model/QuantitativeValue';
-import {PipelineTemplateDescriptionContainer} from '../connect/model/PipelineTemplateDescriptionContainer';
-import {PipelineTemplateDescription} from '../connect/model/PipelineTemplateDescription';
-import {BoundPipelineElement} from '../connect/model/BoundPipelineElement';
-import {DataSinkInvocation} from '../connect/model/DataSinkInvocation';
-import {RuntimeResolvableOneOfStaticProperty} from "../connect/model/RuntimeResolvableOneOfStaticProperty";
-import {RuntimeResolvableAnyStaticProperty} from "../connect/model/RuntimeResolvableAnyStaticProperty";
-import {RuntimeOptionsRequest} from "../connect/model/connect/runtime/RuntimeOptionsRequest";
-import {RuntimeOptionsResponse} from "../connect/model/connect/runtime/RuntimeOptionsResponse";
-import {EventRateTransformationRuleDescription} from '../connect/model/connect/rules/EventRateTransformationRuleDescription';
-import {SecretStaticProperty} from "../connect/model/SecretStaticProperty";
-import {AlternativesStaticProperty} from '../connect/model/AlternativesStaticProperty';
-import {AlternativeStaticProperty} from '../connect/model/AlternativeStaticProperty';
-import {GroupStaticProperty} from '../connect/model/GroupStaticProperty';
-import {CollectionStaticProperty} from "../connect/model/CollectionStaticProperty";
-import {VisualizablePipeline} from "../core-model/dashboard/VisualizablePipeline";
-import {DashboardWidget} from "../core-model/dashboard/DashboardWidget";
-import {DashboardWidgetSettings} from "../core-model/dashboard/DashboardWidgetSettings";
-import {ColorPickerStaticProperty} from "../connect/model/ColorPickerStaticProperty";
-import {MappingPropertyNary} from "../connect/model/MappingPropertyNary";
-import {UserDefinedOutputStrategy} from "../connect/model/output/UserDefinedOutputStrategy";
-import {CodeInputStaticProperty} from "../connect/model/CodeInputStaticProperty";
-import {DataSourceDescription} from "../connect/model/DataSourceDescription";
-import {EventGrounding} from "../connect/model/grounding/EventGrounding";
-import {TransportFormat} from "../connect/model/grounding/TransportFormat";
-import {TransportProtocol} from "../connect/model/grounding/TransportProtocol";
-
-
-@Injectable()
-export class TsonLdSerializerService {
-
-    private getTsonLd(): any {
-        const tsonld = new TsonLd();
-        tsonld.addClassMapping(ProtocolDescription);
-        tsonld.addClassMapping(ProtocolDescriptionList);
-        tsonld.addClassMapping(FreeTextStaticProperty);
-        tsonld.addClassMapping(SecretStaticProperty);
-        tsonld.addClassMapping(FileStaticProperty);
-        tsonld.addClassMapping(FormatDescriptionList);
-        tsonld.addClassMapping(FormatDescription);
-        tsonld.addClassMapping(AdapterDescriptionList);
-        tsonld.addClassMapping(AdapterDescription);
-        tsonld.addClassMapping(AdapterSetDescription);
-        tsonld.addClassMapping(SpecificAdapterSetDescription);
-        tsonld.addClassMapping(GenericAdapterSetDescription);
-        tsonld.addClassMapping(AdapterStreamDescription);
-        tsonld.addClassMapping(GenericAdapterStreamDescription);
-        tsonld.addClassMapping(SpecificAdapterStreamDescription);
-        tsonld.addClassMapping(DataSetDescription);
-        tsonld.addClassMapping(DataStreamDescription);
-        tsonld.addClassMapping(DataSourceDescription);
-        tsonld.addClassMapping(EventGrounding);
-        tsonld.addClassMapping(TransportFormat);
-        tsonld.addClassMapping(TransportProtocol);
-        tsonld.addClassMapping(EventSchema);
-        tsonld.addClassMapping(EventProperty);
-        tsonld.addClassMapping(EventPropertyNested);
-        tsonld.addClassMapping(PipelineTemplateInvocation);
-        tsonld.addClassMapping(MappingPropertyUnary);
-        tsonld.addClassMapping(MappingPropertyNary);
-        tsonld.addClassMapping(EventPropertyList);
-        tsonld.addClassMapping(EventPropertyPrimitive);
-        tsonld.addClassMapping(DomainPropertyProbability);
-        tsonld.addClassMapping(DomainPropertyProbabilityList);
-        tsonld.addClassMapping(GuessSchema);
-        tsonld.addClassMapping(URI);
-        tsonld.addClassMapping(RenameRuleDescription);
-        tsonld.addClassMapping(DeleteRuleDescription);
-        tsonld.addClassMapping(AddNestedRuleDescription);
-        tsonld.addClassMapping(TransformationRuleDescription);
-        tsonld.addClassMapping(RemoveDuplicatesRuleDescription);
-        tsonld.addClassMapping(AddTimestampRuleDescription);
-        tsonld.addClassMapping(AddValueTransformationRuleDescription);
-        tsonld.addClassMapping(EventRateTransformationRuleDescription);
-        tsonld.addClassMapping(MoveRuleDescription);
-        tsonld.addClassMapping(UnitTransformRuleDescription);
-        tsonld.addClassMapping(DataStreamContainer);
-        tsonld.addClassMapping(Option);
-        tsonld.addClassMapping(AnyStaticProperty);
-        tsonld.addClassMapping(OneOfStaticProperty);
-        tsonld.addClassMapping(TimestampTransformationRuleDescription);
-        tsonld.addClassMapping(NotificationLd);
-        tsonld.addClassMapping(MessageLd);
-        tsonld.addClassMapping(SuccessMessageLd);
-        tsonld.addClassMapping(ErrorMessageLd);
-
-        tsonld.addClassMapping(Enumeration);
-        tsonld.addClassMapping(QuantitativeValue);
-
-        tsonld.addClassMapping(PipelineTemplateDescriptionContainer);
-        tsonld.addClassMapping(PipelineTemplateDescription);
-        tsonld.addClassMapping(DataProcessorInvocation);
-        tsonld.addClassMapping(DataSinkInvocation);
-        tsonld.addClassMapping(BoundPipelineElement);
-
-        tsonld.addClassMapping(AppendOutputStrategy);
-        tsonld.addClassMapping(CodeInputStaticProperty)
-        tsonld.addClassMapping(CustomOutputStrategy);
-        tsonld.addClassMapping(CustomTransformOutputStrategy);
-        tsonld.addClassMapping(FixedOutputStrategy);
-        tsonld.addClassMapping(KeepOutputStrategy);
-        tsonld.addClassMapping(ListOutputStrategy);
-        tsonld.addClassMapping(OutputStrategy);
-        tsonld.addClassMapping(PropertyRenameRule);
-        tsonld.addClassMapping(TransformOperation);
-        tsonld.addClassMapping(TransformOutputStrategy);
-        tsonld.addClassMapping(UserDefinedOutputStrategy);
-
-        tsonld.addClassMapping(RuntimeResolvableAnyStaticProperty);
-        tsonld.addClassMapping(RuntimeResolvableOneOfStaticProperty);
-
-        tsonld.addClassMapping(RuntimeOptionsRequest);
-        tsonld.addClassMapping(RuntimeOptionsResponse);
-        tsonld.addClassMapping(RuntimeOptionsResponse);
-
-        tsonld.addClassMapping(GroupStaticProperty);
-        tsonld.addClassMapping(AlternativesStaticProperty);
-        tsonld.addClassMapping(AlternativeStaticProperty);
-        tsonld.addClassMapping(CollectionStaticProperty);
-
-        tsonld.addClassMapping(DashboardWidget);
-        tsonld.addClassMapping(DashboardWidgetSettings);
-
-        tsonld.addClassMapping(VisualizablePipeline);
-        tsonld.addClassMapping(ColorPickerStaticProperty);
-
-        tsonld.addContext('sp', 'https://streampipes.org/vocabulary/v1/');
-        tsonld.addContext('spi', 'urn:streampipes.org:spi:');
-        tsonld.addContext('foaf', 'http://xmlns.com/foaf/0.1/');
-
-
-        return tsonld;
-    }
-
-    public toJsonLd(o: any): Observable<{}> {
-        return this.getTsonLd().toflattenJsonLd(o);
-    }
-
-    public fromJsonLd(o: any, type: string): any {
-        return this.getTsonLd().fromJsonLdType(o, type);
-    }
-
-    public fromJsonLdContainer(o: any, type: string): any {
-        return this.getTsonLd().fromJsonLdContainer(o, type);
-    }
-
-    public jsonLdToFlattenJsonLd(object: any): any {
-        return this.getTsonLd().jsonLdToFlattenJsonLd(object);
-    }
-
-}
diff --git a/ui/src/app/platform-services/tsonld/index.ts b/ui/src/app/platform-services/tsonld/index.ts
deleted file mode 100644
index 5be6310..0000000
--- a/ui/src/app/platform-services/tsonld/index.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-export {TsonLd} from './tsonld';
diff --git a/ui/src/app/platform-services/tsonld/model/Person.js b/ui/src/app/platform-services/tsonld/model/Person.js
deleted file mode 100644
index 6d96765..0000000
--- a/ui/src/app/platform-services/tsonld/model/Person.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-"use strict";
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
-    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
-    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
-    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
-    return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-require("reflect-metadata");
-var RdfsClass_1 = require("../RdfsClass");
-var RdfsProperty_1 = require("../RdfsProperty");
-var RdfId_1 = require("../RdfId");
-var Person = /** @class */ (function () {
-    // constructor();
-    function Person(id, label, description, age, heights) {
-        this.id = id;
-        this.label = label;
-        this.description = description;
-        this.age = age;
-        this.heights = heights;
-    }
-    __decorate([
-        RdfId_1.RdfId
-    ], Person.prototype, "id", void 0);
-    __decorate([
-        RdfsProperty_1.RdfProperty('sp:label')
-    ], Person.prototype, "label", void 0);
-    __decorate([
-        RdfsProperty_1.RdfProperty('sp:description')
-    ], Person.prototype, "description", void 0);
-    __decorate([
-        RdfsProperty_1.RdfProperty('sp:age')
-    ], Person.prototype, "age", void 0);
-    __decorate([
-        RdfsProperty_1.RdfProperty('sp:heights')
-    ], Person.prototype, "heights", void 0);
-    __decorate([
-        RdfsProperty_1.RdfProperty('foaf:friend')
-    ], Person.prototype, "friend", void 0);
-    Person = __decorate([
-        RdfsClass_1.RdfsClass('sp:Person')
-    ], Person);
-    return Person;
-}());
-exports.Person = Person;
diff --git a/ui/src/app/platform-services/tsonld/model/Person.ts b/ui/src/app/platform-services/tsonld/model/Person.ts
deleted file mode 100644
index 6eebb89..0000000
--- a/ui/src/app/platform-services/tsonld/model/Person.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import 'reflect-metadata';
-import {RdfsClass} from '../RdfsClass';
-import {RdfProperty} from '../RdfsProperty';
-import {RdfId} from '../RdfId';
-
-@RdfsClass('sp:Person')
-export class Person {
-
-  @RdfId
-  public id: string;
-
-  @RdfProperty('sp:label')
-  public label: string;
-
-  @RdfProperty('sp:description')
-  public description: string;
-
-  @RdfProperty('sp:age')
-  public age: number;
-
-  @RdfProperty('sp:heights')
-  public heights: number;
-
-  @RdfProperty('foaf:friend')
-  public friend: Person;
-
-
-  // constructor();
-  constructor(id: string, label: string, description: string, age: number, heights: number) {
-    this.id = id;
-    this.label = label;
-    this.description = description;
-    this.age = age;
-    this.heights = heights;
-  }
-}
diff --git a/ui/src/app/platform-services/tsonld/tsonld.js b/ui/src/app/platform-services/tsonld/tsonld.js
deleted file mode 100644
index f0b3cf2..0000000
--- a/ui/src/app/platform-services/tsonld/tsonld.js
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-require("reflect-metadata");
-var Observable_1 = require("rxjs/Observable");
-require("rxjs/add/observable/fromPromise");
-var jsonld = require("jsonld");
-var util_1 = require("util");
-var TsonLd = /** @class */ (function () {
-    // private context: {key: string, value: string}[];
-    function TsonLd() {
-        // this.context = [];
-        this.context = {};
-        this.classMapping = {};
-    }
-    TsonLd.prototype.addContext = function (key, value) {
-        this.context[key] = value;
-    };
-    TsonLd.prototype.addClassMapping = function (value) {
-        var key = Reflect.getMetadata('RdfsClass', value.prototype.constructor);
-        if (util_1.isUndefined(key)) {
-            console.error('The value parameter of addClassMapping needs the RdfsClass annotation');
-        }
-        else {
-            this.classMapping[key] = value;
-        }
-    };
-    TsonLd.prototype.toflattenJsonLd = function (object) {
-        var obj = this.toJsonLd(object);
-        var context = obj['@context'];
-        delete obj['@context'];
-        return Observable_1.Observable.fromPromise(new Promise(function (resolve, reject) {
-            jsonld.flatten(obj, context, function (err, data) {
-                // console.log('flatten data: bla bla bla: ' + JSON.stringify(data, null, 2));
-                resolve(data);
-            });
-        }));
-    };
-    /**
-     *
-     * @param object the object to serialize
-     * @param {boolean} setContext defines whether the context should be added or not
-     * @param {any[]} allIds used to avoid cycles
-     * @returns {{}}
-     */
-    TsonLd.prototype.toJsonLd = function (object, setContext, allIds) {
-        if (setContext === void 0) { setContext = true; }
-        if (allIds === void 0) { allIds = []; }
-        // 1. object to json object
-        var jsObject = Object.assign({}, object);
-        // console.log('1. Step (js Object): ' + JSON.stringify(jsObject));
-        var properties = Object.getOwnPropertyNames(object);
-        // 2. Search for key id in object
-        var objectIdProperty = {};
-        for (var _i = 0, properties_1 = properties; _i < properties_1.length; _i++) {
-            var property = properties_1[_i];
-            // TODO add check that just one id is available
-            var idProperty = Reflect.getMetadata('RdfsId', object, property);
-            if (idProperty === 'rdfsId') {
-                objectIdProperty = property;
-            }
-        }
-        if (objectIdProperty === {}) {
-            console.error('Error no key Property');
-            // TODO generate a key
-        }
-        if (allIds.includes(jsObject[objectIdProperty])) {
-            return { '@id': jsObject[objectIdProperty] };
-        }
-        else {
-            allIds.push(jsObject[objectIdProperty]);
-        }
-        // 3. exchange keys with URIs
-        for (var _a = 0, properties_2 = properties; _a < properties_2.length; _a++) {
-            var property = properties_2[_a];
-            if (property !== objectIdProperty) {
-                var newProperty = Reflect.getMetadata('RdfProperty', object, property);
-                // check if the value is an array
-                if (Array.isArray(jsObject[property])) {
-                    jsObject[newProperty] = [];
-                    if (typeof jsObject[property][0] === 'object') {
-                        for (var _b = 0, _c = jsObject[property]; _b < _c.length; _b++) {
-                            var elem = _c[_b];
-                            jsObject[newProperty].push(this.toJsonLd(elem, false, allIds));
-                        }
-                    }
-                    else {
-                        jsObject[newProperty] = jsObject[property];
-                    }
-                }
-                else if (typeof jsObject[property] === 'object') {
-                    jsObject[newProperty] = this.toJsonLd(jsObject[property], false, allIds);
-                }
-                else {
-                    jsObject[newProperty] = jsObject[property];
-                }
-            }
-            else {
-                jsObject['@id'] = jsObject[property];
-            }
-            delete jsObject[property];
-        }
-        // console.log('2. Step (js Object with URIs as key): ' + JSON.stringify(jsObject));
-        // 4. add @type to object
-        // console.log('3. Step (add type): ' + JSON.stringify(jsObject));
-        var objectType = Reflect.getMetadata('RdfsClass', object.constructor);
-        jsObject['@type'] = objectType;
-        // 5. add @context to object
-        if (setContext) {
-            var tmp = {};
-            tmp['@graph'] = jsObject;
-            tmp['@context'] = this.context;
-            jsObject = tmp;
-        }
-        // console.log('testttest ' + JSON.stringify(jsObject));
-        return jsObject;
-    };
-    /**
-     *
-     * @param {Object} obj
-     * @param {T} p
-     * @param {{}} ids
-     * @returns {any}
-     */
-    // fromJsonLd<T>(obj: Object, p: T, ids: {}= {}) {
-    TsonLd.prototype.fromJsonLd = function (obj, ids, id) {
-        if (ids === void 0) { ids = {}; }
-        var context = obj['@context'];
-        var graph = obj['@graph'];
-        // Get rdfs type of p
-        // const objectType: String = Reflect.getMetadata('RdfsClass', Person);
-        // Find first object in graph with this type
-        // TODO think what should happen when more of one types are in graph
-        var jsonObject = null;
-        // for (const o of graph) {
-        var o = graph[0];
-        if (graph.length > 0) {
-            jsonObject = o;
-        }
-        else if (!util_1.isUndefined(ids[id])) {
-            return ids[id];
-        }
-        // Create the result object
-        var c = this.classMapping[jsonObject['@type']];
-        if (util_1.isUndefined(c)) {
-            console.error('Type: ' + jsonObject['@type'] + ' is not registered in tsonld');
-        }
-        var result = new c();
-        for (var property in jsonObject) {
-            var objectProp = void 0;
-            // Remove the @type property
-            if (property === '@id') {
-                objectProp = Reflect.getMetadata('TsId', c.prototype, property);
-            }
-            else {
-                objectProp = Reflect.getMetadata('TsProperty', c.prototype, property);
-            }
-            // skip the @type property
-            if (property !== '@type') {
-                // check whether property is object or literal
-                if (typeof jsonObject[property] === 'object') {
-                    result[objectProp] = [];
-                    // check if object or array
-                    if (Array.isArray(jsonObject[property])) {
-                        // ARRAY
-                        if (jsonObject[property].length > 0 && typeof jsonObject[property][0] === 'object') {
-                            for (var _i = 0, _a = jsonObject[property]; _i < _a.length; _i++) {
-                                var elem = _a[_i];
-                                // 1. check if already deserialized
-                                if (!util_1.isUndefined(ids[elem['@id']])) {
-                                    // TODO never called
-                                }
-                                else {
-                                    // 2. deserialize
-                                    // remove current object from graph
-                                    var index = graph.indexOf(jsonObject, 0);
-                                    if (index > -1) {
-                                        graph.splice(index, 1);
-                                    }
-                                    var newObj = { '@context': context, '@graph': graph };
-                                    ids[jsonObject['@id']] = result;
-                                    var arrayResult = this.fromJsonLd(newObj, ids, elem['@id']);
-                                    // TODO hot fix not sure if it works for all cases
-                                    graph.splice(0, 1);
-                                    result[objectProp].push(arrayResult);
-                                }
-                            }
-                        }
-                        else {
-                            // ARRAY of literals
-                            result[objectProp] = jsonObject[property];
-                        }
-                    }
-                    else {
-                        // NO ARRAY
-                        // console.log('bbbb ' + jsonObject[property] + ' xxxx ' + Array.isArray(jsonObject[property]));
-                        // check if already deserialized
-                        if (!util_1.isUndefined(ids[jsonObject[property]['@id']])) {
-                            // when already desirialized use object from stored array
-                            result[objectProp] = ids[jsonObject[property]['@id']];
-                        }
-                        else {
-                            // if not recursion and add to ids array
-                            var index = graph.indexOf(jsonObject, 0);
-                            if (index > -1) {
-                                graph.splice(index, 1);
-                            }
-                            var newObj = { '@context': context, '@graph': graph };
-                            ids[jsonObject['@id']] = result;
-                            var nestedResult = this.fromJsonLd(newObj, ids);
-                            result[objectProp] = nestedResult;
-                        }
-                    }
-                }
-                else {
-                    result[objectProp] = jsonObject[property];
-                }
-            }
-        }
-        // TODO add handling for and for nested properties
-        return result;
-    };
-    return TsonLd;
-}());
-exports.TsonLd = TsonLd;
-function prop(obj, key) {
-    return obj[key];
-}
diff --git a/ui/src/app/platform-services/tsonld/tsonld.ts b/ui/src/app/platform-services/tsonld/tsonld.ts
deleted file mode 100644
index 0f0f687..0000000
--- a/ui/src/app/platform-services/tsonld/tsonld.ts
+++ /dev/null
@@ -1,410 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import 'reflect-metadata';
-import {from, Observable} from 'rxjs';
-
-import * as jsonld from 'jsonld';
-
-import {isUndefined} from 'util';
-
-export class TsonLd {
-
-  private context: { [key: string]: string; } = {};
-  private classMapping: { [key: string]: any; } = {};
-
-  constructor() {
-
-  }
-
-  public addContext(key: string, value: string) {
-    this.context[key] = value;
-  }
-
-  public addClassMapping(value: any) {
-    const key: string = Reflect.getMetadata('RdfsClass', value.prototype.constructor);
-    if (isUndefined(key)) {
-      console.error('The value parameter of addClassMapping needs the RdfsClass annotation');
-    } else {
-      this.classMapping[key] = value;
-    }
-  }
-
-  public toflattenJsonLd(object: any): Observable<{}> {
-
-    const obj = this.toJsonLd(object);
-    const context = obj['@context'];
-    delete obj['@context'];
-
-    let promise = new Promise(function (resolve, reject) {
-      (jsonld as any).flatten(obj, context, function (err, data) {
-        resolve(data);
-      });
-    });
-
-    return from(promise);
-  }
-
-  public jsonLdToFlattenJsonLd(object: any) {
-     const context = object['@context'];
-    delete object['@context'];
-
-    let promise = new Promise(function(resolve, reject) {
-      (jsonld as any).flatten(object, context, function (err, data) {
-        resolve(data);
-      });
-    });
-
-    return from(promise);
-  }
-
-  /**
-   *
-   * @param object the object to serialize
-   * @param {boolean} setContext defines whether the context should be added or not
-   * @param {any[]} allIds used to avoid cycles
-   * @returns {{}}
-   */
-  public toJsonLd(object: any, setContext = true, allIds: any[] = []): {} {
-
-    // 1. object to json object
-    let jsObject = Object.assign({}, object);
-    // console.log('1. Step (js Object): ' + JSON.stringify(jsObject));
-
-    const properties = Object.getOwnPropertyNames(object);
-
-
-    // 2. Search for key id in object
-    let objectIdProperty: any = {};
-    for (const property of properties) {
-      // TODO add check that just one id is available
-      const idProperty = Reflect.getMetadata('RdfsId', object, property);
-      if (idProperty === 'rdfsId') {
-        objectIdProperty = property;
-      }
-    }
-
-    if (objectIdProperty === {}) {
-      console.error('Error no key Property');
-      // TODO generate a key
-    }
-
-    if (allIds.includes(jsObject[objectIdProperty])) {
-      return {'@id': jsObject[objectIdProperty]};
-    } else {
-      allIds.push(jsObject[objectIdProperty]);
-    }
-
-    // 3. exchange keys with URIs
-    for (const property of properties) {
-
-      if (property !== objectIdProperty) {
-        const newProperty = Reflect.getMetadata('RdfProperty', object, property);
-        // check if the value is an array
-        if (Array.isArray(jsObject[property])) {
-          jsObject[newProperty] = [];
-          if (typeof jsObject[property][0] === 'object') {
-            for (const elem of jsObject[property]) {
-              jsObject[newProperty].push(this.toJsonLd(elem, false, allIds));
-            }
-          } else {
-            jsObject[newProperty] = jsObject[property];
-          }
-        } else if (typeof jsObject[property] === 'object') {
-          jsObject[newProperty] = this.toJsonLd(jsObject[property], false, allIds);
-        } else {
-          let parseHint = Reflect.hasMetadata('Float', object, property);
-          if (parseHint) {
-            jsObject[newProperty] = parseFloat(jsObject[property]).toFixed(2);
-          } else {
-            jsObject[newProperty] = jsObject[property];
-          }
-        }
-      } else {
-        jsObject['@id'] = jsObject[property];
-      }
-      delete jsObject[property];
-    }
-    // console.log('2. Step (js Object with URIs as key): ' + JSON.stringify(jsObject));
-
-    // 4. add @type to object
-
-    // console.log('3. Step (add type): ' + JSON.stringify(jsObject));
-    const objectType = Reflect.getMetadata('RdfsClass', object.constructor);
-    jsObject['@type'] = objectType;
-
-    // 5. add @context to object
-    if (setContext) {
-      const tmp = {};
-      tmp['@graph'] = jsObject;
-      tmp['@context'] = this.context;
-      jsObject = tmp;
-    }
-    // console.log('testttest ' + JSON.stringify(jsObject));
-
-    return jsObject;
-  }
-
-  fromJsonLdType(obj: Object, type: String) {
-    let topElement = null;
-    let graph = obj['@graph'];
-    graph.forEach((elem, index) => {
-      if (elem['@type'] === type) {
-        topElement = elem;
-        obj['@graph'].splice(index, 1);
-      }
-    });
-    if (topElement != null) {
-      obj['@graph'].unshift(topElement);
-      return this.fromJsonLd(obj);
-    } else {
-      console.log("Element"  +type + " not found in graph");
-      return {};
-    }
-  }
-
-  fromJsonLdContainer(obj: Object, type: string): Array<any> {
-    let topElements: Array<string> = [];
-    let deserializedObjects: Array<any> = [];
-    let graph = obj['@graph'];
-    graph.forEach(elem => {
-      if (elem['@type'] === type) {
-        topElements.push(this.makeJsonLdGraphForElement(elem['@id'], obj, type));
-      }
-    });
-    topElements.forEach(topElement => {
-      deserializedObjects.push(this.fromJsonLdType(topElement, type));
-    });
-    return deserializedObjects;
-  }
-
-  makeJsonLdGraphForElement(id: string, obj: any, type: string): any {
-    let clonedObj = {} ;
-    clonedObj['@graph'] = [];
-    let graph = obj['@graph'];
-    graph.forEach(elem => {
-      if ((elem['@type'] === type && elem['@id'] !== id) || elem['@type'] === "sp:EntityContainer") {
-
-      } else {
-        clonedObj['@graph'].push(elem);
-      }
-    });
-    clonedObj['@context'] = obj['@context'];
-    return clonedObj;
-  }
-
-
-  /**
-   *
-   * @param {Object} obj
-   * @param {T} p
-   * @param {{}} ids
-   * @returns {any}
-   */
-  // fromJsonLd<T>(obj: Object, p: T, ids: {}= {}) {
-  fromJsonLd(obj: Object, ids: {}= {}, id?: string) {
-
-    const context = obj['@context'];
-    const graph = obj['@graph'];
-
-    // Get rdfs type of p
-    // const objectType: String = Reflect.getMetadata('RdfsClass', Person);
-
-    // Find first object in graph with this type
-    // TODO think what should happen when more of one types are in graph
-    let jsonObject = null;
-    // for (const o of graph) {
-    // const o = graph[0];
-    if (graph.length > 0) {
-      if (!isUndefined(id)) {
-        for (const elem of graph) {
-          if (elem['@id'] === id) {
-            jsonObject = elem;
-          }
-        }
-        if (isUndefined(jsonObject) || jsonObject == null) {
-          console.error('id ' + id + ' is not in graph. this should never happen');
-        }
-      } else {
-        jsonObject = graph[0];
-      }
-    } else if (!isUndefined(ids[id])) {
-      return ids[id];
-    } else {
-      console.log('FIX BUG: Pass id to fromJSON-LD');
-    }
-
-    // Create the result object
-    const c = this.classMapping[jsonObject['@type']];
-    if (isUndefined(c)) {
-      console.error('Type: ' + jsonObject['@type'] + ' is not registered in tsonld');
-    }
-    const result = new c();
-
-
-    for (const property in jsonObject) {
-      let objectProp: string;
-      // Remove the @type property
-      if (property === '@id') {
-        objectProp = Reflect.getMetadata('TsId', c.prototype, property);
-      } else {
-        objectProp = Reflect.getMetadata('TsProperty', c.prototype, property);
-      }
-      // skip the @type property
-      if (property !== '@type') {
-        // check whether property is object or literal
-        if (typeof jsonObject[property] === 'object'  && !isUndefined(objectProp)) {
-          // check if object or array
-          if (Array.isArray(jsonObject[property])) {
-            // TODO check if needed
-            result[objectProp] = [];
-            // ARRAY
-            if (jsonObject[property].length > 0 && typeof jsonObject[property][0] === 'object') {
-              for (const elem of jsonObject[property]) {
-
-                // 1. check if already deserialized
-                if (!isUndefined(ids[elem['@id']])) {
-                  // TODO never called
-
-                } else {
-                  // 2. deserialize
-                  // remove current object from graph
-                  const tmpIndex = graph.indexOf(jsonObject, 0);
-                  if (tmpIndex > -1) {
-                    graph.splice(tmpIndex, 1);
-                  }
-
-                  const newObj = {'@context': context, '@graph': graph};
-
-                  ids[jsonObject['@id']] = result;
-
-                  const arrayResult = this.fromJsonLd(newObj, ids, elem['@id']);
-
-                  // TODO hot fix not sure if it works for all cases
-                  // graph.splice(0, 1);
-                  const index = graph.indexOf(jsonObject, 0);
-                  if (index > -1) {
-                    graph.splice(index, 1);
-                  }
-                  result[objectProp].push(arrayResult);
-
-                }
-              }
-            } else {
-              // ARRAY of literals
-              result[objectProp] = jsonObject[property];
-            }
-
-          } else {
-            // NO ARRAY
-            // console.log('bbbb ' + jsonObject[property] + ' xxxx ' + Array.isArray(jsonObject[property]));
-
-            // if (Array.isArray(result[objectProp])) {
-
-            // check if already deserialized
-            if (!isUndefined(ids[jsonObject[property]['@id']])) {
-              // when already desirialized use object from stored array
-
-              // case where array just has one element (this is serialized as an object)
-
-              if (Array.isArray(result[objectProp])) {
-                result[objectProp] = [ids[jsonObject[property]['@id']]];
-                // result[objectProp] = ids[jsonObject[property]['@id']];
-              } else {
-                result[objectProp] = ids[jsonObject[property]['@id']];
-              }
-            } else {
-              // if not recursion and add to ids array
-              const index = graph.indexOf(jsonObject, 0);
-              if (index > -1) {
-                graph.splice(index, 1);
-              }
-              const newObj = {'@context': context, '@graph': graph};
-              ids[jsonObject['@id']] = result;
-
-              // console.log('ddddd: ' + JSON.stringify(ids,null, 2));
-              const current_id = jsonObject[property]['@id'];
-              if (!isUndefined(current_id)) {
-                // TODO last statement either 0 or now graph does not contain object id with more
-                if (Object.keys(jsonObject[property]).length === 1 && isUndefined(ids[current_id]) && !this.containsIdObject(newObj['@graph'], current_id)) {
-
-                  // ids does not contain
-                  result[objectProp] = jsonObject[property]['@id'];
-
-                } else {
-                  // if object just contains an @id initialize it as a string
-                  const nestedResult = this.fromJsonLd(newObj, ids, jsonObject[property]['@id']);
-                  // case where array just has one element (this is serialized as an object)
-
-                  if (Array.isArray(result[objectProp])) {
-
-                    result[objectProp] = [nestedResult];
-                  } else {
-                    result[objectProp] = nestedResult;
-                  }
-                }
-              } else {
-                // TODO check with Philipp
-                let type = jsonObject[property]['@type'];
-                if(type === 'xsd:boolean') {
-                  if (jsonObject[property]['@value'].toLowerCase() === "true") {
-                    result[objectProp] = true;
-                  } else {
-                    result[objectProp] = false;
-                  }
-                } else if (type === 'xsd:int' || type === 'xsd:double' || type === 'xsd:float') {
-                  result[objectProp] = +jsonObject[property]['@value'];
-                } else {
-                  result[objectProp] = jsonObject[property]['@value'];
-                }
-              }
-            }
-          }
-        } else {
-          if (!isUndefined(objectProp)) {
-            result[objectProp] = jsonObject[property];
-          }
-        }
-      }
-    }
-
-// TODO add handling for and for nested properties
-    return result;
-
-  }
-  // }
-
-  public containsIdObject(array: any[], id: string): boolean {
-    let result = false;
-
-    for (const entry of array) {
-      if (entry['@id'] === id && Object.keys(entry).length > 1) {
-       result = true;
-      }
-
-    }
-
-    return result;
-  }
-}
-
-function prop<T, K extends keyof T>(obj: T, key: K) {
-  return obj[key];
-}
-
-