A method for transforming data includes creating an array and initializing a value in each array element of the array. The method also includes storing data in the array from data components in a source file by, for each data component in the source file, detecting a beginning of the data component
A method for transforming data includes creating an array and initializing a value in each array element of the array. The method also includes storing data in the array from data components in a source file by, for each data component in the source file, detecting a beginning of the data component and determining whether an array element corresponding to the detected data component is included in the array. If an array element corresponding to a particular data component is included in the array, a value of the corresponding array element is set based on data in the detected data component. If an array element corresponding to that data component is not included in the array, the detected data component is discarded. Additionally, the method includes writing at least a portion of the data stored in the array to a target file.
대표청구항▼
1. A method for moving data from a source file to a target file, comprising: creating an array based, at least in part, on a first data definition of a target file;initializing a value in each array element of the array;storing data in the array from at least a portion of one or more data components
1. A method for moving data from a source file to a target file, comprising: creating an array based, at least in part, on a first data definition of a target file;initializing a value in each array element of the array;storing data in the array from at least a portion of one or more data components in a source file having a second data definition, based on a mapping between the source file data components having the second data definition and one or more target file data components having the first data definition, by: determining whether an array element corresponding to each source file data component is included in the array;in response to determining that an array element corresponding to a particular data component is included in the array, setting a value of the corresponding array element based, at least in part, on data in that data component; andin response to determining that an array element corresponding to a particular data component is not included in the array, discarding that data component; andwriting at least a portion of the data stored in the array to one or more target files. 2. The method of claim 1, wherein determining whether an array element corresponding to each data component is included in the array comprises: parsing the source file;while parsing the source file, detecting the beginning of a data component; andin response to detecting the beginning of a data component, determining whether an array element corresponding to the detected data component is included in the array. 3. The method of claim 1, wherein storing data in the array comprises: parsing the source file until detecting a start of a data component matching a name of the data definition, the name corresponding to a root element described in the structure; andafter detecting the start of the root element, storing data in the array from at least a portion of the data components in the source file. 4. The method of claim 1, wherein determining whether an array element corresponding to the particular data component is included in the array comprises comparing a name associated with the data component to a name value associated with one or more array elements in the array element until determining that the name associated with the data component matches the name value of a particular array element. 5. The method of claim 1, wherein the source file comprises a hierarchical file. 6. The method of claim 5, wherein the hierarchical file comprises an XML file. 7. The method of claim 1, wherein the target file comprises a flat file. 8. The method of claim 1, wherein the target file comprises relational data. 9. The method of claim 8, wherein the relational data comprises at least a portion of a relational database. 10. The method of claim 1, wherein each of the data components comprises one of an XML element and an XML attribute. 11. The method of claim 1, wherein the target file comprises one of a database table and a flat file. 12. The method of claim 1, wherein storing data in the array comprises: determining whether a detected data component is of a repeating component type;in response to determining that the detected data component is not of a repeating component type, storing at least a portion of the data from the detected data component in a corresponding array element; andin response to determining that the detected data component is of a repeating component type, storing at least a portion of the data from the detected data component in a memory location and storing a pointer identifying the memory location in the corresponding array element. 13. The method of claim 1, wherein storing data in the array comprises: determining whether a detected data component is of a repeating component type;in response to determining that the detected data component is not of a repeating component type, storing at least a portion of the data from the detected data component in a corresponding array element; andin response to determining that the detected data component is of a repeating component type: determining whether any child component of the detected data component is of a repeating component type;in response to determining that no child component of the detected data component is of a repeating component type, storing in a memory location at least a portion of the data in any child components of the detected data component and storing a pointer identifying the memory location in the corresponding array element; andin response to determining that a child component of the detected data component is of a repeating component type: storing at least a portion of the data from the repeating child data component in a first memory location;storing at least a portion of the data from the detected data component and a pointer identifying the first memory location in a second memory location; andstoring a pointer identifying the second memory location in the corresponding array element. 14. The method of claim 1, wherein creating an array based, at least in part, on the first data definition of the source file comprises: receiving a data definition of a source file comprising an XML record definition and an XML component definition for a repeating child component associated with the XML record definition;displaying the XML record definition in a first portion of a graphical user interface (GUI);displaying the XML component definition for the repeating child component in a second portion of the graphical user interface; andcreating an array based, at least in part, on the data definition of the source file. 15. The method of claim 14, wherein creating an array based, at least in part, on the first data definition of the source file comprises: identifying a first set of data components, the first set including one or more children components of the XML record definition for which a user has created mappings in the first portion of the GUI;identifying a second set of data components, the second set including one or more children components of the repeating child component for which the user has created mappings in the second portion of the GUI; andgenerating an array element in the array for each of the identified data components. 16. The method of claim 15, wherein storing data in the array from at least a portion of the data components in the source file comprises: storing data from data components in the first set of data components in corresponding array elements; andafter storing data from data components in the first set of data component, storing data from data components in the second set of data components in a memory location and storing a pointer to the memory location in a corresponding array element.
연구과제 타임라인
LOADING...
LOADING...
LOADING...
LOADING...
LOADING...
이 특허에 인용된 특허 (23)
Hayward, Jerry Glade, Apparatus, system, and method for decentralized data conversion.
Roberts, Andrew F.; Booth, Jonathan W.; Burati, Michael R.; Beauvais, Thomas E.; Serfass, Jr., John T.; Sommers, III, Joseph, Method and apparatus for providing web based services using an XML Runtime model to store state session data.
Colon Michael ; Marks Ronald G. ; Pepine Carl J. ; Handberg-Thurmond Eileen M. ; Cooper-DeHoff Rhonda M. ; Padgett Phillip, Method and system for interactive prescription and distribution of prescriptions in conducting clinical studies.
Chang Daniel T. (San Jose CA) Lau Christina (Ontario CAX) Lee Taejae (Cupertino CA), System and method for providing a graphical user interface for mapping and accessing objects in data stores.
※ AI-Helper는 부적절한 답변을 할 수 있습니다.