jadex.bpmn.model.MNamedIdElement Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-kernel-bpmn Show documentation
Show all versions of jadex-kernel-bpmn Show documentation
The Jadex BPMN kernel provides a workflow kernel
for the standardized business process modeling
notation. The kernel relies on annotated BPMN
diagrams, which include detailed execution
information.
package jadex.bpmn.model;
import jadex.commons.SUtil;
import java.util.HashMap;
import java.util.Map;
/**
* Base class for named id elements.
*/
public class MNamedIdElement extends MAnnotationElement
{
//-------- attributes --------
/** The name. */
protected String name;
/** The description. */
protected String description;
/** The properties. */
protected Map properties;
//-------- methods ---------
/**
* Get the full description of the model element.
* @return The description.
*/
public String getDescription()
{
return description;
}
/**
* Set the description.
* @param description the description to set
*/
public void setDescription(String description)
{
this.description = description;
}
/**
* Get the name.
* @return The name.
*/
public String getName()
{
return name;
}
/**
* Set the name.
* @param name The name to set.
*/
public void setName(String name)
{
this.name = name;
}
/**
* Get a declared value from the model.
* @param name The name.
*/
public void setPropertyValue(String name, Object value)
{
if(properties==null)
properties = new HashMap();
properties.put(name, value);
}
/**
* Get a property value from the model.
* @param name The name.
*/
public Object getPropertyValue(String name)
{
Object ret = null;
if(properties!=null)
ret = properties.get(name);
return ret;
}
/**
* Test, if a property is declared.
* @param name The property name.
* @return True, if the property is declared.
*/
public boolean hasPropertyValue(String name)
{
return properties!=null && properties.containsKey(name);
}
/**
* Get all property names.
* @return All property names.
*/
public String[] getPropertyNames()
{
return properties!=null? (String[])properties.keySet().toArray(new String[properties.size()]): SUtil.EMPTY_STRING_ARRAY;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy