01: package org.enhydra.shark.xpdl.elements;
02:
03: import org.enhydra.shark.xpdl.XMLAttribute;
04: import org.enhydra.shark.xpdl.XMLCollectionElement;
05:
06: /**
07: * Represents coresponding element from XPDL schema.
08: *
09: * @author Sasa Bojanic
10: */
11: public class Participant extends XMLCollectionElement {
12:
13: public Participant(Participants parent) {
14: super (parent, true);
15: }
16:
17: protected void fillStructure() {
18: XMLAttribute attrName = new XMLAttribute(this , "Name", false);
19: ParticipantType refParticipantType = new ParticipantType(this );
20: Description refDescription = new Description(this ); // min=0
21: ExternalReference refExternalReference = new ExternalReference(
22: this , false); // min=0
23: ExtendedAttributes refExtendedAttributes = new ExtendedAttributes(
24: this ); // min=0
25:
26: super .fillStructure();
27: add(attrName);
28: add(refParticipantType);
29: add(refDescription);
30: add(refExternalReference);
31: add(refExtendedAttributes);
32: }
33:
34: public String getName() {
35: return get("Name").toValue();
36: }
37:
38: public void setName(String name) {
39: set("Name", name);
40: }
41:
42: public String getDescription() {
43: return get("Description").toValue();
44: }
45:
46: public void setDescription(String description) {
47: set("Description", description);
48: }
49:
50: public ExtendedAttributes getExtendedAttributes() {
51: return (ExtendedAttributes) get("ExtendedAttributes");
52: }
53:
54: public ExternalReference getExternalReference() {
55: return (ExternalReference) get("ExternalReference");
56: }
57:
58: public ParticipantType getParticipantType() {
59: return (ParticipantType) get("ParticipantType");
60: }
61: }
|