The present invention relates to artifact transformation, and more particularly to an extensible framework for automated artifact transformation.
As technology changes and advances, legacy applications, code, documents, or data need to be migrated or transformed. Conventional transformation processes are either manually performed or limited to particular artifact types. However, this is cumbersome when a large number of artifacts need to be transformed. This process is further complicated by the fact that different types of artifacts may be mixed together.
Accordingly, there exists a need for a method and system for providing an extensible transformation framework. The framework should be able to automatically classify different types of artifacts and perform the appropriate transformation of each artifact. The framework should also be extensible such that more artifact types and corresponding transformation algorithms can be added. This is useful when additional artifact types may need to be handled in the future, or when a third party vendor has the expertise to handle particular artifact types. The present invention addresses such a need.
A method and system providing an extensible transformation framework have been disclosed. The framework in accordance with the method and system receives a plurality of artifacts as input. The framework calls classifiers to determine a type for each of the plurality of artifacts. The classifiers create work units for each artifact or group of related artifacts (as grouped and determined by the classifier) containing information appropriate for the artifact's type. The framework then calls the transformation algorithm corresponding to each artifact's type to transform the artifacts. In this manner, the framework automatically classifies different types of artifacts, optionally grouping related artifacts in a way that is consistent to the artifact type, and performs the appropriate transformation of each artifact or group of artifacts. The framework is also extensible, such that more artifact types and corresponding transformation algorithms can be added.
The present invention provides a method and system for providing an extensible transformation framework. The following description is presented to enable one of ordinary skill in the art to make and use the invention and is provided in the context of a patent application and its requirements. Various modifications to the preferred embodiment will be readily apparent to those skilled in the art and the generic principles herein may be applied to other embodiments. Thus, the present invention is not intended to be limited to the embodiment shown but is to be accorded the widest scope consistent with the principles and features described herein.
To more particularly describe the features of the present invention, please refer to
In this manner, the artifacts 102 can be of mixed types and can be treated in a uniform way by the framework 101. The different types of artifacts need not be separated manually before transformation. Futhermore, a new artifact type can be added by registering a classifier algorithm for the new type and by providing its corresponding transformation algorithm.
For example, assume that the artifacts 102 are extensible markup language (XML) documents that conform to three different schemas, each schema defining a document type. The XML documents are to be transformed to new schema types. As illustrated in
Since there are more XML documents, via step 308, the framework 101 examines the second XML document 502, via step 309. The framework 101 calls the first classifier 505, via step 302. The first classifier 505 determines that the second XML document 502 is of schema type 1, via step 303, and creates a work unit 509 for the XML document 502 with the information appropriate for schema type 1, via step 306. This work unit 509 is added to the list of work units, via step 307.
The framework 101 then examines the third XML document 503, via step 309. The framework 101 calls the first classifier 505, via step 302. The first classifier 505 does not recognize the third XML document's schema, via step 303. Since there are more known schemas, via step 304, the framework 101 calls the next classifier 506, via step 305, which handles schema type 2. The classifier algorithm 506 determines that the third XML document 503 is of schema type 2, via step 303, and creates a work unit 510 with information appropriate for schema type 2, via step 306. The work unit 510 is added to the list of work units, via step 307.
The framework 101 then examines the fourth XML document 504, via step 309. The framework 101 calls the first classifier 505, via step 302. The first classifier 505 does not recognize the fourth XML document's schema, via step 303. The framework 101 then calls the second classifier 506, via step 305. The second classifier 506 also does not recognize the fourth XML document's schema, via step 303. The framework 101 then calls the third classifier 507, via step 305. The third classifier 507 determines that the fourth XML document 504 is of schema type 3, via step 303, and creates a work unit 511 with information appropriate for schema type 3, via step 306. The work unit 511 is added to the list of work units, via step 307.
Once each of the XML documents 501-504 has been classified, the framework 101 performs the transformation process. This process begins with the framework 101 examining the first work unit 508 on the list, via step 401. The work unit 508 is then passed to the transformation algorithm 512 corresponding to schema type 1, via step 402. The transformation algorithm 512 transforms the work unit 508 into the transformed XML document 515 and outputs it, via step 403.
Since there are more work units on the list, via step 404, the framework 101 examines the next work unit 509 on the list, via step 405. The framework 101 passes the work unit 509 to the transformation algorithm 512 corresponding to schema type 1, via step 402. The transformation algorithm 512 transforms the work unit 509 into the transformed XML document 516 and output its, via step 403.
The framework 101 then examines the next work unit 510 on the list, via step 405. The framework 101 passes the work unit 510 to the transformation algorithm 513 corresponding to schema type 2, via step 402. The transformation algorithm 513 transforms the work unit 510 into the transformed XML document 517 and output its, via step 403.
The framework 101 then examines the next work unit 511 on the list, via step 405. The framework 101 passes the work unit 511 to the transformation algorithm 514 corresponding to schema type 3, via step 402. The transformation algorithm 514 transforms the work unit 511 into the transformed XML document 518 and output its, via step 403.
In this embodiment, the method in accordance with a preferred embodiment of the present invention is implemented in software. As illustrated in
A method and system providing an extensible transformation framework have been disclosed. The framework in accordance with the method and system receives a plurality of artifacts as input. The framework calls classifiers to determine a type for each of the plurality of artifacts. The classifiers create work units for each artifact containing information appropriate for the artifact's type. The framework then calls the transformation algorithm corresponding to each artifact's type to transform the artifacts. In this manner, the framework automatically classifies different types of artifacts and performs the appropriate transformation of each artifact. The framework is also extensible, such that more artifact types and corresponding transformation algorithms can be added.
Although the present invention has been described in accordance with the embodiments shown, one of ordinary skill in the art will readily recognize that there could be variations to the embodiments and those variations would be within the spirit and scope of the present invention. Accordingly, many modifications may be made by one of ordinary skill in the art without departing from the spirit and scope of the appended claims.