Method and Apparatus for Converting Legacy Programming Language Data Structures to Schema Definitions
AssigneeInternational Business Machines Corporation
InventorsSuman K. Kalia, Sheng Fang, John H. Green
Life of this patent
Estimating the term…
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.
Claims20
1-19. (canceled)
Apparatus for generating a schema definition from a definition of a nested data structure definition defined in a legacy computer language comprising:
- a source code stored in a computer readable storage medium, wherein the source code is written in a legacy computer language, and wherein a plurality of identified data structures are identified by scanning the source code;
- a Graphical User Interface (GUI) from which a nested data structure is selected from the plurality of identified data structures;
- an interface through which a language-specific metamodel generated from the nested data structure definition is received;
- a naming resource that generates names and definitions for a first complex type schema element for the nested data structure, wherein naming and defining comprises setting a content model of the first complex type schema element to sequence;
- a data control system for walking through the language-specific metamodel to examine each node in a plurality of nodes of the language-specific metamodel, and for each node;
- and
- a mapping module adapted to receive nodes, inspect their content, and generate a corresponding part of a schema definition according to a predefined mapped relationship to produce a schema definition for the nested data structure, wherein creating the schema definition further comprises populating a schema tree and serializing the schema tree after it is populated.
A tangible computer storage medium having computer program instructions encoded thereon for generating a schema definition, comprising:
- instructions for identifying a plurality of identified data structures by scanning a source code stored in a computer readable storage medium, wherein the source code is written in a legacy computer language;
- instructions for selecting via a Graphical User Interface (GUI) a nested data structure from the plurality of identified data structures;
- instructions for receiving a language-specific metamodel generated from the nested data structure definition written in the legacy computer language;
- instructions for naming and defining a first complex type schema element for the nested data structure, wherein naming and defining comprises setting a content model of the first complex type schema element to sequence;
- instructions for creating the schema definition by walking through the metamodel to examine each node in a plurality of nodes of the language-specific metamodel, and for each node, creating a respective schema element according to a predefined mapped relationship, wherein creating the schema definition further comprises populating a schema tree;
- and
- serializing the schema tree after it is populated.
32-33. (canceled)
Dependencies are inferred from the claim text.