diff --git a/src/app/cartography/converters/map/drawing-to-map-drawing-converter.ts b/src/app/cartography/converters/map/drawing-to-map-drawing-converter.ts index a68e700a..e6d2ff09 100644 --- a/src/app/cartography/converters/map/drawing-to-map-drawing-converter.ts +++ b/src/app/cartography/converters/map/drawing-to-map-drawing-converter.ts @@ -1,8 +1,8 @@ import { Injectable } from "@angular/core"; -import { Converter } from "./converter"; -import { Drawing } from "../models/drawing"; -import { MapDrawing } from "../models/map/map-drawing"; +import { Converter } from "../converter"; +import { Drawing } from "../../models/drawing"; +import { MapDrawing } from "../../models/map/map-drawing"; @Injectable() diff --git a/src/app/cartography/converters/map/label-to-map-label-converter.ts b/src/app/cartography/converters/map/label-to-map-label-converter.ts index 14e19d24..0501978f 100644 --- a/src/app/cartography/converters/map/label-to-map-label-converter.ts +++ b/src/app/cartography/converters/map/label-to-map-label-converter.ts @@ -1,8 +1,8 @@ import { Injectable } from "@angular/core"; -import { Converter } from "./converter"; -import { Label } from "../models/label"; -import { MapLabel } from "../models/map/map-label"; +import { Converter } from "../converter"; +import { Label } from "../../models/label"; +import { MapLabel } from "../../models/map/map-label"; @Injectable() diff --git a/src/app/cartography/converters/map/link-node-to-map-link-node-converter.ts b/src/app/cartography/converters/map/link-node-to-map-link-node-converter.ts index bf3e84b0..281a8e2b 100644 --- a/src/app/cartography/converters/map/link-node-to-map-link-node-converter.ts +++ b/src/app/cartography/converters/map/link-node-to-map-link-node-converter.ts @@ -1,8 +1,8 @@ import { Injectable } from "@angular/core"; -import { Converter } from "./converter"; -import { LinkNode } from "../../models/link-node"; -import { MapLinkNode } from "../models/map/map-link-node"; +import { Converter } from "../converter"; +import { LinkNode } from "../../../models/link-node"; +import { MapLinkNode } from "../../models/map/map-link-node"; import { LabelToMapLabelConverter } from "./label-to-map-label-converter"; diff --git a/src/app/cartography/converters/map/link-to-map-link-converter.ts b/src/app/cartography/converters/map/link-to-map-link-converter.ts index bc44411f..bda414f7 100644 --- a/src/app/cartography/converters/map/link-to-map-link-converter.ts +++ b/src/app/cartography/converters/map/link-to-map-link-converter.ts @@ -1,8 +1,8 @@ import { Injectable } from "@angular/core"; -import { Converter } from "./converter"; -import { MapLink } from "../models/map/map-link"; -import { Link } from "../../models/link"; +import { Converter } from "../converter"; +import { MapLink } from "../../models/map/map-link"; +import { Link } from "../../../models/link"; import { LinkNodeToMapLinkNodeConverter } from "./link-node-to-map-link-node-converter"; diff --git a/src/app/cartography/converters/map/map-drawing-to-drawing-converter.ts b/src/app/cartography/converters/map/map-drawing-to-drawing-converter.ts index ee3e44ce..04347c0e 100644 --- a/src/app/cartography/converters/map/map-drawing-to-drawing-converter.ts +++ b/src/app/cartography/converters/map/map-drawing-to-drawing-converter.ts @@ -1,8 +1,8 @@ import { Injectable } from "@angular/core"; -import { Converter } from "./converter"; -import { Drawing } from "../models/drawing"; -import { MapDrawing } from "../models/map/map-drawing"; +import { Converter } from "../converter"; +import { Drawing } from "../../models/drawing"; +import { MapDrawing } from "../../models/map/map-drawing"; @Injectable() diff --git a/src/app/cartography/converters/map/map-label-to-label-converter.ts b/src/app/cartography/converters/map/map-label-to-label-converter.ts index 4043f4fa..1a0ca88d 100644 --- a/src/app/cartography/converters/map/map-label-to-label-converter.ts +++ b/src/app/cartography/converters/map/map-label-to-label-converter.ts @@ -1,8 +1,8 @@ import { Injectable } from "@angular/core"; -import { Converter } from "./converter"; -import { Label } from "../models/label"; -import { MapLabel } from "../models/map/map-label"; +import { Converter } from "../converter"; +import { Label } from "../../models/label"; +import { MapLabel } from "../../models/map/map-label"; @Injectable() diff --git a/src/app/cartography/converters/map/map-link-node-to-link-node-converter.ts b/src/app/cartography/converters/map/map-link-node-to-link-node-converter.ts index 1b3f9d71..9afbd415 100644 --- a/src/app/cartography/converters/map/map-link-node-to-link-node-converter.ts +++ b/src/app/cartography/converters/map/map-link-node-to-link-node-converter.ts @@ -1,8 +1,8 @@ import { Injectable } from "@angular/core"; -import { Converter } from "./converter"; -import { LinkNode } from "../../models/link-node"; -import { MapLinkNode } from "../models/map/map-link-node"; +import { Converter } from "../converter"; +import { LinkNode } from "../../../models/link-node"; +import { MapLinkNode } from "../../models/map/map-link-node"; import { MapLabelToLabelConverter } from "./map-label-to-label-converter"; diff --git a/src/app/cartography/converters/map/map-link-to-link-converter.ts b/src/app/cartography/converters/map/map-link-to-link-converter.ts index e4875d26..1e43ce9c 100644 --- a/src/app/cartography/converters/map/map-link-to-link-converter.ts +++ b/src/app/cartography/converters/map/map-link-to-link-converter.ts @@ -1,8 +1,8 @@ import { Injectable } from "@angular/core"; -import { Converter } from "./converter"; -import { MapLink } from "../models/map/map-link"; -import { Link } from "../../models/link"; +import { Converter } from "../converter"; +import { MapLink } from "../../models/map/map-link"; +import { Link } from "../../../models/link"; import { MapLinkNodeToLinkNodeConverter } from "./map-link-node-to-link-node-converter"; diff --git a/src/app/cartography/converters/map/map-node-to-node-converter.1.ts b/src/app/cartography/converters/map/map-node-to-node-converter.ts similarity index 91% rename from src/app/cartography/converters/map/map-node-to-node-converter.1.ts rename to src/app/cartography/converters/map/map-node-to-node-converter.ts index 2e630951..49682162 100644 --- a/src/app/cartography/converters/map/map-node-to-node-converter.1.ts +++ b/src/app/cartography/converters/map/map-node-to-node-converter.ts @@ -1,8 +1,8 @@ import { Injectable } from "@angular/core"; -import { Converter } from "./converter"; -import { MapNode } from "../models/map/map-node"; -import { Node } from "../models/node"; +import { Converter } from "../converter"; +import { MapNode } from "../../models/map/map-node"; +import { Node } from "../../models/node"; import { MapLabelToLabelConverter } from "./map-label-to-label-converter"; import { MapPortToPortConverter } from "./map-port-to-port-converter"; diff --git a/src/app/cartography/converters/map/map-port-to-port-converter.ts b/src/app/cartography/converters/map/map-port-to-port-converter.ts index ccb6296e..77b708ab 100644 --- a/src/app/cartography/converters/map/map-port-to-port-converter.ts +++ b/src/app/cartography/converters/map/map-port-to-port-converter.ts @@ -1,8 +1,8 @@ import { Injectable } from "@angular/core"; -import { Converter } from "./converter"; -import { MapPort } from "../models/map/map-port"; -import { Port } from "../../models/port"; +import { Converter } from "../converter"; +import { MapPort } from "../../models/map/map-port"; +import { Port } from "../../../models/port"; @Injectable() diff --git a/src/app/cartography/converters/map/map-symbol-to-symbol-converter.ts b/src/app/cartography/converters/map/map-symbol-to-symbol-converter.ts new file mode 100644 index 00000000..d48152e1 --- /dev/null +++ b/src/app/cartography/converters/map/map-symbol-to-symbol-converter.ts @@ -0,0 +1,18 @@ +import { Injectable } from "@angular/core"; + +import { Converter } from "../converter"; +import { MapSymbol } from "../../models/map/map-symbol"; +import { Symbol } from "../../../models/symbol"; + + +@Injectable() +export class MapSymbolToSymbolConverter implements Converter { + convert(mapSymbol: MapSymbol) { + const symbol = new Symbol(); + symbol.symbol_id = mapSymbol.id; + symbol.builtin = mapSymbol.builtin; + symbol.filename = mapSymbol.filename; + symbol.raw = mapSymbol.raw; + return symbol; + } +} diff --git a/src/app/cartography/converters/map/node-to-map-node-converter.ts b/src/app/cartography/converters/map/node-to-map-node-converter.ts index d22fc5d1..2019d1a5 100644 --- a/src/app/cartography/converters/map/node-to-map-node-converter.ts +++ b/src/app/cartography/converters/map/node-to-map-node-converter.ts @@ -1,8 +1,8 @@ import { Injectable } from "@angular/core"; -import { Converter } from "./converter"; -import { MapNode } from "../models/map/map-node"; -import { Node } from "../models/node"; +import { Converter } from "../converter"; +import { MapNode } from "../../models/map/map-node"; +import { Node } from "../../models/node"; import { LabelToMapLabelConverter } from "./label-to-map-label-converter"; import { PortToMapPortConverter } from "./port-to-map-port-converter"; diff --git a/src/app/cartography/converters/map/port-to-map-port-converter.ts b/src/app/cartography/converters/map/port-to-map-port-converter.ts index 08769ef8..c709fb80 100644 --- a/src/app/cartography/converters/map/port-to-map-port-converter.ts +++ b/src/app/cartography/converters/map/port-to-map-port-converter.ts @@ -1,8 +1,8 @@ import { Injectable } from "@angular/core"; -import { Converter } from "./converter"; -import { MapPort } from "../models/map/map-port"; -import { Port } from "../../models/port"; +import { Converter } from "../converter"; +import { MapPort } from "../../models/map/map-port"; +import { Port } from "../../../models/port"; @Injectable() diff --git a/src/app/cartography/converters/map/symbol-to-map-symbol-converter.ts b/src/app/cartography/converters/map/symbol-to-map-symbol-converter.ts new file mode 100644 index 00000000..66b35e7b --- /dev/null +++ b/src/app/cartography/converters/map/symbol-to-map-symbol-converter.ts @@ -0,0 +1,18 @@ +import { Injectable } from "@angular/core"; + +import { Converter } from "../converter"; +import { MapSymbol } from "../../models/map/map-symbol"; +import { Symbol } from "../../../models/symbol"; + + +@Injectable() +export class SymbolToMapSymbolConverter implements Converter { + convert(symbol: Symbol) { + const mapSymbol = new MapSymbol(); + mapSymbol.id = symbol.symbol_id; + mapSymbol.builtin = symbol.builtin; + mapSymbol.filename = symbol.filename; + mapSymbol.raw = symbol.raw; + return mapSymbol; + } +} diff --git a/src/app/cartography/models/map/map-symbol.ts b/src/app/cartography/models/map/map-symbol.ts new file mode 100644 index 00000000..506ce09e --- /dev/null +++ b/src/app/cartography/models/map/map-symbol.ts @@ -0,0 +1,6 @@ +export class MapSymbol { + id: string; + builtin: boolean; + filename: string; + raw: string; +}