Package org.apache.tuscany.sca.core

Examples of org.apache.tuscany.sca.core.DefaultExtensionPointRegistry


    static StAXArtifactProcessor<Object> xproc;
    static ProcessorContext ctx;

    @BeforeClass
    public static void setUp() throws Exception {
        final DefaultExtensionPointRegistry ep = new DefaultExtensionPointRegistry();
        final Contribution contrib = new DefaultContributionFactory().createContribution();
        contrib.setLocation(here());
        ctx = new ProcessorContext(contrib, null);
        xif = XMLInputFactory.newInstance();
        xof = XMLOutputFactory.newInstance();
View Full Code Here


    private CompositeModelResolver resolver;
    private ExtensionPointRegistry extensionPoints;

    @Before
    public void init() throws Exception {
        extensionPoints = new DefaultExtensionPointRegistry();
        inputFactory = XMLInputFactory.newInstance();

        StAXArtifactProcessorExtensionPoint staxProcessors =
            extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null);
View Full Code Here

    private static StAXArtifactProcessor<Object> staxProcessor;
    private static ProcessorContext context;
   
    @BeforeClass
    public static void setUp() throws Exception {
        ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
        context = new ProcessorContext(extensionPoints);
       
        inputFactory = XMLInputFactory.newInstance();
        StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null);
    }
View Full Code Here

    private static XMLOutputFactory outputFactory;
    private static ProcessorContext context;
   
    @BeforeClass
    public static void setUp() throws Exception {
        DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
        context = new ProcessorContext(extensionPoints);
        StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
        inputFactory = XMLInputFactory.newInstance();
        outputFactory = XMLOutputFactory.newInstance();
        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, outputFactory);
    }
View Full Code Here

        assertTrue(inited);
    }

    @BeforeClass
    public static void setUp() throws Exception {
        registry = new DefaultExtensionPointRegistry();
        FactoryExtensionPoint factories = registry.getExtensionPoint(FactoryExtensionPoint.class);
        loader = new ImportSDOProcessor(registry);
        xmlFactory = factories.getFactory(XMLInputFactory.class);
    }
View Full Code Here

     * @see junit.framework.TestCase#setUp()
     */
    @Override
    protected void setUp() throws Exception {
        super.setUp();
        binding = new SDODataBinding(new DefaultExtensionPointRegistry());
        context = HelperProvider.getDefaultContext();
        SdoFactory.INSTANCE.register(context);
    }
View Full Code Here

        assertTrue(EqualityHelper.INSTANCE.equal(dataObject, d));
    }
   
    public final void testTransform1() throws XMLStreamException {
        XMLStreamReader reader = new DataObject2XMLStreamReader().transform(dataObject, context);
        XMLStreamReader2Node t2 = new XMLStreamReader2Node(new DefaultExtensionPointRegistry());
        org.w3c.dom.Node node = t2.transform(reader, context);
        assertNotNull(node);
        Node2String t3 = new Node2String(new DefaultExtensionPointRegistry());
        String xml = t3.transform(node, context);
        assertTrue(xml.contains("xmlns:xsi"));
    }
View Full Code Here

        Node node = new DataObject2Node().transform(dataObject, context);
        Assert.assertNotNull(node);
        Element element = (Element) node;
        Assert.assertEquals(ORDER_QNAME.getNamespaceURI(), element.getNamespaceURI());
        Assert.assertEquals(ORDER_QNAME.getLocalPart(), element.getLocalName());
        DataObject po = new Node2DataObject(new DefaultExtensionPointRegistry()).transform(node, reversedContext);
        Assert.assertTrue(po instanceof PurchaseOrderType);
        PurchaseOrderType orderType = (PurchaseOrderType)po;
        Assert.assertEquals("San Jose", orderType.getBillTo().getCity());
    }
View Full Code Here

    private static StAXArtifactProcessor<Object> staxProcessor;
    private static ProcessorContext context;

    @BeforeClass
    public static void setUp() throws Exception {
        DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
        context = new ProcessorContext(extensionPoints);
        inputFactory = XMLInputFactory.newInstance();
        outputFactory = XMLOutputFactory.newInstance();
        StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints);
        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, outputFactory);
View Full Code Here

     * @see junit.framework.TestCase#setUp()
     */
    @Override
    protected void setUp() throws Exception {
        super.setUp();
        new SDODataBinding(new DefaultExtensionPointRegistry());
        helperContext = HelperProvider.getDefaultContext();
        SdoFactory.INSTANCE.register(helperContext);
       
        context = new TransformationContextImpl();
        context.setSourceDataType(getSourceDataType());
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.core.DefaultExtensionPointRegistry

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.