package com.jxml.quick.model.qiml;

import java.util.ArrayList;

/**
 * ElementDefinition -
 * 
 * elementDefinition: Defines an XML element (or an XML attribute, or an attribute list), and 
 * a mapping to an instance of a Java class.
 * The target held by elementDefinition defines both the processing of the 
 * XML element's text content (or the XML attribute's value) and how the object is constructed.
 * The elementDefinition's held by elementDefinition (or referenced via a link) are the subclasses.
 * Subclass elements can occur within an XML document anywhere the parent element can occur.
 * And when an element can be used as a root, so too can its subclasses.
 * The children (childSelection, childSequence, childElement) held by
 * elementDefinition define the element content of the element.
 * The first child of an element is always the list of attributes.
 * (Attributes have no element content.)
 * (The children of an attribute list are the attributes.)
 */
public class ElementDefinition {

    /** The bimodal attribute indicates that the element is bimodal. */
    protected boolean bimodal_6 = false;

    /**
     * The cdata indicates that the element content should be expressed as
     * CDATA.
     */
    protected boolean cdata_10 = false;

    /**
     * The conditional attribute controls the expression of an XML element (or
     * an 
     * 
XML idref attribute).
     * 
Use conditional only when dealing with recursive data structures (like
     * QIML).
     * 
When true, an element is not expressed if it has already been expressed
     * within a document,
     * 
(and an idref attribute will only be expressed if the referenced
     * element has already
     * 
been expressed).
     */
    protected boolean conditional_9 = false;

    /** The isIdRef indicates that the attribute is an idref. */
    protected boolean isIdRef_8 = false;

    /**
     * The tagName gives the name of an XML element (or attribute).
     * 
There is no requirement that the tagName be unique.
     * 
(This allows each XML element to effectively define its own namespace.)
     */
    protected String tagName_4;

    /**
     * The wild attribute indicates that the tagName of the XML element
     * 
(or attribute) is not fixed, and that the object itself holds the
     * tagName.
     */
    protected boolean wild_5 = false;

    /** list of Rem */
    protected ArrayList rem_11 = new ArrayList();

    protected Target target_12;

    protected ArrayList derivedCoins_13 = new ArrayList();

    /** list of ContentModel */
    protected ArrayList contentModel_14 = new ArrayList();


    public ElementDefinition() {
    }

    /** full constructor */
    public ElementDefinition(boolean bimodal_6, boolean cdata_10, boolean conditional_9, boolean isIdRef_8, String tagName_4, boolean wild_5, ArrayList rem_11, Target target_12, ArrayList derivedCoins_13, ArrayList contentModel_14) {
        this.bimodal_6 = bimodal_6;
        this.cdata_10 = cdata_10;
        this.conditional_9 = conditional_9;
        this.isIdRef_8 = isIdRef_8;
        this.tagName_4 = tagName_4;
        this.wild_5 = wild_5;
        if (rem_11 != null)    
            this.rem_11 = rem_11;
        this.target_12 = target_12;
        if (derivedCoins_13 != null)    
            this.derivedCoins_13 = derivedCoins_13;
        if (contentModel_14 != null)    
            this.contentModel_14 = contentModel_14;
    }

    /** minimum constructor */
    public ElementDefinition(Target target_12) {
        this.target_12 = target_12;
    }

    /** The bimodal attribute indicates that the element is bimodal. */
    public boolean getBimodal_6() {
        return(bimodal_6);
    }

    /** The bimodal attribute indicates that the element is bimodal. */
    public void setBimodal_6(boolean bimodal_6) {
        this.bimodal_6 = bimodal_6;
    }

    /**
     * The cdata indicates that the element content should be expressed as
     * CDATA.
     */
    public boolean getCdata_10() {
        return(cdata_10);
    }

    /**
     * The cdata indicates that the element content should be expressed as
     * CDATA.
     */
    public void setCdata_10(boolean cdata_10) {
        this.cdata_10 = cdata_10;
    }

    /**
     * The conditional attribute controls the expression of an XML element (or
     * an 
     * 
XML idref attribute).
     * 
Use conditional only when dealing with recursive data structures (like
     * QIML).
     * 
When true, an element is not expressed if it has already been expressed
     * within a document,
     * 
(and an idref attribute will only be expressed if the referenced
     * element has already
     * 
been expressed).
     */
    public boolean getConditional_9() {
        return(conditional_9);
    }

    /**
     * The conditional attribute controls the expression of an XML element (or
     * an 
     * 
XML idref attribute).
     * 
Use conditional only when dealing with recursive data structures (like
     * QIML).
     * 
When true, an element is not expressed if it has already been expressed
     * within a document,
     * 
(and an idref attribute will only be expressed if the referenced
     * element has already
     * 
been expressed).
     */
    public void setConditional_9(boolean conditional_9) {
        this.conditional_9 = conditional_9;
    }

    /** The isIdRef indicates that the attribute is an idref. */
    public boolean getIsIdRef_8() {
        return(isIdRef_8);
    }

    /** The isIdRef indicates that the attribute is an idref. */
    public void setIsIdRef_8(boolean isIdRef_8) {
        this.isIdRef_8 = isIdRef_8;
    }

    /**
     * The tagName gives the name of an XML element (or attribute).
     * 
There is no requirement that the tagName be unique.
     * 
(This allows each XML element to effectively define its own namespace.)
     */
    public String getTagName_4() {
        return(tagName_4);
    }

    /**
     * The tagName gives the name of an XML element (or attribute).
     * 
There is no requirement that the tagName be unique.
     * 
(This allows each XML element to effectively define its own namespace.)
     */
    public void setTagName_4(String tagName_4) {
        this.tagName_4 = tagName_4;
    }

    /**
     * The wild attribute indicates that the tagName of the XML element
     * 
(or attribute) is not fixed, and that the object itself holds the
     * tagName.
     */
    public boolean getWild_5() {
        return(wild_5);
    }

    /**
     * The wild attribute indicates that the tagName of the XML element
     * 
(or attribute) is not fixed, and that the object itself holds the
     * tagName.
     */
    public void setWild_5(boolean wild_5) {
        this.wild_5 = wild_5;
    }

    /** list of Rem */
    public ArrayList getRem_11() {
        return(rem_11);
    }

    /** list of Rem */
    public void setRem_11(ArrayList rem_11) {
        this.rem_11 = rem_11;
    }

    public Rem getRem(int i) {
        return((Rem)rem_11.get(i));
    }

    public void setRem(int i, Rem rem) {
        rem_11.set(i, rem);
    }

    public int remCount() {
        return(rem_11.size());
    }

    public void addRem(Rem rem) {
        rem_11.add(rem);
    }

    public Target getTarget_12() {
        return(target_12);
    }

    public void setTarget_12(Target target_12) {
        this.target_12 = target_12;
    }

    public ArrayList getDerivedCoins_13() {
        return(derivedCoins_13);
    }

    public void setDerivedCoins_13(ArrayList derivedCoins_13) {
        this.derivedCoins_13 = derivedCoins_13;
    }

    public void addElementDefinition(ElementDefinition elementDefinition) {
        derivedCoins_13.add(elementDefinition);
    }

    /** list of ContentModel */
    public ArrayList getContentModel_14() {
        return(contentModel_14);
    }

    /** list of ContentModel */
    public void setContentModel_14(ArrayList contentModel_14) {
        this.contentModel_14 = contentModel_14;
    }

    public ContentModel getContentModel(int i) {
        return((ContentModel)contentModel_14.get(i));
    }

    public void setContentModel(int i, ContentModel contentModel) {
        contentModel_14.set(i, contentModel);
    }

    public int contentModelCount() {
        return(contentModel_14.size());
    }

    public void addContentModel(ContentModel contentModel) {
        contentModel_14.add(contentModel);
    }

}
