Package org.apache.muse.ws.resource.properties.schema.faults

Examples of org.apache.muse.ws.resource.properties.schema.faults.SchemaValidationFault


        if (currentSize - toDelete < min)
        {
            Object[] filler = {
                qname, new Integer(min), new Integer(currentSize - toDelete)
            };
            throw new SchemaValidationFault(_MESSAGES.get("BelowMinimumPotential", filler));
        }
    }
View Full Code Here


        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));
        }
       
        //
        // are we trying to set to null when we shouldn't be?
        //
        boolean isNillable = schema.isNillable(qname);
       
        for (int n = 0; n < values.length; ++n)
        {
            if (!isNillable && !values[n].hasChildNodes())
            {
                Object[] filler = { qname };
                throw new SchemaValidationFault(_MESSAGES.get("NotNillable", filler));
            }
        }
    }
View Full Code Here

            if (instances.length < min)
            {
                Object[] filler = {
                    qname, new Integer(min), new Integer(instances.length)
                };
                throw new SchemaValidationFault(_MESSAGES.get("BelowMinimum", filler));
            }
           
            //
            // under the max?
            //
            if (!maxUnbounded && instances.length > max)
            {
                Object[] filler = {
                    qname, new Integer(min), new Integer(instances.length)
                };
                throw new SchemaValidationFault(_MESSAGES.get("AboveMaximum", filler));
            }
           
            //
            // are any instances null that shouldn't be?
            //
            String message = _MESSAGES.get("NotNillable", new Object[]{ qname });
           
            if (!isNillable)
            {
                for (int n = 0; n < instances.length; ++n)
                {
                    //
                    // check for child elements, attributes, and text, all of
                    // which qualify an element as "not null"
                    //
                    if (!instances[n].hasChildNodes() &&
                        !instances[n].hasAttributes() &&
                        XmlUtils.extractText(instances[n]) == null)
                        throw new SchemaValidationFault(message);
                }
            }
        }
    }
View Full Code Here

        if (currentSize - toDelete < min)
        {
            Object[] filler = {
                qname, new Integer(min), new Integer(currentSize - toDelete)
            };
            throw new SchemaValidationFault(_MESSAGES.get("BelowMinimumPotential", filler));
        }
    }
View Full Code Here

        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?
        //
View Full Code Here

            String nil = XmlUtils.getAttribute(instances[n], XsdUtils.NIL_QNAME);
            boolean nilExists = nil != null && nil.length() > 0;
            boolean isNil = nilExists ? Boolean.valueOf(nil).booleanValue() : false;
           
            if (isNil)
                throw new SchemaValidationFault(_MESSAGES.get("NotNillable", new Object[]{ qname }));
        }
    }
View Full Code Here

            if (instances.length < min)
            {
                Object[] filler = {
                    qname, new Integer(min), new Integer(instances.length)
                };
                throw new SchemaValidationFault(_MESSAGES.get("BelowMinimum", filler));
            }
           
            //
            // under the max?
            //
            if (!maxUnbounded && instances.length > max)
            {
                Object[] filler = {
                    qname, new Integer(min), new Integer(instances.length)
                };
                throw new SchemaValidationFault(_MESSAGES.get("AboveMaximum", filler));
            }
           
            //
            // not nillable yet still null?
            ////
View Full Code Here

        if (currentSize - toDelete < min)
        {
            Object[] filler = {
                qname, new Integer(min), new Integer(currentSize - toDelete)
            };
            throw new SchemaValidationFault(_MESSAGES.get("BelowMinimumPotential", filler));
        }
    }
View Full Code Here

        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?
        //
View Full Code Here

            // which qualify an element as "not null"
            //
            if (!instances[n].hasChildNodes() &&
                !instances[n].hasAttributes() &&
                XmlUtils.extractText(instances[n]) == null)
                throw new SchemaValidationFault(_MESSAGES.get("NotNillable", new Object[]{ qname }));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.muse.ws.resource.properties.schema.faults.SchemaValidationFault

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.