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

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

The newest version!
/*
 * XML Type:  recipe
 * Namespace: http://zero-install.sourceforge.net/2004/injector/interface
 * Java type: net.zeroinstall.model.Recipe
 *
 * Automatically generated - do not modify.
 */
package net.zeroinstall.model.impl;
/**
 * An XML recipe(@http://zero-install.sourceforge.net/2004/injector/interface).
 *
 * This is a complex type.
 */
public class RecipeImpl extends net.zeroinstall.model.impl.RetrievalMethodImpl implements net.zeroinstall.model.Recipe
{
    private static final long serialVersionUID = 1L;
    
    public RecipeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName ARCHIVE$0 = 
        new javax.xml.namespace.QName("http://zero-install.sourceforge.net/2004/injector/interface", "archive");
    private static final javax.xml.namespace.QName FILE$2 = 
        new javax.xml.namespace.QName("http://zero-install.sourceforge.net/2004/injector/interface", "file");
    private static final javax.xml.namespace.QName RENAME$4 = 
        new javax.xml.namespace.QName("http://zero-install.sourceforge.net/2004/injector/interface", "rename");
    private static final javax.xml.namespace.QName REMOVE$6 = 
        new javax.xml.namespace.QName("http://zero-install.sourceforge.net/2004/injector/interface", "remove");
    
    
    /**
     * Gets array of all "archive" elements
     */
    public net.zeroinstall.model.Archive[] getArchiveArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(ARCHIVE$0, targetList);
            net.zeroinstall.model.Archive[] result = new net.zeroinstall.model.Archive[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "archive" element
     */
    public net.zeroinstall.model.Archive getArchiveArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.zeroinstall.model.Archive target = null;
            target = (net.zeroinstall.model.Archive)get_store().find_element_user(ARCHIVE$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "archive" element
     */
    public int sizeOfArchiveArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ARCHIVE$0);
        }
    }
    
    /**
     * Sets array of all "archive" element
     */
    public void setArchiveArray(net.zeroinstall.model.Archive[] archiveArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(archiveArray, ARCHIVE$0);
        }
    }
    
    /**
     * Sets ith "archive" element
     */
    public void setArchiveArray(int i, net.zeroinstall.model.Archive archive)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.zeroinstall.model.Archive target = null;
            target = (net.zeroinstall.model.Archive)get_store().find_element_user(ARCHIVE$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(archive);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "archive" element
     */
    public net.zeroinstall.model.Archive insertNewArchive(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.zeroinstall.model.Archive target = null;
            target = (net.zeroinstall.model.Archive)get_store().insert_element_user(ARCHIVE$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "archive" element
     */
    public net.zeroinstall.model.Archive addNewArchive()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.zeroinstall.model.Archive target = null;
            target = (net.zeroinstall.model.Archive)get_store().add_element_user(ARCHIVE$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "archive" element
     */
    public void removeArchive(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ARCHIVE$0, i);
        }
    }
    
    /**
     * Gets array of all "file" elements
     */
    public net.zeroinstall.model.File[] getFileArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(FILE$2, targetList);
            net.zeroinstall.model.File[] result = new net.zeroinstall.model.File[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "file" element
     */
    public net.zeroinstall.model.File getFileArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.zeroinstall.model.File target = null;
            target = (net.zeroinstall.model.File)get_store().find_element_user(FILE$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "file" element
     */
    public int sizeOfFileArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(FILE$2);
        }
    }
    
    /**
     * Sets array of all "file" element
     */
    public void setFileArray(net.zeroinstall.model.File[] fileArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(fileArray, FILE$2);
        }
    }
    
    /**
     * Sets ith "file" element
     */
    public void setFileArray(int i, net.zeroinstall.model.File file)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.zeroinstall.model.File target = null;
            target = (net.zeroinstall.model.File)get_store().find_element_user(FILE$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(file);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "file" element
     */
    public net.zeroinstall.model.File insertNewFile(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.zeroinstall.model.File target = null;
            target = (net.zeroinstall.model.File)get_store().insert_element_user(FILE$2, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "file" element
     */
    public net.zeroinstall.model.File addNewFile()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.zeroinstall.model.File target = null;
            target = (net.zeroinstall.model.File)get_store().add_element_user(FILE$2);
            return target;
        }
    }
    
    /**
     * Removes the ith "file" element
     */
    public void removeFile(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(FILE$2, i);
        }
    }
    
    /**
     * Gets array of all "rename" elements
     */
    public net.zeroinstall.model.Rename[] getRenameArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(RENAME$4, targetList);
            net.zeroinstall.model.Rename[] result = new net.zeroinstall.model.Rename[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "rename" element
     */
    public net.zeroinstall.model.Rename getRenameArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.zeroinstall.model.Rename target = null;
            target = (net.zeroinstall.model.Rename)get_store().find_element_user(RENAME$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "rename" element
     */
    public int sizeOfRenameArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(RENAME$4);
        }
    }
    
    /**
     * Sets array of all "rename" element
     */
    public void setRenameArray(net.zeroinstall.model.Rename[] renameArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(renameArray, RENAME$4);
        }
    }
    
    /**
     * Sets ith "rename" element
     */
    public void setRenameArray(int i, net.zeroinstall.model.Rename rename)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.zeroinstall.model.Rename target = null;
            target = (net.zeroinstall.model.Rename)get_store().find_element_user(RENAME$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(rename);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "rename" element
     */
    public net.zeroinstall.model.Rename insertNewRename(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.zeroinstall.model.Rename target = null;
            target = (net.zeroinstall.model.Rename)get_store().insert_element_user(RENAME$4, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "rename" element
     */
    public net.zeroinstall.model.Rename addNewRename()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.zeroinstall.model.Rename target = null;
            target = (net.zeroinstall.model.Rename)get_store().add_element_user(RENAME$4);
            return target;
        }
    }
    
    /**
     * Removes the ith "rename" element
     */
    public void removeRename(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(RENAME$4, i);
        }
    }
    
    /**
     * Gets array of all "remove" elements
     */
    public net.zeroinstall.model.Remove[] getRemoveArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(REMOVE$6, targetList);
            net.zeroinstall.model.Remove[] result = new net.zeroinstall.model.Remove[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "remove" element
     */
    public net.zeroinstall.model.Remove getRemoveArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.zeroinstall.model.Remove target = null;
            target = (net.zeroinstall.model.Remove)get_store().find_element_user(REMOVE$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "remove" element
     */
    public int sizeOfRemoveArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(REMOVE$6);
        }
    }
    
    /**
     * Sets array of all "remove" element
     */
    public void setRemoveArray(net.zeroinstall.model.Remove[] removeArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(removeArray, REMOVE$6);
        }
    }
    
    /**
     * Sets ith "remove" element
     */
    public void setRemoveArray(int i, net.zeroinstall.model.Remove remove)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.zeroinstall.model.Remove target = null;
            target = (net.zeroinstall.model.Remove)get_store().find_element_user(REMOVE$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(remove);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "remove" element
     */
    public net.zeroinstall.model.Remove insertNewRemove(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.zeroinstall.model.Remove target = null;
            target = (net.zeroinstall.model.Remove)get_store().insert_element_user(REMOVE$6, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "remove" element
     */
    public net.zeroinstall.model.Remove addNewRemove()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.zeroinstall.model.Remove target = null;
            target = (net.zeroinstall.model.Remove)get_store().add_element_user(REMOVE$6);
            return target;
        }
    }
    
    /**
     * Removes the ith "remove" element
     */
    public void removeRemove(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(REMOVE$6, i);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy