package org.etsi.mts.tdl.execution.java.rt.core;

import java.util.ArrayList;
import java.util.List;

import org.etsi.mts.tdl.execution.java.tri.Element;
import org.etsi.mts.tdl.execution.java.tri.ElementAnnotation;

public class ElementImpl implements Element {

	protected String name;


	private List<ElementAnnotation> annotations = new ArrayList<ElementAnnotation>();

	public ElementImpl() {
	}

	public ElementImpl(String name) {
		this.name = name;
	}

	@Override
	public String getName() {
		return name;
	}

	@Override
	public List<ElementAnnotation> getAnnotations() {
		return annotations;
	}


	public void setAnnotations(List<ElementAnnotation> annotations) {
		this.annotations = annotations;
	}
	
	public ElementImpl addAnnotation(String key, String value) {
		this.getAnnotations().add(new ElementAnnotationImpl(key, value));
		return this;
	}
}
