Package org.switchyard.config.model

Examples of org.switchyard.config.model.Model


    // This method looks for the MAX_POOL_SIZE property within switchyard.xml to
    // configure the default transformer pool size
    int getTransformPoolSize(XsltTransformModel model) {
        int poolSize = DEFAULT_MAX_POOL_SIZE;
        // attempt to navigate to parent
        Model root = model.getModelRoot();
        if (root instanceof SwitchYardModel) {
            SwitchYardModel syModel = (SwitchYardModel)root;
            if (syModel.getDomain() != null && syModel.getDomain().getProperties() != null) {
                String poolProp = syModel.getDomain().getProperties().getPropertyValue(MAX_POOL_SIZE);
                if (poolProp != null) {
View Full Code Here


    /**
     * {@inheritDoc}
     */
    @Override
    public Model read(Configuration config) {
        Model model = super.read(config);
        if (model != null) {
            return model;
        }

        String name = config.getName();
View Full Code Here

    @Test
    public void testCreateEmptyModel() throws Exception {
        String namespace = TransformNamespace.DEFAULT.uri();
        String name = TransformModel.TRANSFORM + '.' + JavaTransformModel.JAVA;
        Model model = new ModelPuller<Model>().pull(XMLHelper.createQName(namespace, name));
        Assert.assertTrue(model instanceof JavaTransformModel);
        Assert.assertEquals(name, model.getModelConfiguration().getName());
        Assert.assertEquals(new QName(namespace, name), model.getModelConfiguration().getQName());
    }
View Full Code Here

                    @Override
                    public ScannerOutput<M> scan(ScannerInput<M> input) throws IOException {
                        ScannerOutput<M> output = super.scan(input);
                        M model = output.getModel();
                        if (model != null) {
                            Model root = model.getModelRoot();
                            if (root instanceof SwitchYardModel) {
                                if (!input.isSwitchyardNamespaceSet()) {
                                    String uri = root.getModelRootNamespace();
                                    SwitchYardNamespace ns = SwitchYardNamespace.fromUri(uri);
                                    input.setSwitchyardNamespace(ns);
                                }
                            }
                        }
View Full Code Here

    @Test
    public void testCreateEmptyModel() throws Exception {
        String namespace = ValidateNamespace.DEFAULT.uri();
        String name = ValidateModel.VALIDATE + '.' + JavaValidateModel.JAVA;
        Model model = new ModelPuller<Model>().pull(XMLHelper.createQName(namespace, name));
        Assert.assertTrue(model instanceof JavaValidateModel);
        Assert.assertEquals(name, model.getModelConfiguration().getName());
        Assert.assertEquals(new QName(namespace, name), model.getModelConfiguration().getQName());
    }
View Full Code Here

            },
            new ModelPullerScanner<TestModel>(NAMESPACES_XML, getClass().getClassLoader())
        };
        MergeScanner<TestModel> merge_scanner = new MergeScanner<TestModel>(true, scanners);
        ScannerInput<TestModel> scanner_input = new ScannerInput<TestModel>();
        Model model = merge_scanner.scan(scanner_input).getModel();
        Configuration config_one = model.getModelConfiguration();
        try {
            validateNamespacesConfig(config_one);
        } catch (Error e) {
            //System.err.println(config_one);
            throw e;
View Full Code Here

    @Test
    public void testCreateEmptyModel() throws Exception {
        String namespace = SCANamespace.DEFAULT.uri();
        String name = CompositeModel.COMPOSITE;
        Model model = new ModelPuller<Model>().pull(XMLHelper.createQName(namespace, name));
        assertTrue(model instanceof CompositeModel);
        assertEquals(name, model.getModelConfiguration().getName());
        assertEquals(new QName(namespace, name), model.getModelConfiguration().getQName());
    }
View Full Code Here

    }

    @Test
    public void testCreateEmptyModel() throws Exception {
        String name = SwitchYardModel.SWITCHYARD;
        Model model = new ModelPuller<Model>().pull(XMLHelper.createQName(SwitchYardNamespace.V_1_1.uri(), name));
        Assert.assertTrue(model instanceof SwitchYardModel);
        Assert.assertEquals(name, model.getModelConfiguration().getName());
        Assert.assertEquals(new QName(SwitchYardNamespace.V_1_1.uri(), name), model.getModelConfiguration().getQName());
    }
View Full Code Here

        super(desc);
    }
   
    @Override
    public Model read(final Configuration config) {
        Model model = null;
        if (config.getName().startsWith(BindingModel.BINDING)) {
            model = new V1MockBindingModel(config, getDescriptor());
        } else if (config.getName().startsWith(ComponentImplementationModel.IMPLEMENTATION)) {
            model = new V1MockImplementationModel(config, getDescriptor());
        }
View Full Code Here

TOP

Related Classes of org.switchyard.config.model.Model

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.