*
*/
protected void validateInsert(QName qname, int currentSize, Element[] values)
throws BaseFault
{
ResourcePropertiesSchema schema = getSchema();
//
// make sure that adding value.length instances will not put us
// above the maximum (if any)
//
int max = schema.getMaxOccurs(qname);
int total = currentSize + values.length;
if (!_schema.isMaxUnbounded(qname) && total > max)
{
Object[] filler = { qname, new Integer(max), new Integer(total) };
throw new SchemaValidationFault(_MESSAGES.get("AboveMaximumPotential", filler));
}
//
// not nillable yet still null?
//
validateNillable(qname, values, schema.isNillable(qname));
}