*/
public Element getElement() {
ensureValidity();
Element dep = new Element("subservice", "");
dep.addAttribute(new Attribute("action", "instantiate"));
dep.addAttribute(new Attribute("specification", m_specification));
if (m_filter != null) {
dep.addAttribute(new Attribute("filter", m_filter));
}
if (m_comparator != null) {
dep.addAttribute(new Attribute("comparator", m_comparator));
}
if (m_optional) {
dep.addAttribute(new Attribute("optional", "true"));
}
if (m_aggregate) {
dep.addAttribute(new Attribute("aggregate", "true"));
}
if (m_policy == DependencyModel.DYNAMIC_BINDING_POLICY) {
dep.addAttribute(new Attribute("policy", "dynamic"));
} else if (m_policy == DependencyModel.STATIC_BINDING_POLICY) {
dep.addAttribute(new Attribute("policy", "static"));
} else if (m_policy == DependencyModel.DYNAMIC_PRIORITY_BINDING_POLICY) {
dep.addAttribute(new Attribute("policy", "dynamic-priority"));
}
for (int i = 0; i < m_conf.size(); i++) {
Element elem = (Element) m_conf.get(i);
dep.addElement(elem);