Package com.volantis.mcs.migrate.impl.framework.identification

Examples of com.volantis.mcs.migrate.impl.framework.identification.DefaultTypeIdentifier


                new DefaultStreamBufferFactory();
        DefaultResourceIdentifier resourceRecogniser =
                new DefaultResourceIdentifier();
        DefaultIdentificationFactory typeFactory =
                new DefaultIdentificationFactory();
        DefaultTypeIdentifier type = new DefaultTypeIdentifier(typeFactory,
                "type");
        type.setPathRecogniser(new RegexpPathRecogniser(filename));
        type.addContentIdentifier(
                new DefaultContentIdentifier(version1,
                        new RegexpContentRecogniser(inputData)));
        DefaultGraph graph = new DefaultGraph(version2);
        Step step = new DefaultStep(version1, version2,
                new TestStreamMigrator(inputData, outputData));
        graph.addStep(step);
        type.setGraph(graph);
        resourceRecogniser.addType(type);
        DefaultResourceMigrator resourceMigrator =
                new DefaultResourceMigrator(streamBufferFactory,
                        resourceRecogniser, notificationReporter);
View Full Code Here


        // ==================================================================
        // Do the test.
        // ==================================================================

        DefaultTypeIdentifier type = new DefaultTypeIdentifier(null, "name");
        assertEquals("", "name", type.getName());
    }
View Full Code Here

        // ==================================================================
        // Do the test.
        // ==================================================================

        // Create the type.
        DefaultTypeIdentifier type = new DefaultTypeIdentifier(
                mockIdentificationFactory, "type");
        type.setPathRecogniser(mockPathRecogniser);
        type.addContentIdentifier(mockContentIdentifier);
        type.setGraph(mockGraph);

        // Do a query on the created type.
        Match actualMatch = type.identifyResource(mockInputMetadata, mockRestartStream);
        assertSame("", mockMatch, actualMatch);

    }
View Full Code Here

        // ==================================================================
        // Do the test.
        // ==================================================================

        // Create the type.
        DefaultTypeIdentifier type = new DefaultTypeIdentifier(
                mockIdentificationFactory, "type");
        type.setPathRecogniser(mockPathRecogniser);
        type.addContentIdentifier(mockContentIdentifier);
        type.setGraph(mockGraph);

        // Do a query on the created type.
        Match actualMatch = type.identifyResource(mockInputMetadata, mockRestartStream);
        assertNull("", actualMatch);

    }
View Full Code Here

        // ==================================================================
        // Do the test.
        // ==================================================================

        // Create the type.
        DefaultTypeIdentifier type = new DefaultTypeIdentifier(
                mockIdentificationFactory, "type");
        type.setPathRecogniser(mockPathRecogniser);
        type.addContentIdentifier(mockContentIdentifier);
        type.setGraph(mockGraph);

        // Do a query on the created type.
        Match actualMatch = type.identifyResource(mockInputMetadata, mockRestartStream);
        assertNull("", actualMatch);

    }
View Full Code Here

        // ==================================================================
        // Do the test.
        // ==================================================================

        // Create the type.
        DefaultTypeIdentifier type = new DefaultTypeIdentifier(
                mockIdentificationFactory, "type");
        // type.setPathRecogniser(mockPathRecogniser);
        type.addContentIdentifier(mockContentIdentifier);
        type.setGraph(mockGraph);

        // Do a query on the created type.
        try {
            /*Match actualMatch = */type.identifyResource(mockInputMetadata, mockRestartStream);
        } catch (IllegalStateException e) {
            // success
        }
    }
View Full Code Here

        // ==================================================================
        // Do the test.
        // ==================================================================

        // Create the type.
        DefaultTypeIdentifier type = new DefaultTypeIdentifier(
                mockIdentificationFactory, "type");
        // type.setPathRecogniser(mockPathRecogniser);
        type.addContentIdentifier(mockContentIdentifier);
        type.setGraph(mockGraph);

        // Do a query on the created type.
        try {
            /*Match actualMatch = */type.identifyResource(mockInputMetadata, mockRestartStream);
        } catch (IllegalStateException e) {
            fail("Path Recognition not required");
            // success
        }
    }
View Full Code Here

        // ==================================================================
        // Do the test.
        // ==================================================================

        // Create the type.
        DefaultTypeIdentifier type = new DefaultTypeIdentifier(
                mockIdentificationFactory, "type");
        type.setPathRecogniser(mockPathRecogniser);
        // type.addContentIdentifier(mockContentIdentifier);
        type.setGraph(mockGraph);

        // Do a query on the created type.
        try {
            /*Match actualMatch = */type.identifyResource(mockInputMetadata, mockRestartStream);
        } catch (IllegalStateException e) {
            // success
        }
    }
View Full Code Here

        // ==================================================================
        // Do the test.
        // ==================================================================

        // Create the type.
        DefaultTypeIdentifier type = new DefaultTypeIdentifier(
                mockIdentificationFactory, "type");
        type.setPathRecogniser(mockPathRecogniser);
        type.addContentIdentifier(mockContentIdentifier);
        // type.setGraph(mockGraph);

        // Do a query on the created type.
        try {
            /*Match actualMatch = */type.identifyResource(mockInputMetadata, mockRestartStream);
        } catch (IllegalStateException e) {
            // success
        }
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.migrate.impl.framework.identification.DefaultTypeIdentifier

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.