Utilizing reference/ID linking in XML wrapper code generation
AssigneeInternational Business Machines Corporation
InventorsStephen F. Cuzzort, Samuel Epstein
Life of this patent
Estimating the term…
Abstract
Utilizing reference/identification (ID) linking in extensible markup language (XML) wrapper code generation in a data processing system. A code generator receives a type document and reference/ID constraints document and accesses the reference/ID constraints document to translate between XML structures and object structures.
Claims15
A method for utilizing reference/identification (ID) linking in extensible markup language (XML) wrapper code generation in a data processing system, said method comprising:
- receiving a type document and reference/ID constraints document;
- and
- accessing said reference/ID constraints document to translate between XML structures and object structures, wherein said accessing includes:
- creating a directed constraint graph from said reference/ID constraints document, wherein said directed constraint graph comprises at least one root XML structure that is not referenced by other XML structures and at least one leaf XML structure that does not reference other XML structures;
- generating a first set of deserialization code for at least one XML structure not in said directed constraint graph, wherein said first set of deserialization code translates said at least one XML structure not in said directed constraint graph into at least one object structure not in said directed constraint graph;
- creating a second set of deserialization code for said at least one XML leaf structure in said directed constraint graph, wherein said second set of deserialization code translates said at least one leaf XML structure into at least one leaf object structure;
- generating a third set of deserialization code for at least one next highest XML structure in said directed constraint graph, wherein said third set of deserialization code translates said at least one next highest XML structure into at least one next highest object structure;
- storing at least one intermediate object structure in at least one temporary hash table, wherein said at least one intermediate object structure is not a root object structure or a leaf object structure;
- and
- creating cleanup functions within said first, second, and third sets of deserialization code, wherein said cleanup functions remove all temporary hash tables utilized in object serialization.
A data processing system for utilizing reference/identification (ID) linking in extensible markup language (XML) wrapper code generation in a data processing system, said data processing system comprising:
- a processor;
- an interconnect coupled to said processor;
- and
- a computer-readable storage medium embodying computer program code, said computer program code comprising instructions executable by said processor and configured for:
- receiving a type document and reference/ID constraints document;
- and
- accessing said reference/ID constraints document to translate between XML structures and object structures, wherein said instructions for accessing further include instructions configured for:
- creating a directed constraint graph from said reference/ID constraints document, wherein said directed constraint graph comprises at least one root XML structure that is not referenced by other XML structures and at least one leaf XML structure that does not reference other XML structures;
- generating a first set of deserialization code for at least one XML structure not in said directed constraint graph, wherein said first set of deserialization code translates said at least one XML structure not in said directed constraint graph into at least one object structure not in said directed constraint graph;
- creating a second set of deserialization code for said at least one XML leaf structure in said directed constraint graph, wherein said second set of deserialization code translates said at least one leaf XML structure into at least one leaf object structure;
- generating a third set of deserialization code for at least one next highest XML structure in said directed constraint graph, wherein said third set of deserialization code translates said at least one next highest XML structure into at least one next highest object structure;
- storing at least one intermediate object structure in at least one temporary hash table, wherein said at least one intermediate object structure is not a root object structure or a leaf object structure;
- and
- creating cleanup functions within said first, second, and third sets of deserialization code, wherein said cleanup functions remove all temporary hash tables utilized in object serialization.
A computer program product comprising computer usable storage device having stored therein computer usable program code for utilizing reference/identification (ID) linking in extensible markup language (XML) wrapper code generation the computer usable program code, which when executed by a computer hardware system, causes the computer hardware system to perform:
- receiving a type document and reference/ID constraints document;
- and
- accessing said reference/ID constraints document to translate between XML structures and object structures, wherein said accessing includes:
- creating a directed constraint graph from said reference/ID constraints document, wherein said directed constraint graph comprises at least one root XML structure that is not referenced by other XML structures and at least one leaf XML structure that does not reference other XML structures;
- generating a first set of deserialization code for at least one XML structure not in said directed constraint graph, wherein said first set of deserialization code translates said at least one XML structure not in said directed constraint graph into at least one object structure not in said directed constraint graph;
- creating a second set of deserialization code for said at least one XML leaf structure in said directed constraint graph, wherein said second set of deserialization code translates said at least one leaf XML structure into at least one leaf object structure;
- generating a third set of deserialization code for at least one next highest XML structure in said directed constraint graph, wherein said third set of deserialization code translates said at least one next highest XML structure into at least one next highest object structure;
- storing at least one intermediate object structure in at least one temporary hash table, wherein said at least one intermediate object structure is not a root object structure or a leaf object structure;
- and
- creating cleanup functions within said first, second, and third sets of deserialization code, wherein said cleanup functions remove all temporary hash tables utilized in object serialization.
Dependencies are inferred from the claim text.