|
@@ -1,19 +1,40 @@
|
|
|
import { SParser } from "./SParser";
|
|
|
import { ElementData } from "../types/ElementData";
|
|
|
-import { Node } from "../types/topology/Node";
|
|
|
+import { Legend } from "../types/topology/Legend";
|
|
|
import { Marker } from "../types/topology/Marker";
|
|
|
import { Relation } from "../types/topology/Relation";
|
|
|
-import { SMarkerItem, SEntityItem, SRelation } from "..";
|
|
|
+import {
|
|
|
+ SImageLegendItem,
|
|
|
+ SLineLegendItem,
|
|
|
+ SNoneLegendItem,
|
|
|
+ SRelation,
|
|
|
+ SZoneLegendItem,
|
|
|
+ SImageMarkerItem,
|
|
|
+ SLineMarkerItem,
|
|
|
+ STextMarkerItem
|
|
|
+} from "..";
|
|
|
|
|
|
/**
|
|
|
* 拓扑图信息解析器
|
|
|
*
|
|
|
*/
|
|
|
export class STopologyParser extends SParser {
|
|
|
- /** 图例节点list */
|
|
|
- nodeList: SEntityItem[] = [];
|
|
|
- /** 标识对象list */
|
|
|
- markersList: SMarkerItem[] = [];
|
|
|
+ /** 图例list(非图例类型) */
|
|
|
+ noneLegendList: SNoneLegendItem[] = [];
|
|
|
+ /** 图例list(线类型) */
|
|
|
+ lineLegendList: SLineLegendItem[] = [];
|
|
|
+ /** 图例list(区域类型) */
|
|
|
+ zoneLegendList: SZoneLegendItem[] = [];
|
|
|
+ /** 图例list(图标类型) */
|
|
|
+ imageLegendList: SImageLegendItem[] = [];
|
|
|
+
|
|
|
+ /** 标识list(图类型) */
|
|
|
+ imageMarkerList: SImageMarkerItem[] = [];
|
|
|
+ /** 标识list(线类型) */
|
|
|
+ lineMarkerList: SLineMarkerItem[] = [];
|
|
|
+ /** 标识list(文本类型) */
|
|
|
+ textMarkerList: STextMarkerItem[] = [];
|
|
|
+
|
|
|
/** 管线关系对象关系list */
|
|
|
relationList: SRelation[] = [];
|
|
|
|
|
@@ -24,7 +45,7 @@ export class STopologyParser extends SParser {
|
|
|
* */
|
|
|
parseData(data: ElementData): void {
|
|
|
if (data.Nodes) {
|
|
|
- data.Nodes.forEach((t: Node): void => {
|
|
|
+ data.Nodes.forEach((t: Legend): void => {
|
|
|
this.addNode(t);
|
|
|
});
|
|
|
}
|
|
@@ -45,9 +66,9 @@ export class STopologyParser extends SParser {
|
|
|
*
|
|
|
* @param t 图例节点数据
|
|
|
* */
|
|
|
- private addNode(t: Node): void {
|
|
|
+ private addNode(t: Legend): void {
|
|
|
let item = this.factory.createNode(t);
|
|
|
- this.nodeList.push(item);
|
|
|
+ // this.nodeList.push(item);
|
|
|
} // Function addNode()
|
|
|
|
|
|
/**
|
|
@@ -57,7 +78,7 @@ export class STopologyParser extends SParser {
|
|
|
* */
|
|
|
private addMarker(t: Marker): void {
|
|
|
let item = this.factory.createMarker(t);
|
|
|
- this.markersList.push(item);
|
|
|
+ // this.markersList.push(item);
|
|
|
} // Function addMarker()
|
|
|
|
|
|
/**
|