001/*
002 * An XML document type.
003 * Localname: import
004 * Namespace: http://www.springframework.org/schema/beans
005 * Java type: org.springframework.schema.beans.ImportDocument
006 *
007 * Automatically generated - do not modify.
008 */
009package org.springframework.schema.beans.impl;
010/**
011 * A document containing one import(@http://www.springframework.org/schema/beans) element.
012 *
013 * This is a complex type.
014 */
015public class ImportDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.springframework.schema.beans.ImportDocument
016{
017    private static final long serialVersionUID = 1L;
018    
019    public ImportDocumentImpl(org.apache.xmlbeans.SchemaType sType)
020    {
021        super(sType);
022    }
023    
024    private static final javax.xml.namespace.QName IMPORT$0 = 
025        new javax.xml.namespace.QName("http://www.springframework.org/schema/beans", "import");
026    
027    
028    /**
029     * Gets the "import" element
030     */
031    public org.springframework.schema.beans.ImportDocument.Import getImport()
032    {
033        synchronized (monitor())
034        {
035            check_orphaned();
036            org.springframework.schema.beans.ImportDocument.Import target = null;
037            target = (org.springframework.schema.beans.ImportDocument.Import)get_store().find_element_user(IMPORT$0, 0);
038            if (target == null)
039            {
040                return null;
041            }
042            return target;
043        }
044    }
045    
046    /**
047     * Sets the "import" element
048     */
049    public void setImport(org.springframework.schema.beans.ImportDocument.Import ximport)
050    {
051        synchronized (monitor())
052        {
053            check_orphaned();
054            org.springframework.schema.beans.ImportDocument.Import target = null;
055            target = (org.springframework.schema.beans.ImportDocument.Import)get_store().find_element_user(IMPORT$0, 0);
056            if (target == null)
057            {
058                target = (org.springframework.schema.beans.ImportDocument.Import)get_store().add_element_user(IMPORT$0);
059            }
060            target.set(ximport);
061        }
062    }
063    
064    /**
065     * Appends and returns a new empty "import" element
066     */
067    public org.springframework.schema.beans.ImportDocument.Import addNewImport()
068    {
069        synchronized (monitor())
070        {
071            check_orphaned();
072            org.springframework.schema.beans.ImportDocument.Import target = null;
073            target = (org.springframework.schema.beans.ImportDocument.Import)get_store().add_element_user(IMPORT$0);
074            return target;
075        }
076    }
077    /**
078     * An XML import(@http://www.springframework.org/schema/beans).
079     *
080     * This is a complex type.
081     */
082    public static class ImportImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.springframework.schema.beans.ImportDocument.Import
083    {
084        private static final long serialVersionUID = 1L;
085        
086        public ImportImpl(org.apache.xmlbeans.SchemaType sType)
087        {
088            super(sType);
089        }
090        
091        private static final javax.xml.namespace.QName RESOURCE$0 = 
092            new javax.xml.namespace.QName("", "resource");
093        
094        
095        /**
096         * Gets the "resource" attribute
097         */
098        public java.lang.String getResource()
099        {
100            synchronized (monitor())
101            {
102                check_orphaned();
103                org.apache.xmlbeans.SimpleValue target = null;
104                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(RESOURCE$0);
105                if (target == null)
106                {
107                    return null;
108                }
109                return target.getStringValue();
110            }
111        }
112        
113        /**
114         * Gets (as xml) the "resource" attribute
115         */
116        public org.apache.xmlbeans.XmlString xgetResource()
117        {
118            synchronized (monitor())
119            {
120                check_orphaned();
121                org.apache.xmlbeans.XmlString target = null;
122                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(RESOURCE$0);
123                return target;
124            }
125        }
126        
127        /**
128         * Sets the "resource" attribute
129         */
130        public void setResource(java.lang.String resource)
131        {
132            synchronized (monitor())
133            {
134                check_orphaned();
135                org.apache.xmlbeans.SimpleValue target = null;
136                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(RESOURCE$0);
137                if (target == null)
138                {
139                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(RESOURCE$0);
140                }
141                target.setStringValue(resource);
142            }
143        }
144        
145        /**
146         * Sets (as xml) the "resource" attribute
147         */
148        public void xsetResource(org.apache.xmlbeans.XmlString resource)
149        {
150            synchronized (monitor())
151            {
152                check_orphaned();
153                org.apache.xmlbeans.XmlString target = null;
154                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(RESOURCE$0);
155                if (target == null)
156                {
157                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(RESOURCE$0);
158                }
159                target.set(resource);
160            }
161        }
162    }
163}