Package org.apache.hivemind.schema

Examples of org.apache.hivemind.schema.Translator.translate()


        paramsControl.setDefaultReturnValue(module);

        module.getTranslator("foo");
        moduleControl.setDefaultReturnValue(translator);

        translator.translate(module, Object.class, "bar", null);
        translatorControl.setReturnValue("BAR");

        replayControls();

        facet.isAssignableToType(params, Object.class);
View Full Code Here


        Translator t = processor.getAttributeTranslator(_attributeName);

        String attributeValue = element.getAttributeValue(_attributeName);
        String value = RuleUtils.processText(processor, element, attributeValue);

        Object finalValue = t.translate(
                processor.getContributingModule(),
                Object.class,
                value,
                element.getLocation());
View Full Code Here

    {
        Translator t = processor.getContentTranslator();

        String value = RuleUtils.processText(processor, element, element.getContent());

        Object finalValue = t.translate(
                processor.getContributingModule(),
                Object.class,
                value,
                element.getLocation());
View Full Code Here

                    currentElement.getAttributeValue(keyAttribute),
                    currentElement.getLocation());

            Translator t = getAttributeTranslator(keyAttribute);

            Object finalValue = t.translate(
                    getContributingModule(),
                    Object.class,
                    expandedKey,
                    currentElement.getLocation());
View Full Code Here

            Translator t = _translator == null ? processor.getAttributeTranslator(_attributeName)
                    : processor.getTranslator(_translator);

            Class propertyType = PropertyUtils.getPropertyType(target, _propertyName);

            Object finalValue = t.translate(
                    processor.getContributingModule(),
                    propertyType,
                    value,
                    element.getLocation());
View Full Code Here

            Object target = processor.peek();

            Class propertyType = PropertyUtils.getPropertyType(target, _propertyName);

            Object finalValue =
                t.translate(
                    processor.getContributingModule(),
                    propertyType,
                    value,
                    element.getLocation());
View Full Code Here

        if (result == null)
        {
            Translator translator = factoryParameters.getInvokingModule().getTranslator(
                    _translatorName);

            result = translator.translate(
                    factoryParameters.getInvokingModule(),
                    targetType,
                    _literalValue,
                    getLocation());
View Full Code Here

        paramsControl.setDefaultReturnValue(module);

        module.getTranslator("foo");
        moduleControl.setDefaultReturnValue(translator);

        translator.translate(module, Object.class, "bar", null);
        translatorControl.setReturnValue("BAR");

        replayControls();

        facet.isAssignableToType(params, Object.class);
View Full Code Here

        paramsControl.setDefaultReturnValue(module);

        module.getTranslator("foo");
        moduleControl.setDefaultReturnValue(translator);

        translator.translate(module, Object.class, "bar", null);
        ApplicationRuntimeException exception = new ApplicationRuntimeException("");
        translatorControl.setThrowable(exception);

        replayControls();
View Full Code Here

{
    public void testNullId()
    {
        Translator t = new QualifiedIdTranslator();

        assertNull(t.translate(null, null, null));
    }

    private Module getModule()
    {
        MockControl c = newControl(Module.class);
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.