package com.persagy.adm.diagram.core.model;

import com.google.gson.annotations.Expose;
import com.persagy.adm.diagram.core.model.style.LineStyle;

/**
 * 线的基类
 * @author zhaoyk
 */
abstract public class AbstractLine {

	@Expose
	protected String id;

	@Expose
	protected String name;

	@Expose
	protected LineStyle lineStyle;

	@Expose
	protected Label label;

	/**
	 * 绑定的数据对象，可能为设备或关系
	 */
	private Object dataObject;

	/**
	 * 设备对象或者关系的id
	 */
	@Expose
	private String dataObjectId;

	/**
	 * 自动布局计算
	 */
	abstract public void layout(Object layoutContext);

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public LineStyle getLineStyle() {
		return lineStyle;
	}

	public void setLineStyle(LineStyle lineStyle) {
		this.lineStyle = lineStyle;
	}

	public Label getLabel() {
		return label;
	}

	public void setLabel(Label label) {
		this.label = label;
	}

	public Object getDataObject() {
		return dataObject;
	}

	public void setDataObject(Object dataObject) {
		this.dataObject = dataObject;
	}

	public String getDataObjectId() {
		return dataObjectId;
	}

	public void setDataObjectId(String dataObjectId) {
		this.dataObjectId = dataObjectId;
	}

}
