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

Examples of org.apache.muse.ws.resource.properties.schema.ResourcePropertiesSchema


     *
     */
    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));
    }
View Full Code Here


        throws BaseFault
    {       
        //
        // for every property in the schema, check the size constraints
        //
        ResourcePropertiesSchema schema = getSchema();
        Iterator i = schema.getPropertyNames().iterator();
       
        while (i.hasNext())
        {
            QName qname = (QName)i.next();
           
            if (!schema.hasCapability(qname))
            {
                Object[] filler = { qname };
                throw new IllegalStateException(_MESSAGES.get("NoCapabilityForProperty", filler));
            }
           
            int max = schema.getMaxOccurs(qname);
            boolean maxUnbounded = schema.isMaxUnbounded(qname);
            int min = schema.getMinOccurs(qname);
            boolean isNillable = schema.isNillable(qname);
           
            //
            // get all current instances
            //
            Element[] instances = getResourceProperty(qname);
View Full Code Here

TOP

Related Classes of org.apache.muse.ws.resource.properties.schema.ResourcePropertiesSchema

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.