org.openxmlformats.schemas.xpackage.x2006.relationships.impl.CTRelationshipsImpl Maven / Gradle / Ivy
/*
* XML Type: CT_Relationships
* Namespace: http://schemas.openxmlformats.org/package/2006/relationships
* Java type: org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationships
*
* Automatically generated - do not modify.
*/
package org.openxmlformats.schemas.xpackage.x2006.relationships.impl;
/**
* An XML CT_Relationships(@http://schemas.openxmlformats.org/package/2006/relationships).
*
* This is a complex type.
*/
public class CTRelationshipsImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationships
{
public CTRelationshipsImpl(org.apache.xmlbeans.SchemaType sType)
{
super(sType);
}
private static final javax.xml.namespace.QName RELATIONSHIP$0 =
new javax.xml.namespace.QName("http://schemas.openxmlformats.org/package/2006/relationships", "Relationship");
/**
* Gets a List of "Relationship" elements
*/
public java.util.List getRelationshipList()
{
final class RelationshipList extends java.util.AbstractList
{
public org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship get(int i)
{ return CTRelationshipsImpl.this.getRelationshipArray(i); }
public org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship set(int i, org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship o)
{
org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship old = CTRelationshipsImpl.this.getRelationshipArray(i);
CTRelationshipsImpl.this.setRelationshipArray(i, o);
return old;
}
public void add(int i, org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship o)
{ CTRelationshipsImpl.this.insertNewRelationship(i).set(o); }
public org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship remove(int i)
{
org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship old = CTRelationshipsImpl.this.getRelationshipArray(i);
CTRelationshipsImpl.this.removeRelationship(i);
return old;
}
public int size()
{ return CTRelationshipsImpl.this.sizeOfRelationshipArray(); }
}
synchronized (monitor())
{
check_orphaned();
return new RelationshipList();
}
}
/**
* Gets array of all "Relationship" elements
*/
public org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship[] getRelationshipArray()
{
synchronized (monitor())
{
check_orphaned();
java.util.List targetList = new java.util.ArrayList();
get_store().find_all_element_users(RELATIONSHIP$0, targetList);
org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship[] result = new org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship[targetList.size()];
targetList.toArray(result);
return result;
}
}
/**
* Gets ith "Relationship" element
*/
public org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship getRelationshipArray(int i)
{
synchronized (monitor())
{
check_orphaned();
org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship target = null;
target = (org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship)get_store().find_element_user(RELATIONSHIP$0, i);
if (target == null)
{
throw new IndexOutOfBoundsException();
}
return target;
}
}
/**
* Returns number of "Relationship" element
*/
public int sizeOfRelationshipArray()
{
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(RELATIONSHIP$0);
}
}
/**
* Sets array of all "Relationship" element
*/
public void setRelationshipArray(org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship[] relationshipArray)
{
synchronized (monitor())
{
check_orphaned();
arraySetterHelper(relationshipArray, RELATIONSHIP$0);
}
}
/**
* Sets ith "Relationship" element
*/
public void setRelationshipArray(int i, org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship relationship)
{
synchronized (monitor())
{
check_orphaned();
org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship target = null;
target = (org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship)get_store().find_element_user(RELATIONSHIP$0, i);
if (target == null)
{
throw new IndexOutOfBoundsException();
}
target.set(relationship);
}
}
/**
* Inserts and returns a new empty value (as xml) as the ith "Relationship" element
*/
public org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship insertNewRelationship(int i)
{
synchronized (monitor())
{
check_orphaned();
org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship target = null;
target = (org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship)get_store().insert_element_user(RELATIONSHIP$0, i);
return target;
}
}
/**
* Appends and returns a new empty value (as xml) as the last "Relationship" element
*/
public org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship addNewRelationship()
{
synchronized (monitor())
{
check_orphaned();
org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship target = null;
target = (org.openxmlformats.schemas.xpackage.x2006.relationships.CTRelationship)get_store().add_element_user(RELATIONSHIP$0);
return target;
}
}
/**
* Removes the ith "Relationship" element
*/
public void removeRelationship(int i)
{
synchronized (monitor())
{
check_orphaned();
get_store().remove_element(RELATIONSHIP$0, i);
}
}
}