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

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

Go to download

XmlBeans generated from the Ecma supplied xsds: http://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%20Part%204%20(DOCX).zip

The newest version!
/*
 * XML Type:  Shapes_Type
 * Namespace: http://schemas.microsoft.com/office/visio/2012/main
 * Java type: com.microsoft.schemas.office.visio.x2012.main.ShapesType
 *
 * Automatically generated - do not modify.
 */
package com.microsoft.schemas.office.visio.x2012.main.impl;
/**
 * An XML Shapes_Type(@http://schemas.microsoft.com/office/visio/2012/main).
 *
 * This is a complex type.
 */
public class ShapesTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.microsoft.schemas.office.visio.x2012.main.ShapesType
{
    private static final long serialVersionUID = 1L;
    
    public ShapesTypeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SHAPE$0 = 
        new javax.xml.namespace.QName("http://schemas.microsoft.com/office/visio/2012/main", "Shape");
    
    
    /**
     * Gets a List of "Shape" elements
     */
    public java.util.List getShapeList()
    {
        final class ShapeList extends java.util.AbstractList
        {
            @Override
            public com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType get(int i)
                { return ShapesTypeImpl.this.getShapeArray(i); }
            
            @Override
            public com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType set(int i, com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType o)
            {
                com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType old = ShapesTypeImpl.this.getShapeArray(i);
                ShapesTypeImpl.this.setShapeArray(i, o);
                return old;
            }
            
            @Override
            public void add(int i, com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType o)
                { ShapesTypeImpl.this.insertNewShape(i).set(o); }
            
            @Override
            public com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType remove(int i)
            {
                com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType old = ShapesTypeImpl.this.getShapeArray(i);
                ShapesTypeImpl.this.removeShape(i);
                return old;
            }
            
            @Override
            public int size()
                { return ShapesTypeImpl.this.sizeOfShapeArray(); }
            
        }
        
        synchronized (monitor())
        {
            check_orphaned();
            return new ShapeList();
        }
    }
    
    /**
     * Gets array of all "Shape" elements
     * @deprecated
     */
    @Deprecated
    public com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType[] getShapeArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(SHAPE$0, targetList);
            com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType[] result = new com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "Shape" element
     */
    public com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType getShapeArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType target = null;
            target = (com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType)get_store().find_element_user(SHAPE$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "Shape" element
     */
    public int sizeOfShapeArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(SHAPE$0);
        }
    }
    
    /**
     * Sets array of all "Shape" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setShapeArray(com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType[] shapeArray)
    {
        check_orphaned();
        arraySetterHelper(shapeArray, SHAPE$0);
    }
    
    /**
     * Sets ith "Shape" element
     */
    public void setShapeArray(int i, com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType shape)
    {
        generatedSetterHelperImpl(shape, SHAPE$0, i, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_ARRAYITEM);
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "Shape" element
     */
    public com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType insertNewShape(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType target = null;
            target = (com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType)get_store().insert_element_user(SHAPE$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "Shape" element
     */
    public com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType addNewShape()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType target = null;
            target = (com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType)get_store().add_element_user(SHAPE$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "Shape" element
     */
    public void removeShape(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(SHAPE$0, i);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy