Examples of supportsType()


Examples of org.apache.cocoon.woody.datatype.ValidationRule.supportsType()

        Element validationElement = DomHelper.getChildElement(datatypeElement, Constants.WD_NS, "validation");
        if (validationElement != null) {
            Element[] validationElements = DomHelper.getChildElements(validationElement, Constants.WD_NS);
            for (int i = 0; i < validationElements.length; i++) {
                ValidationRule rule = datatypeManager.createValidationRule(validationElements[i]);
                if (!rule.supportsType(datatype.getTypeClass(), datatype.isArrayType())) {
                    throw new Exception("Validation rule \"" + validationElements[i].getLocalName() + "\" cannot be used with strings, error at " + DomHelper.getLocation(validationElements[i]));
                }
                datatype.addValidationRule(rule);
            }
        }
View Full Code Here

Examples of org.apache.cocoon.woody.datatype.ValidationRule.supportsType()

        if (validationElement != null) {
            Element[] validationRuleElements = DomHelper.getChildElements(validationElement, Constants.WD_NS);
            for (int i = 0; i < validationRuleElements.length; i++) {
                Element validationRuleElement = validationRuleElements[i];
                ValidationRule validationRule = datatypeManager.createValidationRule(validationRuleElement);
                if (!validationRule.supportsType(String.class, false))
                    throw new Exception("The validation rule for the aggregatefield " + definition.getId() + " specified at " + DomHelper.getLocation(validationRuleElement) + " does not work with strings.");
                definition.addValidationRule(validationRule);
            }
        }
View Full Code Here

Examples of org.apache.cocoon.woody.datatype.ValidationRule.supportsType()

        if (validationElement != null) {
            Element[] validationRuleElements = DomHelper.getChildElements(validationElement, Constants.WD_NS);
            for (int i = 0; i < validationRuleElements.length; i++) {
                Element validationRuleElement = validationRuleElements[i];
                ValidationRule validationRule = datatypeManager.createValidationRule(validationRuleElement);
                if (!validationRule.supportsType(String.class, false))
                    throw new Exception("The validation rule for the aggregatefield " + definition.getId() + " specified at " + DomHelper.getLocation(validationRuleElement) + " does not work with strings.");
                definition.addValidationRule(validationRule);
            }
        }
View Full Code Here

Examples of org.apache.cocoon.woody.datatype.ValidationRule.supportsType()

        Element validationElement = DomHelper.getChildElement(datatypeElement, Constants.WD_NS, "validation");
        if (validationElement != null) {
            Element[] validationElements = DomHelper.getChildElements(validationElement, Constants.WD_NS);
            for (int i = 0; i < validationElements.length; i++) {
                ValidationRule rule = datatypeManager.createValidationRule(validationElements[i]);
                if (rule.supportsType(datatype.getTypeClass(), datatype.isArrayType())) {
                    datatype.addValidationRule(rule);
                } else {
                    throw new Exception("Validation rule \"" + validationElements[i].getLocalName() + "\" cannot be used with strings, error at " + DomHelper.getLocation(validationElements[i]));
                }
            }
View Full Code Here

Examples of org.apache.cocoon.woody.datatype.ValidationRule.supportsType()

        Element validationElement = DomHelper.getChildElement(datatypeElement, Constants.WD_NS, "validation");
        if (validationElement != null) {
            Element[] validationElements = DomHelper.getChildElements(validationElement, Constants.WD_NS);
            for (int i = 0; i < validationElements.length; i++) {
                ValidationRule rule = datatypeManager.createValidationRule(validationElements[i]);
                if (rule.supportsType(datatype.getTypeClass(), datatype.isArrayType())) {
                    datatype.addValidationRule(rule);
                } else {
                    throw new Exception("Validation rule \"" + validationElements[i].getLocalName() + "\" cannot be used with strings, error at " + DomHelper.getLocation(validationElements[i]));
                }
            }
View Full Code Here

Examples of org.apache.cocoon.woody.datatype.ValidationRule.supportsType()

        Element validationElement = DomHelper.getChildElement(datatypeElement, Constants.WD_NS, "validation");
        if (validationElement != null) {
            Element[] validationElements = DomHelper.getChildElements(validationElement, Constants.WD_NS);
            for (int i = 0; i < validationElements.length; i++) {
                ValidationRule rule = datatypeManager.createValidationRule(validationElements[i]);
                if (rule.supportsType(datatype.getTypeClass(), datatype.isArrayType())) {
                    datatype.addValidationRule(rule);
                } else {
                    throw new Exception("Validation rule \"" + validationElements[i].getLocalName() + "\" cannot be used with strings, error at " + DomHelper.getLocation(validationElements[i]));
                }
            }
View Full Code Here

Examples of org.apache.cocoon.woody.datatype.ValidationRule.supportsType()

        if (validationElement != null) {
            Element[] validationRuleElements = DomHelper.getChildElements(validationElement, Constants.WD_NS);
            for (int i = 0; i < validationRuleElements.length; i++) {
                Element validationRuleElement = validationRuleElements[i];
                ValidationRule validationRule = datatypeManager.createValidationRule(validationRuleElement);
                if (!validationRule.supportsType(String.class, false))
                    throw new Exception("The validation rule for the aggregatefield " + definition.getId() + " specified at " + DomHelper.getLocation(validationRuleElement) + " does not work with strings.");
                definition.addValidationRule(validationRule);
            }
        }
View Full Code Here

Examples of org.apache.cocoon.woody.datatype.ValidationRule.supportsType()

        Element validationElement = DomHelper.getChildElement(datatypeElement, Constants.WD_NS, "validation");
        if (validationElement != null) {
            Element[] validationElements = DomHelper.getChildElements(validationElement, Constants.WD_NS);
            for (int i = 0; i < validationElements.length; i++) {
                ValidationRule rule = datatypeManager.createValidationRule(validationElements[i]);
                if (!rule.supportsType(datatype.getTypeClass(), datatype.isArrayType())) {
                    throw new Exception("Validation rule \"" + validationElements[i].getLocalName() + "\" cannot be used with strings, error at " + DomHelper.getLocation(validationElements[i]));
                }
                datatype.addValidationRule(rule);
            }
        }
View Full Code Here

Examples of org.datanucleus.query.evaluator.memory.InvocationEvaluator.supportsType()

        {
            Iterator evaluatorIter = methods.iterator();
            while (evaluatorIter.hasNext())
            {
                InvocationEvaluator eval = (InvocationEvaluator)evaluatorIter.next();
                if (eval.supportsType(type))
                {
                    return eval;
                }
            }
        }
View Full Code Here

Examples of org.datanucleus.query.evaluator.memory.InvocationEvaluator.supportsType()

                    try
                    {
                        Class evalCls = omfCtx.getClassLoaderResolver(null).classForName(evaluatorNames[i]);
                        InvocationEvaluator eval = (InvocationEvaluator)evalCls.newInstance();
                        evaluators.add(eval);
                        if (eval.supportsType(type))
                        {
                            evalToUse = eval;
                        }
                    }
                    catch (Exception e)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.