001: package org.enhydra.shark.xpdl.elements;
002:
003: import org.enhydra.shark.xpdl.XMLAttribute;
004: import org.enhydra.shark.xpdl.XMLComplexElement;
005: import org.enhydra.shark.xpdl.XPDLConstants;
006:
007: /**
008: * Represents coresponding element from XPDL schema.
009: *
010: * @author Sasa Bojanic
011: */
012: public class RedefinableHeader extends XMLComplexElement {
013:
014: public RedefinableHeader(Package parent) {
015: super (parent, false);
016: }
017:
018: public RedefinableHeader(WorkflowProcess parent) {
019: super (parent, false);
020: }
021:
022: protected void fillStructure() {
023: XMLAttribute attrPublicationStatus = new XMLAttribute(
024: this ,
025: "PublicationStatus",
026: false,
027: new String[] {
028: XPDLConstants.PUBLICATION_STATUS_NONE,
029: XPDLConstants.PUBLICATION_STATUS_UNDER_REVISION,
030: XPDLConstants.PUBLICATION_STATUS_RELEASED,
031: XPDLConstants.PUBLICATION_STATUS_UNDER_TEST },
032: 0);
033: Author refAuthor = new Author(this ); // min=0
034: Version refVersion = new Version(this ); // min=0
035: Codepage refCodepage = new Codepage(this ); // min=0
036: Countrykey refCountrykey = new Countrykey(this ); // min=0
037: Responsibles refResponsibles = new Responsibles(this ); // min=0
038:
039: add(attrPublicationStatus);
040: add(refAuthor);
041: add(refVersion);
042: add(refCodepage);
043: add(refCountrykey);
044: add(refResponsibles);
045: }
046:
047: public XMLAttribute getPublicationStatusAttribute() {
048: return (XMLAttribute) get("PublicationStatus");
049: }
050:
051: public String getPublicationStatus() {
052: return getPublicationStatusAttribute().toValue();
053: }
054:
055: public void setPublicationStatusNONE() {
056: getPublicationStatusAttribute().setValue(
057: XPDLConstants.PUBLICATION_STATUS_NONE);
058: }
059:
060: public void setPublicationStatusUNDER_REVISION() {
061: getPublicationStatusAttribute().setValue(
062: XPDLConstants.PUBLICATION_STATUS_UNDER_REVISION);
063: }
064:
065: public void setPublicationStatusRELEASED() {
066: getPublicationStatusAttribute().setValue(
067: XPDLConstants.PUBLICATION_STATUS_RELEASED);
068: }
069:
070: public void setPublicationStatusUNDER_TEST() {
071: getPublicationStatusAttribute().setValue(
072: XPDLConstants.PUBLICATION_STATUS_UNDER_TEST);
073: }
074:
075: public String getAuthor() {
076: return get("Author").toValue();
077: }
078:
079: public void setAuthor(String author) {
080: set("Author", author);
081: }
082:
083: public String getVersion() {
084: return get("Version").toValue();
085: }
086:
087: public void setVersion(String version) {
088: set("Version", version);
089: }
090:
091: public String getCodepage() {
092: return get("Codepage").toValue();
093: }
094:
095: public void setCodepage(String codepage) {
096: set("Codepage", codepage);
097: }
098:
099: public String getCountrykey() {
100: return get("Countrykey").toValue();
101: }
102:
103: public void setCountrykey(String countrykey) {
104: set("Countrykey", countrykey);
105: }
106:
107: public Responsibles getResponsibles() {
108: return (Responsibles) get("Responsibles");
109: }
110:
111: }
|