Converting a hierarchical data structure into a flat data structure
First Claim
1. In a computer system, a method for converting a hierarchical data structure into a flat data structure comprising the steps of:
- a) converting said hierarchical data structure into an input data tree comprising nodes, said nodes containing the data elements of said hierarchical data structure and said nodes linked together in a parent-child relationship, said parent-child relationship derived from the hierarchical data structure;
b) constructing a shape tree corresponding to the input data tree by collapsing nodes of said input data tree containing redundant elements into one node;
c) annotating said shape tree nodes with properties describing the hierarchical relationships between elements of the input data tree;
d) building a list of column names for said flat data structure deriving said column names by tracing said shape tree; and
e) emitting data from said input data tree into proper columns and row of said flat data structure.
2 Assignments
0 Petitions
Accused Products
Abstract
Upon receipt of the hierarchical data structure, a shape tree is constructed corresponding to the hierarchical data structure. The shape tree is an intermediate data structure containing only one unique node for each element of the hierarchical data structure. After the shape tree is constructed, it is annotated with properties describing the hierarchical relationships between elements of the hierarchical data structure. The annotated shape tree is used to create the structure of the flat data structure. Once the shape tree is annotated, the column names for the flat data structure are built utilizing the annotated shape tree. With the column names built, data is emitted from the hierarchical data structure into the proper columns and rows of the flat data structure.
216 Citations
18 Claims
-
1. In a computer system, a method for converting a hierarchical data structure into a flat data structure comprising the steps of:
-
a) converting said hierarchical data structure into an input data tree comprising nodes, said nodes containing the data elements of said hierarchical data structure and said nodes linked together in a parent-child relationship, said parent-child relationship derived from the hierarchical data structure;
b) constructing a shape tree corresponding to the input data tree by collapsing nodes of said input data tree containing redundant elements into one node;
c) annotating said shape tree nodes with properties describing the hierarchical relationships between elements of the input data tree;
d) building a list of column names for said flat data structure deriving said column names by tracing said shape tree; and
e) emitting data from said input data tree into proper columns and row of said flat data structure. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
a first property specifying the maximum number of times a given element appears inside its parent across the entire input tree, a second property set equal to false if and only if the node'"'"'s first property is greater than zero or if the node has any child nodes and anyone of said child nodes have a second property set to false, and a third property set to true if every occurrence of the element corresponding to the node contains numeric data; and
wherein a column name is generated for said flat data structure when said second and said third properties are both true.
-
-
9. The method in claim 1, wherein:
- said properties include;
a first property specifying the maximum number of times a given element appears inside its parent across the entire input tree, and a second property set equal to false if and only if the node'"'"'s first property is greater than zero or if the node has any child nodes that have a second property set to false; and
wherein a column name is generated for said flat data structure when said first and said second properties are both true.
- said properties include;
-
10. A computer system for converting a hierarchical data structure into a flat data structure, the system comprising:
-
a memory for storing said hierarchical data structure and said flat data structure; and
a processing unit functionally coupled to the memory, for executing computer-executable instructions operable for;
converting said hierarchical data structure into an input data tree comprising nodes, said nodes containing the data elements of said hierarchical data structure and said nodes link together in a parent-child relationship in the same fashion as the data elements they contain were linked in the hierarchical data structure, constructing a shape tree corresponding to the input data tree by collapsing nodes of said input data tree containing redundant elements into one node, said intermediate data structure retaining the same parent-child relationship of the input data tree, annotating said shape tree nodes with properties describing the hierarchical relationships between elements of the input data tree, building a list of column names for said flat data structure utilizing said intermediate data structure as annotated, and emitting data from said input data tree into proper columns and row of said flat data structure. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17, 18)
a first property specifying the maximum number of times a given element appears inside its parent across the entire input tree, a second property set equal to false if and only if the node'"'"'s first property is greater than zero or if the node has any child nodes and anyone of said child nodes have a second property set to false, and a third property set to true if every occurrence of the element corresponding to the node contains numeric data; and
wherein a column name is generated for said flat data structure when said second and said third properties are both true.
-
-
18. The system in claim 10, wherein:
- said properties include;
a first property specifying the maximum number of times a given element appears inside its parent across the entire input tree, and a second property set equal to false if and only if the node'"'"'s first property is greater than zero or if the node has any child nodes that have a second property set to false; and
wherein a column name is generated for said flat data structure when said first and said second properties are both true.
- said properties include;
Specification