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

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


        // Ask the resource recogniser to see if can recognise the input
        // resource. This will throw an exception if we get duplicate matches
        // as that indicates an error in the configuration which must be solved
        // before we migrate30 the resource in question.
        Match match = resourceIdentifier.identifyResource(meta,
                restartInput);

        // Restart the input since the recogniser will have already
        // consumed it.
        restartInput.restart();

        // If we found a recognition match...
        if (match != null) {
            // ... then try and run the migration using the match.

            reporter.reportNotification(
                    notificationFactory.createLocalizedNotification(
                            NotificationType.INFO, "migration-resource-migrating",
                            new Object[]{meta.getURI(), match.getTypeName(),
                                         match.getVersionName()}));
            processMigrationSteps(match, restartInput, outputCreator);
        } else {
            // ... else, we have no match for this resource.
            // In this case, we assume the content does not require migration
            // and just copy it across to the output.
View Full Code Here


        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

        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

        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.
        // ==================================================================

        DefaultResourceIdentifier recogniser = new DefaultResourceIdentifier();
        recogniser.addType(mockTypeIdentifier);
        Match recognised = recogniser.identifyResource(mockInputMetadata, input);

        assertNotNull("", recognised);
        assertSame("", recognised, mockMatch);
    }
View Full Code Here

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

        DefaultResourceIdentifier recogniser = new DefaultResourceIdentifier();
        recogniser.addType(mockTypeIdentifier);
        Match recognised = recogniser.identifyResource(mockInputMetadata, input);

        assertNull("", recognised);
    }
View Full Code Here

        // ==================================================================

        DefaultResourceIdentifier recogniser = new DefaultResourceIdentifier();
        recogniser.addType(mockTypeIdentifier);
        recogniser.addType(mockTypeIdentifier2);
        Match recognised = recogniser.identifyResource(mockInputMetadata, input);

        assertNotNull("", recognised);
        assertSame("", recognised, mockMatch);
    }
View Full Code Here

        DefaultResourceIdentifier recogniser = new DefaultResourceIdentifier();
        recogniser.addType(mockTypeIdentifier);
        recogniser.addType(mockTypeIdentifier2);
        try {
            Match recognised = recogniser.identifyResource(mockInputMetadata, input);
            fail("two matches are not valid");
        } catch (Exception e) {
            // success
        }
    }
View Full Code Here

TOP

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

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.