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

com.microsoft.schemas.office.visio.x2012.main.impl.PagesTypeImpl Maven / Gradle / Ivy

/*
 * XML Type:  Pages_Type
 * Namespace: http://schemas.microsoft.com/office/visio/2012/main
 * Java type: com.microsoft.schemas.office.visio.x2012.main.PagesType
 *
 * Automatically generated - do not modify.
 */
package com.microsoft.schemas.office.visio.x2012.main.impl;
/**
 * An XML Pages_Type(@http://schemas.microsoft.com/office/visio/2012/main).
 *
 * This is a complex type.
 */
public class PagesTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.microsoft.schemas.office.visio.x2012.main.PagesType
{
    
    public PagesTypeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName PAGE$0 = 
        new javax.xml.namespace.QName("http://schemas.microsoft.com/office/visio/2012/main", "Page");
    
    
    /**
     * Gets a List of "Page" elements
     */
    public java.util.List getPageList()
    {
        final class PageList extends java.util.AbstractList
        {
            public com.microsoft.schemas.office.visio.x2012.main.PageType get(int i)
                { return PagesTypeImpl.this.getPageArray(i); }
            
            public com.microsoft.schemas.office.visio.x2012.main.PageType set(int i, com.microsoft.schemas.office.visio.x2012.main.PageType o)
            {
                com.microsoft.schemas.office.visio.x2012.main.PageType old = PagesTypeImpl.this.getPageArray(i);
                PagesTypeImpl.this.setPageArray(i, o);
                return old;
            }
            
            public void add(int i, com.microsoft.schemas.office.visio.x2012.main.PageType o)
                { PagesTypeImpl.this.insertNewPage(i).set(o); }
            
            public com.microsoft.schemas.office.visio.x2012.main.PageType remove(int i)
            {
                com.microsoft.schemas.office.visio.x2012.main.PageType old = PagesTypeImpl.this.getPageArray(i);
                PagesTypeImpl.this.removePage(i);
                return old;
            }
            
            public int size()
                { return PagesTypeImpl.this.sizeOfPageArray(); }
            
        }
        
        synchronized (monitor())
        {
            check_orphaned();
            return new PageList();
        }
    }
    
    /**
     * Gets array of all "Page" elements
     */
    public com.microsoft.schemas.office.visio.x2012.main.PageType[] getPageArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(PAGE$0, targetList);
            com.microsoft.schemas.office.visio.x2012.main.PageType[] result = new com.microsoft.schemas.office.visio.x2012.main.PageType[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "Page" element
     */
    public com.microsoft.schemas.office.visio.x2012.main.PageType getPageArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.microsoft.schemas.office.visio.x2012.main.PageType target = null;
            target = (com.microsoft.schemas.office.visio.x2012.main.PageType)get_store().find_element_user(PAGE$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "Page" element
     */
    public int sizeOfPageArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PAGE$0);
        }
    }
    
    /**
     * Sets array of all "Page" element
     */
    public void setPageArray(com.microsoft.schemas.office.visio.x2012.main.PageType[] pageArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(pageArray, PAGE$0);
        }
    }
    
    /**
     * Sets ith "Page" element
     */
    public void setPageArray(int i, com.microsoft.schemas.office.visio.x2012.main.PageType page)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.microsoft.schemas.office.visio.x2012.main.PageType target = null;
            target = (com.microsoft.schemas.office.visio.x2012.main.PageType)get_store().find_element_user(PAGE$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(page);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "Page" element
     */
    public com.microsoft.schemas.office.visio.x2012.main.PageType insertNewPage(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.microsoft.schemas.office.visio.x2012.main.PageType target = null;
            target = (com.microsoft.schemas.office.visio.x2012.main.PageType)get_store().insert_element_user(PAGE$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "Page" element
     */
    public com.microsoft.schemas.office.visio.x2012.main.PageType addNewPage()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.microsoft.schemas.office.visio.x2012.main.PageType target = null;
            target = (com.microsoft.schemas.office.visio.x2012.main.PageType)get_store().add_element_user(PAGE$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "Page" element
     */
    public void removePage(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PAGE$0, i);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy