Method and apparatus for converting legacy programming language data structures to schema definitions
First Claim
Patent Images
1. A method for generating a schema definition, comprising:
- receiving a language-specific metamodel generated from a nested data structure definition written in a legacy computer language;
naming and defining a complex type schema element for the nested data structure; and
creating the schema definition by walking through the metamodel to examine each node in the metamodel, and for each node, creating a respective schema element according to a predefined mapped relationship.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus for creating a schema definition from a language-specific metamodel of a data structure written in a legacy computer language involves walking through the nodes of the metamodel, and creating corresponding schema element objects in a schema tree that is serialized to create the schema definition. The creation of the schema element objects follows rules, and permits the definition of nested data structures having conjunctive-type and disjunctive-type membership.
-
Citations
39 Claims
-
1. A method for generating a schema definition, comprising:
-
receiving a language-specific metamodel generated from a nested data structure definition written in a legacy computer language;
naming and defining a complex type schema element for the nested data structure; and
creating the schema definition by walking through the metamodel to examine each node in the metamodel, and for each node, creating a respective schema element according to a predefined mapped relationship. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 19)
-
-
15. A method as claimed in claim 15 wherein setting a minimum and maximum comprises determining if the array is of fixed-length or variable-length, and setting the number of fields accordingly.
-
16. A method as claimed in claim 16 wherein setting a data type of the field further comprises determining if the field is non-primitive, and if so, creating a complex type object that is a child of a root of the schema tree, and setting a content model to sequence.
-
20. Apparatus for generating a schema definition from a definition of a nested data structure written in a legacy computer language comprising:
-
an interface through which a language-specific metamodel generated from the nested data structure definition is received;
a naming resource that generates names for schema elements derived from names of corresponding nodes of the language-specific metamodel;
a data control system for walking through the nodes of the metamodel; and
a mapping module adapted to receive nodes, inspect their content, and generate a corresponding part of a schema definition to produce a schema definition for the nested data structure. - View Dependent Claims (21, 22)
-
-
23. Apparatus as claimed in claim 23 wherein the data control system performs a walk through by selecting successive nodes of the language-specific metamodel according to a breadth-first search algorithm.
-
24. Apparatus as claimed in claim 24 wherein the mapping module is adapted to inspect the node to determine a type of the node, and then to apply a mapping to the data structure in dependence upon the determined type of the node.
- 25. Apparatus as claimed in claim 25 wherein the mapping module creates simple type schema elements by assigning a name and data type to the element, and optionally assigning one or more of a data type restriction and an expected default value, in accordance with a native interpretation of the node.
-
29. Apparatus as claimed in claim 29 wherein the mapping module further determines if the base field is of non-primitive type, in which case it further creates a complex type schema element for the base type.
-
30. A computer-readable medium containing program instructions for generating a schema definition, comprising:
-
instructions for receiving a language-specific metamodel generated from a nested data structure definition written in a predetermined legacy computer language;
instructions for naming and defining a complex type schema element for the nested data structure; and
instructions for creating the schema definition by walking through the metamodel to examine each node in the metamodel, and for each node, creating a respective schema element according to a predefined mapped relationship. - View Dependent Claims (31, 32, 33, 34, 35, 36, 37, 38, 39)
-
Specification