/*
 * An XML document type.
 * Localname: FileEventGenerator
 * Namespace: http://www.bea.com/wli/eventGenerator
 * Java type: com.bea.wli.eventGenerator.FileEventGeneratorDocument
 *
 * Automatically generated - do not modify.
 */
package com.bea.wli.eventGenerator.impl;
/**
 * A document containing one FileEventGenerator(@http://www.bea.com/wli/eventGenerator) element.
 *
 * This is a complex type.
 */
public class FileEventGeneratorDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.wli.eventGenerator.FileEventGeneratorDocument
{
    
    public FileEventGeneratorDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName FILEEVENTGENERATOR$0 = 
        new javax.xml.namespace.QName("http://www.bea.com/wli/eventGenerator", "FileEventGenerator");
    
    
    /**
     * Gets the "FileEventGenerator" element
     */
    public com.bea.wli.eventGenerator.FileEventGeneratorDocument.FileEventGenerator getFileEventGenerator()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.eventGenerator.FileEventGeneratorDocument.FileEventGenerator target = null;
            target = (com.bea.wli.eventGenerator.FileEventGeneratorDocument.FileEventGenerator)get_store().find_element_user(FILEEVENTGENERATOR$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "FileEventGenerator" element
     */
    public void setFileEventGenerator(com.bea.wli.eventGenerator.FileEventGeneratorDocument.FileEventGenerator fileEventGenerator)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.eventGenerator.FileEventGeneratorDocument.FileEventGenerator target = null;
            target = (com.bea.wli.eventGenerator.FileEventGeneratorDocument.FileEventGenerator)get_store().find_element_user(FILEEVENTGENERATOR$0, 0);
            if (target == null)
            {
                target = (com.bea.wli.eventGenerator.FileEventGeneratorDocument.FileEventGenerator)get_store().add_element_user(FILEEVENTGENERATOR$0);
            }
            target.set(fileEventGenerator);
        }
    }
    
    /**
     * Appends and returns a new empty "FileEventGenerator" element
     */
    public com.bea.wli.eventGenerator.FileEventGeneratorDocument.FileEventGenerator addNewFileEventGenerator()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.eventGenerator.FileEventGeneratorDocument.FileEventGenerator target = null;
            target = (com.bea.wli.eventGenerator.FileEventGeneratorDocument.FileEventGenerator)get_store().add_element_user(FILEEVENTGENERATOR$0);
            return target;
        }
    }
    /**
     * An XML FileEventGenerator(@http://www.bea.com/wli/eventGenerator).
     *
     * This is a complex type.
     */
    public static class FileEventGeneratorImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.wli.eventGenerator.FileEventGeneratorDocument.FileEventGenerator
    {
        
        public FileEventGeneratorImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName DIRECTORY$0 = 
            new javax.xml.namespace.QName("http://www.bea.com/wli/eventGenerator", "Directory");
        private static final javax.xml.namespace.QName FILENAME$2 = 
            new javax.xml.namespace.QName("http://www.bea.com/wli/eventGenerator", "FileName");
        
        
        /**
         * Gets the "Directory" element
         */
        public java.lang.String getDirectory()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DIRECTORY$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "Directory" element
         */
        public org.apache.xmlbeans.XmlString xgetDirectory()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(DIRECTORY$0, 0);
                return target;
            }
        }
        
        /**
         * True if has "Directory" element
         */
        public boolean isSetDirectory()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(DIRECTORY$0) != 0;
            }
        }
        
        /**
         * Sets the "Directory" element
         */
        public void setDirectory(java.lang.String directory)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DIRECTORY$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DIRECTORY$0);
                }
                target.setStringValue(directory);
            }
        }
        
        /**
         * Sets (as xml) the "Directory" element
         */
        public void xsetDirectory(org.apache.xmlbeans.XmlString directory)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(DIRECTORY$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(DIRECTORY$0);
                }
                target.set(directory);
            }
        }
        
        /**
         * Unsets the "Directory" element
         */
        public void unsetDirectory()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(DIRECTORY$0, 0);
            }
        }
        
        /**
         * Gets the "FileName" element
         */
        public java.lang.String getFileName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FILENAME$2, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "FileName" element
         */
        public org.apache.xmlbeans.XmlString xgetFileName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FILENAME$2, 0);
                return target;
            }
        }
        
        /**
         * True if has "FileName" element
         */
        public boolean isSetFileName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(FILENAME$2) != 0;
            }
        }
        
        /**
         * Sets the "FileName" element
         */
        public void setFileName(java.lang.String fileName)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FILENAME$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(FILENAME$2);
                }
                target.setStringValue(fileName);
            }
        }
        
        /**
         * Sets (as xml) the "FileName" element
         */
        public void xsetFileName(org.apache.xmlbeans.XmlString fileName)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FILENAME$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(FILENAME$2);
                }
                target.set(fileName);
            }
        }
        
        /**
         * Unsets the "FileName" element
         */
        public void unsetFileName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(FILENAME$2, 0);
            }
        }
    }
}
