All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.yaoqiang.bpmn.model.elementsTextAnnotation Maven / Gradle / Ivy

package org.yaoqiang.bpmn.model.elements.artifacts;

import org.yaoqiang.bpmn.model.elements.XMLAttribute;
import org.yaoqiang.bpmn.model.elements.XMLTextElement;

/**
 * TextAnnotation
 * 
 * @author Shi Yaoqiang([email protected])
 */
public class TextAnnotation extends Artifact {

	private static final long serialVersionUID = 8782675899592633790L;

	public TextAnnotation(String text) {
		this((Artifacts) null);
		setText(text);
	}

	public TextAnnotation(Artifacts parent) {
		super(parent, "textAnnotation");
	}

	protected void fillStructure() {
		XMLAttribute attrTextFormat = new XMLAttribute(this, "textFormat", "text/plain");
		XMLTextElement refText = new XMLTextElement(this, "text");

		super.fillStructure();
		add(attrTextFormat);
		add(refText);
	}

	public Artifacts getParent() {
		return (Artifacts) parent;
	}

	public final String getText() {
		return get("text").toValue();
	}

	public final void setText(String text) {
		set("text", text);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy