All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.zeroinstall.model.impl.ForEachArgImpl Maven / Gradle / Ivy

The newest version!
/*
 * XML Type:  for-each-arg
 * Namespace: http://zero-install.sourceforge.net/2004/injector/interface
 * Java type: net.zeroinstall.model.ForEachArg
 *
 * Automatically generated - do not modify.
 */
package net.zeroinstall.model.impl;
/**
 * An XML for-each-arg(@http://zero-install.sourceforge.net/2004/injector/interface).
 *
 * This is a complex type.
 */
public class ForEachArgImpl extends net.zeroinstall.model.impl.FeedElementImpl implements net.zeroinstall.model.ForEachArg
{
    private static final long serialVersionUID = 1L;
    
    public ForEachArgImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName ARG$0 = 
        new javax.xml.namespace.QName("http://zero-install.sourceforge.net/2004/injector/interface", "arg");
    private static final javax.xml.namespace.QName ITEMFROM$2 = 
        new javax.xml.namespace.QName("", "item-from");
    private static final javax.xml.namespace.QName SEPARATOR$4 = 
        new javax.xml.namespace.QName("", "separator");
    
    
    /**
     * Gets array of all "arg" elements
     */
    public java.lang.String[] getArgArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(ARG$0, targetList);
            java.lang.String[] result = new java.lang.String[targetList.size()];
            for (int i = 0, len = targetList.size() ; i < len ; i++)
                result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getStringValue();
            return result;
        }
    }
    
    /**
     * Gets ith "arg" element
     */
    public java.lang.String getArgArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ARG$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) array of all "arg" elements
     */
    public org.apache.xmlbeans.XmlString[] xgetArgArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(ARG$0, targetList);
            org.apache.xmlbeans.XmlString[] result = new org.apache.xmlbeans.XmlString[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets (as xml) ith "arg" element
     */
    public org.apache.xmlbeans.XmlString xgetArgArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(ARG$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return (org.apache.xmlbeans.XmlString)target;
        }
    }
    
    /**
     * Returns number of "arg" element
     */
    public int sizeOfArgArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ARG$0);
        }
    }
    
    /**
     * Sets array of all "arg" element
     */
    public void setArgArray(java.lang.String[] argArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(argArray, ARG$0);
        }
    }
    
    /**
     * Sets ith "arg" element
     */
    public void setArgArray(int i, java.lang.String arg)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ARG$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.setStringValue(arg);
        }
    }
    
    /**
     * Sets (as xml) array of all "arg" element
     */
    public void xsetArgArray(org.apache.xmlbeans.XmlString[]argArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(argArray, ARG$0);
        }
    }
    
    /**
     * Sets (as xml) ith "arg" element
     */
    public void xsetArgArray(int i, org.apache.xmlbeans.XmlString arg)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(ARG$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(arg);
        }
    }
    
    /**
     * Inserts the value as the ith "arg" element
     */
    public void insertArg(int i, java.lang.String arg)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = 
                (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(ARG$0, i);
            target.setStringValue(arg);
        }
    }
    
    /**
     * Appends the value as the last "arg" element
     */
    public void addArg(java.lang.String arg)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ARG$0);
            target.setStringValue(arg);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "arg" element
     */
    public org.apache.xmlbeans.XmlString insertNewArg(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().insert_element_user(ARG$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "arg" element
     */
    public org.apache.xmlbeans.XmlString addNewArg()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(ARG$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "arg" element
     */
    public void removeArg(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ARG$0, i);
        }
    }
    
    /**
     * Gets the "item-from" attribute
     */
    public java.lang.String getItemFrom()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ITEMFROM$2);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "item-from" attribute
     */
    public org.apache.xmlbeans.XmlString xgetItemFrom()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ITEMFROM$2);
            return target;
        }
    }
    
    /**
     * Sets the "item-from" attribute
     */
    public void setItemFrom(java.lang.String itemFrom)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ITEMFROM$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ITEMFROM$2);
            }
            target.setStringValue(itemFrom);
        }
    }
    
    /**
     * Sets (as xml) the "item-from" attribute
     */
    public void xsetItemFrom(org.apache.xmlbeans.XmlString itemFrom)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ITEMFROM$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ITEMFROM$2);
            }
            target.set(itemFrom);
        }
    }
    
    /**
     * Gets the "separator" attribute
     */
    public java.lang.String getSeparator()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SEPARATOR$4);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "separator" attribute
     */
    public org.apache.xmlbeans.XmlString xgetSeparator()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(SEPARATOR$4);
            return target;
        }
    }
    
    /**
     * True if has "separator" attribute
     */
    public boolean isSetSeparator()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(SEPARATOR$4) != null;
        }
    }
    
    /**
     * Sets the "separator" attribute
     */
    public void setSeparator(java.lang.String separator)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SEPARATOR$4);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(SEPARATOR$4);
            }
            target.setStringValue(separator);
        }
    }
    
    /**
     * Sets (as xml) the "separator" attribute
     */
    public void xsetSeparator(org.apache.xmlbeans.XmlString separator)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(SEPARATOR$4);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(SEPARATOR$4);
            }
            target.set(separator);
        }
    }
    
    /**
     * Unsets the "separator" attribute
     */
    public void unsetSeparator()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(SEPARATOR$4);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy