WO2002101579A1 - System & method of mapping between software objects & structured language element-based documents - Google Patents
System & method of mapping between software objects & structured language element-based documents Download PDFInfo
- Publication number
- WO2002101579A1 WO2002101579A1 PCT/US2001/049577 US0149577W WO02101579A1 WO 2002101579 A1 WO2002101579 A1 WO 2002101579A1 US 0149577 W US0149577 W US 0149577W WO 02101579 A1 WO02101579 A1 WO 02101579A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- document
- structured language
- xml
- mapping
- language elements
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/103—Formatting, i.e. changing of presentation of documents
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/14—Tree-structured documents
- G06F40/143—Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/151—Transformation
- G06F40/154—Tree transformation for tree-structured or markup documents, e.g. XSLT, XSL-FO or stylesheets
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/226—Validation
Definitions
- the present invention relates to the field of converting or mapping between a software object and a structured language element document, and in particular to mapping between various software objects such as JavaTM objects and Extensible Markup Language (XML) documents.
- software objects such as JavaTM objects and Extensible Markup Language (XML) documents.
- Extensible Markup Language is a pared down version of Standard Generalized Markup Language (SGML) that is designed especially for Web documents. It enables designers to create their own customized tags to provide functionality not available with HTML. For example, XML supports links that point to multiple documents, as opposed to HTML links, which can reference just one destination each.
- SGML Standard Generalized Markup Language
- XML is a form of self-describing data (also termed structured language elements in the present description), it is used to encode rich data models. Therefore, XML is useful as a data exchange medium between dissimilar systems. Data can be exposed or published as XML from many kinds of systems: legacy COBOL programs, databases, C++ programs and the like. A business problem that is commonly encountered involves resolving how to map information from an XML document to other data formats and vice versa. For example, once information has been exchanged between entities in an XML document, it may be necessary to map its information into a Java object that can be used when making a database or transactional request.
- U.S. Patent 6,125,391 issued September 26, 2000 to Meltzer et al. discloses an example of an XML/Java conversion tool.
- Meltzer et al. parse the XML document and raise events.
- a parser walks through an XML document and builds a tree representation in memory that can be queried and another parser walks an XML document and raises events with information about the document (e.g., start document event, start element vent with the name of the element, content of the element, end element event, end document event, etc.).
- start document event start element vent with the name of the element, content of the element, end element event, end document event, etc.
- Meltzer et al. generates code that contains accessors for each element.
- the accessor for an element contains a loop, looping for each character.
- the loop contains a switch statement that performs an action based on what the character is.
- the action is to build a StringBuffer containing the element fragment of the XML document.
- the Meltzer et al. solution does not provide supporting infrastructure for working with the code that transforms Java to XML. All the code in Meltzer et al. is generated and is not conducive for a user to edit.
- mapping framework to support mapping between software objects and structured language element based documents (e.g. XML) that can be efficiently implemented using standard tools.
- mapping between a document e.g. an XML document
- a software object e.g. a Java object
- the framework uses a handler that masks how a property is obtained for mapping. This results in mapping code that has a common appearance for both directions of mapping.
- a mapping between elements of an XML document and the properties of a Java object is contained in a mapper.
- a mapper maps from the XML document to a software object through the use of a parser (such as Document Object Model (DOM) or Simple Application Programming Interface (API) for XML (SAX)).
- a parser such as Document Object Model (DOM) or Simple Application Programming Interface (API) for XML (SAX)
- JSP JavaServer PagesTM
- Using JSP based templates enables tags of the document to be written in the JSP, with callbacks to get element and attribute values.
- JSP is well documented with editor support to permit efficient template creation. Further, content can be directed to a buffer, or directly to a response stream of a servlet.
- a computer-implemented method for converting a data structure representing a software object to structured language elements of a document comprising: (a) generating a structured language element template document; (b) reading properties from the software object, the properties being associated with the structured language elements of the document; (c) using the properties, obtaining constructs defined by the structured language elements based on the association between the properties and the structured language elements; and (d) populating the structured language element template document with the constructs.
- a computer- implemented method for converting structured language elements of a document to a data structure representing a software object comprising: (a) reading each of the structured language elements of the document; (b) determining a property, selected from a set of available properties defined by the data structure of the software object, associated with structured language elements of the document; and (c) populating the properties of the data structure representing the software object with structured language element values from the document.
- a system for converting a software object containing properties to a document defined by structured language elements comprising: (a) a document template; (b) a handler interface for providing a representation of the structured language elements of the document based on call backs made by the document template; (c) a mapping module, in communication with the handler interface, for converting properties of the software objects to structured language elements recognized by the document; and (d) an output target class, in communication with the mapping module, for writing the structured language elements generated in step (c) to the document.
- a system for converting a document containing structured language elements to a software object comprising: (a) a parser for obtaining events representative of features of the document; (b) an input source class for reading the document; (c) a content handler class, in communication with the input source class, for implementing a buffer for the events obtained by the parser; and (d) a mapping module, in communication with the content handler class, for converting the events obtained by the parser to properties for the software object.
- a method of converting a software object having properties to a document represented by structured language elements comprising: (a) supplying the software object to an instance of an invoked mapping interface; (b) compiling and executing a template using an instance of an invoked container; and (c) writing the document to a specified output stream using the compiled template.
- a method of converting a document containing structured language elements to a software object comprising: (a) supplying the document to an instance of an invoked mapping interface; (b) registering the mapping interface as a content handler; (c) parsing the document using an instance of an invoked parser; and (d) populating the software object with properties associated with structured language elements parsed from the document through call backs made to the mapping interface.
- a computer program product for converting a data structure representing a software object to structured language elements of a document
- the computer program product comprising computer readable program code devices for: (a) generating a structured language element template document; (b) reading properties from the software object, the properties being associated with the structured language elements of the document; (c) using the properties, obtaining constructs defined by the structured language elements based on the association between the properties and the structured language elements; and (d) populating the structured language element template document with the constructs.
- a computer program product for converting structured language elements of a document to a data structure representing a software object
- the computer program product comprising computer readable program code devices for: (a) reading each of the structured language elements of the document; (b) determining a property, selected from a set of available properties defined by the data structure of the software object, associated with structured language elements of the document; and (c) populating the properties of the data structure representing the software object with structured language element values from the document.
- Fig. 1 is a block diagram of a computer system that may be used to implement a method and apparatus for embodying the invention
- Fig. 2 is a block diagram illustration the framework for mapping between XML and Java objects and vice versa;
- Fig. 3 is a flow chart illustrating a method of mapping an XML document to a software object using the framework of Fig. 2;
- Fig. 4 is a flow chart illustrating a method of mapping a software object to an XML document using the framework of Fig. 2.
- Fig. 1 Detailed Description of Embodiments of the Present Invention Fig. 1 and the associated description represent an example of a suitable computing environment in which the invention may be implemented. While the invention will be described in the general context of computer-executable instructions of a computer program that runs on a personal computer, the invention can also be implemented in combination with other program modules.
- program modules include routines, programs, components, data structures and the like that perform particular tasks or implement particular abstract data types.
- the present invention can also be implemented using other computer system configurations, including hand- held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframe computers and the like.
- the invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network.
- program modules may be located in both local and remote memory storage devices.
- an exemplary system 10 includes a conventional personal computer 20, including a processing unit 22, a system memory 24, and a system bus 26 that couples various system components including the system memory 24 to the processing unit 22.
- the system bus 26 includes several types of bus structures including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of conventional bus architectures (e.g., PCI, VESA, ISA, EISA etc.)
- the system memory 24 includes read only memory (ROM) 28 and random access memory (RAM) 30.
- ROM read only memory
- RAM random access memory
- a basic input/output system (BIOS) 32 containing the basic routines that help to transfer information between elements within the computer 20, such as during start-up, is stored in the ROM 28.
- the computer 20 also includes a hard disk drive 34, magnetic disk drive 36 (to read from and write to a removable disk 38), and an optical disk drive 40 (for reading a CD- ROM disk 42 or to read from or write to other optical media).
- the drives 34, 36 and 40 are connected to the system bus 26 by interfaces 44, 46 and 48, respectively.
- the drives 34, 36 and 40 and their associated computer-readable media (38, 42) provide nonvolatile storage of data, data structures, and computer-executable instructions for the computer 20.
- the storage media of Fig. 1 are merely examples and it is known by those skilled in the art to include other types of media that are readable by a computer (e.g., magnetic cassettes, flash memory cards, digital video disks, etc.).
- a number of program modules may be stored in the drives 34, 36 and 40 and the RAM 30, including an operating system 50, one or more application programs 52, other program modules 54 and program data 56.
- a user may enter commands and information into the computer 20 through a keyboard 58 and an input device 60 (e.g., mouse, microphone, joystick, game pad, satellite dish, scanner etc.)
- input device 60 e.g., mouse, microphone, joystick, game pad, satellite dish, scanner etc.
- These devices (58 and 60) are connected to the processing unit 22 through a port interface 62 (e.g., serial port, parallel port, game port, universal serial bus (USB) etc.) that is coupled to the bus 26.
- a monitor 64 or other type of display device is also connected to the bus 26 through an interface 66 (e.g., video adapter).
- the computer 20 may operate in a networked environment using logical connections to one or more remote computers, such as remote computer 68.
- the remote computer 68 may be a server, a router, a peer device or other common network node, and typically includes many or all of the elements described in relation to the computer 20, although for simplicity only a memory storage device 70 is shown.
- the logical connections shown in Fig. 1 include a local area network (LAN) 72 and a wide area network (WAN) 74.
- LAN local area network
- WAN wide area network
- the computer 20 When used in a LAN networking environment, the computer 20 is connected to the LAN 72 through a network interface or adapter 76. When used in the WAN networking environment, the computer 20 typically includes a modem 78 or other means for establishing communications over the WAN 74, such as the Internet.
- the modem 54 which may be internal or external, is connected to the bus 26 through the port interface 62.
- program modules depicted relative to the computer 20, or portions thereof, may be stored in the remote memory storage device 70.
- Discussion of the method of the present invention is based in terms of conversion/mapping from XML to Java objects and from Java objects to XML.
- Other data formats are also supported.
- COBOL many legacy business applications are written in COBOL, C and PL1. These applications are composed of programs that reside in Enterprise Information Systems (EIS) such as CICSTM (general purpose online transaction processing software) or IMSTM (Information Management System).
- EIS Enterprise Information Systems
- CICSTM general purpose online transaction processing software
- IMSTM Information Management System
- the present invention can be used to perform these maps, where a XML-to-object X mapping handler (discussed below) would populate a COBOL structure from the XML document and an object-X-to-XML mapping handler (discussed below) would extract the data from a COBOL structure and be used by a template to populate the XML document.
- a XML-to-object X mapping handler discussed below
- an object-X-to-XML mapping handler discussed below
- mapping methods of the present invention utilize the following high level process: (a) a lexer groups characters into words or tokens that are recognized by a particular system (termed tokenizing); (b) a parser analyses groups of tokens in order to recognize legal language constructs; and (c) a code generator takes a set of legal language constructs and generates executable code.
- the functions defined by (a)-(c) can be intermixed. For example, for XML to Java object mapping, every character in a XML document is analyzed in order to recognize legal XML tokens such as start tags, properties, end tags and "CD ATA" sections. Then, the tokens must be verified that they form legal XML constructs.
- XML parsers handle the lexical analysis and parsing tasks.
- Two example parsing standards are the SAX and DOM APIs (SAX - Simple Application Programming Interface (API) for XML; DOM - Document Object Model).
- SAX is event-based.
- XML parsers that implement SAX generate events that correspond to different features found in the parsed XML document.
- the DOM API is an object-model-based API.
- XML parsers that implement DOM create a generic object model in memory that represents the contents of the XML document. Once the XML parser has completed parsing, the memory contains a tree of DOM objects that offers information about both the structure and contents of the XML document.
- Fig. 2 illustrates a schematic representation of a framework 100 according to an embodiment of the present invention.
- the framework 100 is shown instantiated in an integration component 102 such as a Servlet that can be executed in the system 10 of Fig. 1.
- the integration component 102 includes a parser 104 implemented using DOM or SAX, for example, that interacts with an XML-OBJECT mapping module 106.
- SAX will be discussed as an example of the parser 104 in describing the implementation embodiments of the present invention.
- the XML-OBJECT mapping module 106 receives an input XML document 108 and generates an output Java object 110.
- the integration component 102 further includes an XML document template module 112 (e.g. based on JavaServer PagesTM - JSP technology) that communicates with an OBJECT-XML mapping module 114.
- the OBJECT-XML mapping module 114 receives an input Java object 116 and generates an output XML document 118.
- the XML-OBJECT mapping module 106 includes the following components:
- a buffered content handler class 106-2 (XML2xBufferedContentHandler) for implementing a buffer for SAX events generated by the parser 104;
- mapping interface 106-3 (XML2xMapping) for executing the mapping and for setting input an output target streams
- mapping class 106-4 (XML2xMappingImpl) that provides methods for mapping from the input XML document 108 to the output Java object 110.
- class and “interface” have specific meanings in Java.
- a Java class (abstract, inner or final) is a collection of data members and methods that define a particular object and a Java interface is used to impose certain functionality on a class that implement them (i.e. interfaces specify what classes must do). Interfaces are also used to provide constants that can be used by the classes that implement the interface. Interfaces contain constant variables and method declarations, but the implementation of the methods is left to the classes that implement the interface.
- a class can implement any number of interfaces.
- Table M106-1 summarizes the main functions (i.e., not exhaustive) of the input source class 106- 1 (XML2xInputSource).
- XML2xInputSource is used so that an XML document can be read from a byte stream, a character stream or the XML2xBufferedContentHandler 106-2. TABLE Ml 06-1
- FUNCTION DESCRIPTION availableO returns the number of bytes that can be read from an input stream without blocking- getBufferedHandler 0 Gets the SAX event buffered handler. getBvteStream 0 Returns a byte stream getCharacterStream 0 Returns a character stream reader- read 0 Reads the next byte of data from this input stream- skip 0 Skips bytes of input from this input stream.
- Table M106-2 summarizes the main functions (i.e., not exhaustive) of the buffered content handler class 106-2 (XML2xBufferedContentHandler).
- the handler class 106-2 also includes a content handler to buffer SAX events from the parser 104. This allows events to be replayed.
- An example where this feature is useful is where different mapping handlers are used for different portions of an XML document.
- An implementation example is the Simple Object Access Protocol (SOAP).
- SOAP Simple Object Access Protocol
- SOAP is a lightweight protocol for exchange of information in a decentralized, distributed environment. It is an XML based protocol that consists of three parts: (1) an envelope that defines a framework for describing what is in a message and how to process it; (2) a set of encoding rules for expressing instances of application-defined data types; and (3) a convention for representing remote procedure calls and responses.
- a SOAP message is an XML document that consists of a mandatory SOAP envelope, an optional SOAP header, and a mandatory SOAP body. In this situation, it is possible to use a different mapping handler for the envelope and the body.
- Table Ml 06-3 summarizes the main functions (i.e., not exhaustive) of the mapping interface 106- 3 (XML2xMapping). XML2xMapping executes the mapping and allows configuration of the InputStream.
- executeQ Performs the mapping that will create the format from the input XML document 108.
- a full example of executeQ is provided below. setlnputStreamQ Sets the input stream - i.e., specifies the source of the
- Input XML document 108 that is to be mapped.
- Table Ml 06-4 summarizes the main functions (i.e., not exhaustive) of the mapping class 106-4 (XML2xMappingImpl). As discussed above in relation to the definitions of class and interface, the XML2xMappingImpl class is not used directly, but is sub-classed with content added to appropriate methods depending on document type definitions for the input XML document 108 to be mapped from the output Java object 110 it is mapping to. TABLE Ml 06-4
- EndElementf Receives notification of the end of an element.
- the parser 104 will invoke this method at the end of every element in the input XML document 108.
- There is a corresponding startElementQ event for every endElement - event even when the element is empty- executeO Performs the mapping that will create the format from the input XML document 108
- setDocumentLocatorO Receives an object for locating the orgin of SAX document events.
- setlnputStreamQ Sets the input stream. Specifies the source for the XML document that is to be mapped.
- startElementQ Receives notification of the beginning of an element.
- the parser 104 invokes this method at the beginning of every element in the input XML document 108. There is a corresponding endElementQ event for every startElementQ event - even when the element is empty- All of the element's content is reported, in order, before the corresponding endElementQ event.
- a method 300 is illustrated showing the general steps that are performed to map the XML document 108 to the software object 110 (e.g., a Java Bean):
- mapping interface 106-4 e.g., XML2XMapping
- mapping interface 106-4 invokes the mapping interface 106-4 at step 304 and supply. the input XML document 108 at step 306;
- mapping interface 106-4 obtains an instance of an event parser (e.g., the parser 104) at step 308 and registers the mapping interface 106-4 as a content handler (e.g., buffered content handler class 106-2) at step 310;
- an event parser e.g., the parser 104
- a content handler e.g., buffered content handler class 106-2
- step (e) as step (d) is performed, call backs occur to the mapping interface 106-4 invoking various methods at step 314 (e.g., startDocument, startElement, characters, endElement, endDocument, etc.);
- mapping interface 106-4 creates the software object 110 at step 316;
- mapping interface 106-4 sets the element into the software object 110 at step 318.
- the SAX API includes many specifications known in the art.
- the present invention is concerned with creating a class that implements a "ContentHandler" interface, which is a callback interface used by XML parsers to notify a program of SAX events as they are found in the XML document.
- the interface is used with the
- the SAX API also provides a "DefaultHandler” implementation class for the "ContentHandler” interface.
- customer java the output customer Java Bean 110; and
- CustomerSymbols.java contains integer constants and a hashmap. The hashmap is used to map the names of tags to integer constants for use in XML2CustomerMapping.java.
- a program (execute java), with reductions for conciseness, used to execute mapping from XML to Java (and from Java to XML as detailed in Example II below).
- XML2CustomerMapping inMapping new XML2CustomerMapping ( )
- Customer2XMLMapping outEventBasedMapping new Customer2XMLMapping ( ) ;
- a customer Java Bean (customer .java) is detailed below.
- a Java Bean is a reusable component that adheres to a standard design architecture known in the art.
- a Bean is a class object that may or may not be visible at run time.
- JavaBeans provide a component architecture, a standard framework for developing components.
- mapping from XML to Java is efficient because the parser 104 processes events for all start, element and end tags, which improves tracking of the events.
- CustID to populate the Customer object
- endElement for Customer to insert the Customer object into the vector
- endElement for Customers to create an array of Customers from the vector and set it into the Java object being working with.
- a stack is maintained by the parser 104 for recursive XML structures (i.e., XML elements that represent lists of lists). For each startElement an object is created. The stack can be used to keep state as required. Once a child element is created it can be set into its parent object.
- the OBJECT-XML mapping module 114 includes the following components:
- a handler interface 114-1 (X2XMLHandler) for managing parsing events
- mapping interface 114-2 (X2XMLMapping) for executing the mapping and setting an output target stream;
- mapping class 114-3 (X2XMLMappingImpl) that provides methods for mapping from the input Java object 116 to the output XML document 118; and (d) an output target class 114-4 (X2XMLOutputTarget) to implement the output XML document 118.
- Table Ml 14-1 summarizes the main functions (i.e., not exhaustive) of the handler interface 114-1 (X2XMLHandler).
- the mapping module 114 implements the interface 114-1 and registers an instance with a JSP container.
- the document template 112 malces call backs to the mapping module 114 for basic document related events like the start and end of elements and to get an element value.
- getElementValueQ Returns the value of an element. This is used when working with simple types that are not scoped by start and end element tags.
- EndElementQ Receives notification of the end of an element. This is used for maintaining state when working with a complex type.
- getElementAttributeQ Returns the specified attribute's value. This is used when working with a complex type that is scoped by start and end element tags.
- This is used in the XML document template (JSP) 112 for controlling whether name and value are generated for an optional attribute in the XML document 118. This is used when working with a complex type that is scoped by start and end element tabs.
- startElementQ Receives notification of the beginning of an element.
- a container is an entity that provides life cycle management, security, deployment and runtime services to components.
- a servlet container is a container that provides network services over which requests and responses are sent, decodes requests, and formats responses.
- a JSP container is a container that provides the same services as a servlet container and an engine that interprets and processes JSP pages into a servlet.
- X2XMLHandler 114-1 provides a mirror (although not identical) image of parsing events to that produced by the parser 104. In effect, the structure provided by the parser 104 is mirrored in the path from X2XML.
- the handler 106-2 When the parser 104 is implemented using SAX the events are received by the handler 106-2 (i.e., effectively a callback mechanism) that processes them.
- the handler 106-2 is used to populate a Java class.
- the handler 114-1 processes the callback by obtaining the requested data and maintaining the state of parsing.
- handler interface 114-1 is similar in terms of the various functions performed by the XML-OBJECT mapping module 106 there are certain differences.
- An element name is generated or hand coded, and is not taken from a schema with "namespace" support.
- the element name can be made unique for each element. Therefore, only a name parameter is required on the startElement and endElement methods.
- mapping is performed by the XML-OBJECT mapping module 106
- the input source class 106-1 i.e., an XMLReader
- the element name is paired with a unique number. This number is used in a switch statement to control the processing of the elements.
- processing is optimized and coding assistance is improved by defining the element name as an integer constant. Therefore, callbacks to these methods use integer constants instead of strings.
- the order of events in the handler interface 114-1 mirrors the order of information in the object 116 themselves.
- the XML document template 112 (written using JavaServer Pages technology), uses the coding style detailed below. JSP technology separates the user interface from content generation enabling changing to the overall page layout without altering the underlying dynamic content. JavaServer Pages is an extension of the Java Servlet technology, which is well known to those skilled in the art.
- XML document template 112 - JSP coding style example Callbacks are coded for the start and end tags of the document 118 and for complex types. This allows the handler 114-1 to maintain state.
- the start and end tags are also coded directly so that they will be directed to the targeted output stream.
- callbacks do not have to be coded, but start and end tags should still be coded so that they will be directed to the target output stream.
- isOptionalElementPresent() is used in a conditional clause within the template 112 to control whether the optional element is generated.
- isOptionalAttributePresent(int attributeName) is used in a complex type and a isOptionalAttributePresent(int elementName, int attributeName) in a simple type. If the element type is a repeating simple type then determine if it contains an optional attribute using a isOptionalAttributePresent(int index, int elementName, int attributeName) method.
- getElementRepetitions method is used to return the number of repeating elements. This is used to construct a loop in the template 112 to process each element.
- the template 112 should contain the start and end tags and call a getElementValue(int index, int elementName) to obtain the value.
- the template 112 should invoke the startElement(int index, int elementName) and endElement(int index, int elementName) methods.
- Table Ml 14-2 summarizes the main functions (i.e., not exhaustive) of the mapping interface 114- 2 (X2XMLMapping).
- the mapping interface 114-2 executes the mapping function (between Java and XML) and establishes an output target stream.
- the mapping interface 114-2 extends the handler interface 114-1, which provides the document template 112 call back methods necessary for generating the output XML document 118.
- executeQ Performs the mapping that will create the output XML document 118.
- setOutputStreamQ Sets the output stream to which the output XML document 118 will be generated.
- Table Ml 14-3 summarizes the main fimctions (i.e., not exhaustive) of the mapping class 114-3 (X2XMLMappingImpl).
- the mapping class 114-3 provides the methods for mapping from the input Java object 116 to the output XML document 118.
- the X2XMLMappingImpl class 114-3 is not used directly, but is sub-classed with content added to appropriate methods depending on document type definitions for the output XML document 118 to be mapped to and the input Java object 116 it is mapping from.
- executeQ Performs the mapping that will create the output XML document 118.
- setOutputStreamQ Sets the output stream to which the output XML document 118 will be generated.
- Table Ml 14-4 summarizes the main functions (i.e., not exhaustive) of the output target class 114-4 (X2XMLOutputTarget).
- X2XMLOutputTarget class 114-4 allows the XML document 118 to be written to a byte stream or a character stream. Class 114-4 provides optimizations, such as allowing the byte stream to be targeted to the output stream of a servlet. Therefore, the XML document 118 is not buffered before being written out.
- the X2XMLMappingImpl class 114-3 implements the X2XMLMapping interface 114-2.
- the X2XMLMapping interface 114-2 extends the X2XMLHandler interface 114-1. Therefore, the X2XMLMappingImpl class 114-3 implements the methods defined in the X2XMLHandler interface 114-1.
- a method 400 is illustrated showing the general steps that are performed to map the software object 116 (e.g., a Java Bean) to the XML document 118:
- the software object 116 e.g., a Java Bean
- mapping interface 114-2 e.g., X2XMLMapping
- mapping interface 114-2 invokes the JSP container using the JSP XML template 112 that will create the XML document 118 at step 410;
- JSP XML template 112 calls back to the mapping interface 114-2 to maintain state of processing and to add data to the output XML document 118 (data is retrieved from the software object 116;
- the compiled JSP XML template 112 can optionally call, at step 418, an isOptionalElementPresent method or an isOptionalAttributePresent method to determine if certain portions of the XML document should be generated;
- (k) the state of processing is maintained by a stack at step 422; this is useful when generating complex types within an XML document where an array occurs, recursion occurs or a complex type is contained within another complex type.
- Mapping from Java to XML uses the XML document template 112, which is coded with similar standards imposed by the parser 104, which processes events (at least for complex objects). For example, for complex types, start and end tags must be coded (not required for primitive types).
- An example II "JAVA-XML CUSTOMER" detailed below, generates an output customer XML document from a input customer java object.
- a program (Custom.er2XMLMapping.java), with some reductions of conciseness, to construct the XML document from the input Java object.
- the handler 114-1 determines the array size (i.e., how many loops are to be executed) and returns in the getElementRepitions method.
- the handler 114-1 sets a reference to that particular customer object in the array.
- the handler 114-1 uses a stack. As the object recurses, the handler 114-1 pushes onto the stack with a startElement, and pops with the endElement.
- the working object is the object on top of the stack.
- advantages of an exemplary embodiment of the present include: (a) providing a common framework for mapping from an XML document to a Java object and from a Java object to an XML document, wherein the framework uses a handler that masks how a property is obtained for mapping;
Abstract
Description
Claims
Priority Applications (5)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020037014561A KR100583517B1 (en) | 2001-06-07 | 2001-12-28 | System and method of mapping between software objects and structured language element based documents |
HU0400135A HUP0400135A2 (en) | 2001-06-07 | 2001-12-28 | System & method of mapping between software objects & structured language element-based documents |
US10/479,671 US20040168124A1 (en) | 2001-06-07 | 2001-12-28 | System and method of mapping between software objects & structured language element-based documents |
EP01993317A EP1399841A1 (en) | 2001-06-07 | 2001-12-28 | System & method of mapping between software objects & structured language element-based documents |
JP2003504271A JP2004530225A (en) | 2001-06-07 | 2001-12-28 | System and method for mapping between software objects and document-based structured language elements |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CA2,349,905 | 2001-06-07 | ||
CA002349905A CA2349905A1 (en) | 2001-06-07 | 2001-06-07 | System and method of mapping between software objects and structured language element based documents |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2002101579A1 true WO2002101579A1 (en) | 2002-12-19 |
Family
ID=4169222
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/US2001/049577 WO2002101579A1 (en) | 2001-06-07 | 2001-12-28 | System & method of mapping between software objects & structured language element-based documents |
Country Status (11)
Country | Link |
---|---|
EP (1) | EP1399841A1 (en) |
JP (1) | JP2004530225A (en) |
KR (1) | KR100583517B1 (en) |
CN (1) | CN1313953C (en) |
CA (1) | CA2349905A1 (en) |
CZ (1) | CZ20033330A3 (en) |
HU (1) | HUP0400135A2 (en) |
PL (1) | PL367225A1 (en) |
RU (1) | RU2287181C2 (en) |
TW (1) | TW573278B (en) |
WO (1) | WO2002101579A1 (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003091419A (en) * | 2001-09-19 | 2003-03-28 | Just Syst Corp | Information processor and its program |
KR100653610B1 (en) | 2004-09-15 | 2006-12-04 | (주)웹플러스 | On-line flash editing system with reinforced function of editing navigation bar |
US7194485B2 (en) | 2003-11-21 | 2007-03-20 | International Business Machines Corporation | Mapping XML schema components to qualified java components |
CN1306400C (en) * | 2004-05-20 | 2007-03-21 | 北京大学 | Binary system software member and its manufacturing method |
US7212410B2 (en) | 2004-01-16 | 2007-05-01 | Finisar Corporation | Actuator for small form-factor pluggable transceiver |
US7290012B2 (en) | 2004-01-16 | 2007-10-30 | International Business Machines Corporation | Apparatus, system, and method for passing data between an extensible markup language document and a hierarchical database |
EP1939735A1 (en) * | 2006-11-30 | 2008-07-02 | NCR Corporation | System and method for interpreting a specification language file to implement a business system |
US7418456B2 (en) | 2004-01-16 | 2008-08-26 | International Business Machines Corporation | Method for defining a metadata schema to facilitate passing data between an extensible markup language document and a hierarchical database |
CN101826113A (en) * | 2010-05-14 | 2010-09-08 | 珠海世纪鼎利通信科技股份有限公司 | High-efficiency and unified method for storing wireless measurement data |
US7861250B2 (en) | 2003-04-25 | 2010-12-28 | Microsoft Corporation | Runtime polymorphism |
US7904417B2 (en) | 2006-02-27 | 2011-03-08 | Microsoft Corporation | Recursive metadata templating |
CN104636265A (en) * | 2015-01-21 | 2015-05-20 | 广东电网有限责任公司电力科学研究院 | Access method for efficient memory model organization of CIMXML document |
CN110795168A (en) * | 2018-08-02 | 2020-02-14 | 武汉斗鱼网络科技有限公司 | Method for acquiring data and related device |
CN113505269A (en) * | 2021-07-02 | 2021-10-15 | 卡斯柯信号(成都)有限公司 | Binary file detection method and device based on XML |
Families Citing this family (26)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7120864B2 (en) | 2004-01-27 | 2006-10-10 | International Business Machines Corporation | Eliminating superfluous namespace declarations and undeclaring default namespaces in XML serialization processing |
CN100336023C (en) * | 2004-08-24 | 2007-09-05 | 英业达股份有限公司 | Method for realizing software call through keyword associated mechanism |
US7694284B2 (en) * | 2004-11-30 | 2010-04-06 | International Business Machines Corporation | Shareable, bidirectional mechanism for conversion between object model and XML |
US20060123345A1 (en) * | 2004-12-06 | 2006-06-08 | International Business Machines Corporation | Platform-independent markup language-based gui format |
KR100836736B1 (en) * | 2006-09-27 | 2008-06-10 | 한국전자통신연구원 | Apparatus for Parser Framework using Markup Language and Method thereof |
US8381093B2 (en) | 2006-12-06 | 2013-02-19 | Microsoft Corporation | Editing web pages via a web browser |
US8880564B2 (en) * | 2007-10-11 | 2014-11-04 | Microsoft Corporation | Generic model editing framework |
CN101355560B (en) * | 2008-09-12 | 2011-12-14 | 深圳市联软科技有限公司 | Method and system for transmitting data |
US9250938B2 (en) | 2008-10-15 | 2016-02-02 | Microsoft Technology Licensing, Llc | Caching runtime generated code |
US8347208B2 (en) * | 2009-03-04 | 2013-01-01 | Microsoft Corporation | Content rendering on a computer |
JP5249092B2 (en) * | 2009-03-09 | 2013-07-31 | Necシステムテクノロジー株式会社 | Information processing apparatus, multidimensional array expansion processing method, and program |
US20100235806A1 (en) * | 2009-03-13 | 2010-09-16 | Microsoft Corporation | Rich Web Site Authoring And Design |
US10089119B2 (en) | 2009-12-18 | 2018-10-02 | Microsoft Technology Licensing, Llc | API namespace virtualization |
US8776094B2 (en) | 2011-08-11 | 2014-07-08 | Microsoft Corporation | Runtime system |
US8695021B2 (en) * | 2011-08-31 | 2014-04-08 | Microsoft Corporation | Projecting native application programming interfaces of an operating system into other programming languages |
KR101535703B1 (en) | 2012-09-28 | 2015-07-09 | 삼성에스디에스 주식회사 | Apparatus and method for converting Value Object |
US9075618B2 (en) * | 2012-11-02 | 2015-07-07 | Microsoft Technology Licensing, Llc | Cross-platform data visualizations using common descriptions |
RU2527201C1 (en) * | 2013-01-24 | 2014-08-27 | Общество с ограниченной ответственностью "Системное моделирование и анализ" | Data conversion method, data conversion device and data conversion system |
KR102095703B1 (en) * | 2013-06-20 | 2020-04-01 | 에스케이플래닛 주식회사 | An apparatus, method and recording medium for Markup parsing |
US10635504B2 (en) | 2014-10-16 | 2020-04-28 | Microsoft Technology Licensing, Llc | API versioning independent of product releases |
CN106407679B (en) * | 2016-09-13 | 2019-03-26 | 上海市徐汇区中心医院 | Mobile interchange cross-platform cross equipment remote diagnosis system |
KR102255806B1 (en) * | 2017-07-03 | 2021-05-26 | (주)더리스 | Integrated management method and system of online shopping mall based on API |
CN108519964B (en) * | 2018-03-09 | 2022-03-04 | 中国工程物理研究院计算机应用研究所 | Method for converting XML Schema document into Java code |
CN110795169B (en) * | 2018-08-02 | 2022-11-11 | 武汉斗鱼网络科技有限公司 | Method and related device for acquiring data |
CN113742008B (en) * | 2021-09-13 | 2024-04-02 | 挂号网(杭州)科技有限公司 | Interface calling method and device, electronic equipment and storage medium |
JP7315253B2 (en) * | 2021-09-29 | 2023-07-26 | 株式会社スカイディスク | System, server and method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6226675B1 (en) * | 1998-10-16 | 2001-05-01 | Commerce One, Inc. | Participant server which process documents for commerce in trading partner networks |
US6327628B1 (en) * | 2000-05-19 | 2001-12-04 | Epicentric, Inc. | Portal server that provides a customizable user Interface for access to computer networks |
US6343265B1 (en) * | 1998-07-28 | 2002-01-29 | International Business Machines Corporation | System and method for mapping a design model to a common repository with context preservation |
US6347307B1 (en) * | 1999-06-14 | 2002-02-12 | Integral Development Corp. | System and method for conducting web-based financial transactions in capital markets |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5926189A (en) * | 1996-03-29 | 1999-07-20 | Apple Computer, Inc. | Method and apparatus for typographic glyph construction including a glyph server |
US6125391A (en) * | 1998-10-16 | 2000-09-26 | Commerce One, Inc. | Market makers using documents for commerce in trading partner networks |
-
2001
- 2001-06-07 CA CA002349905A patent/CA2349905A1/en not_active Abandoned
- 2001-08-22 TW TW90120639A patent/TW573278B/en not_active IP Right Cessation
- 2001-12-28 RU RU2003137567/09A patent/RU2287181C2/en not_active IP Right Cessation
- 2001-12-28 WO PCT/US2001/049577 patent/WO2002101579A1/en not_active Application Discontinuation
- 2001-12-28 CZ CZ20033330A patent/CZ20033330A3/en unknown
- 2001-12-28 PL PL01367225A patent/PL367225A1/en unknown
- 2001-12-28 CN CNB018233392A patent/CN1313953C/en not_active Expired - Fee Related
- 2001-12-28 KR KR1020037014561A patent/KR100583517B1/en not_active IP Right Cessation
- 2001-12-28 JP JP2003504271A patent/JP2004530225A/en active Pending
- 2001-12-28 EP EP01993317A patent/EP1399841A1/en not_active Withdrawn
- 2001-12-28 HU HU0400135A patent/HUP0400135A2/en unknown
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6343265B1 (en) * | 1998-07-28 | 2002-01-29 | International Business Machines Corporation | System and method for mapping a design model to a common repository with context preservation |
US6226675B1 (en) * | 1998-10-16 | 2001-05-01 | Commerce One, Inc. | Participant server which process documents for commerce in trading partner networks |
US6347307B1 (en) * | 1999-06-14 | 2002-02-12 | Integral Development Corp. | System and method for conducting web-based financial transactions in capital markets |
US6327628B1 (en) * | 2000-05-19 | 2001-12-04 | Epicentric, Inc. | Portal server that provides a customizable user Interface for access to computer networks |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003091419A (en) * | 2001-09-19 | 2003-03-28 | Just Syst Corp | Information processor and its program |
US7861250B2 (en) | 2003-04-25 | 2010-12-28 | Microsoft Corporation | Runtime polymorphism |
US7194485B2 (en) | 2003-11-21 | 2007-03-20 | International Business Machines Corporation | Mapping XML schema components to qualified java components |
US7912874B2 (en) | 2004-01-16 | 2011-03-22 | International Business Machines Corporation | Apparatus and system for defining a metadata schema to facilitate passing data between an extensible markup language document and a hierarchical database |
US7822786B2 (en) | 2004-01-16 | 2010-10-26 | International Business Machines Corporation | Apparatus, system, and method for defining a metadata schema to facilitate passing data between an extensible markup language document and a hierarchical database |
US7290012B2 (en) | 2004-01-16 | 2007-10-30 | International Business Machines Corporation | Apparatus, system, and method for passing data between an extensible markup language document and a hierarchical database |
US7212410B2 (en) | 2004-01-16 | 2007-05-01 | Finisar Corporation | Actuator for small form-factor pluggable transceiver |
US7418456B2 (en) | 2004-01-16 | 2008-08-26 | International Business Machines Corporation | Method for defining a metadata schema to facilitate passing data between an extensible markup language document and a hierarchical database |
CN1306400C (en) * | 2004-05-20 | 2007-03-21 | 北京大学 | Binary system software member and its manufacturing method |
KR100653610B1 (en) | 2004-09-15 | 2006-12-04 | (주)웹플러스 | On-line flash editing system with reinforced function of editing navigation bar |
US7904417B2 (en) | 2006-02-27 | 2011-03-08 | Microsoft Corporation | Recursive metadata templating |
EP1939735A1 (en) * | 2006-11-30 | 2008-07-02 | NCR Corporation | System and method for interpreting a specification language file to implement a business system |
US8578350B2 (en) | 2006-11-30 | 2013-11-05 | Ncr Corporation | System and method for interpreting a specification language file to implement a business system |
CN101826113A (en) * | 2010-05-14 | 2010-09-08 | 珠海世纪鼎利通信科技股份有限公司 | High-efficiency and unified method for storing wireless measurement data |
CN104636265A (en) * | 2015-01-21 | 2015-05-20 | 广东电网有限责任公司电力科学研究院 | Access method for efficient memory model organization of CIMXML document |
CN110795168A (en) * | 2018-08-02 | 2020-02-14 | 武汉斗鱼网络科技有限公司 | Method for acquiring data and related device |
CN113505269A (en) * | 2021-07-02 | 2021-10-15 | 卡斯柯信号(成都)有限公司 | Binary file detection method and device based on XML |
CN113505269B (en) * | 2021-07-02 | 2024-03-29 | 卡斯柯信号(成都)有限公司 | Binary file detection method and device based on XML |
Also Published As
Publication number | Publication date |
---|---|
HUP0400135A2 (en) | 2004-08-30 |
CA2349905A1 (en) | 2002-12-07 |
PL367225A1 (en) | 2005-02-21 |
RU2003137567A (en) | 2005-05-27 |
KR100583517B1 (en) | 2006-05-24 |
TW573278B (en) | 2004-01-21 |
CN1513145A (en) | 2004-07-14 |
KR20040007545A (en) | 2004-01-24 |
EP1399841A1 (en) | 2004-03-24 |
CN1313953C (en) | 2007-05-02 |
RU2287181C2 (en) | 2006-11-10 |
JP2004530225A (en) | 2004-09-30 |
CZ20033330A3 (en) | 2004-03-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20040168124A1 (en) | System and method of mapping between software objects & structured language element-based documents | |
KR100583517B1 (en) | System and method of mapping between software objects and structured language element based documents | |
Garlan et al. | Acme: An architecture description interchange language | |
CA2479310C (en) | Dynamic generation of schema information for data description languages | |
US7500224B2 (en) | Code blueprints | |
US7694284B2 (en) | Shareable, bidirectional mechanism for conversion between object model and XML | |
US7480894B2 (en) | Method and system for retaining formal data model descriptions between server-side and browser-side javascript objects | |
US7155705B1 (en) | Techniques for binding an application with a data exchange format based on tags in comments | |
US5966535A (en) | Method and apparatus for generating program code for world wide web service applications | |
US7941461B2 (en) | System and method for developing and enabling model-driven XML transformation framework for e-business | |
US6925631B2 (en) | Method, computer system and computer program product for processing extensible markup language streams | |
US20020099738A1 (en) | Automated web access for back-end enterprise systems | |
US20100088676A1 (en) | Comparing and merging structured documents syntactically and semantically | |
US20030135825A1 (en) | Dynamically generated mark-up based graphical user interfaced with an extensible application framework with links to enterprise resources | |
Syme et al. | Expert F♯ 2.0 | |
Meijer et al. | Haskell server pages-functional programming and the battle for the middle tier | |
Zou et al. | Towards a portable XML-based source code representation | |
Rose et al. | Virtual XML: A toolbox and use cases for the XML world view | |
Steel et al. | Generating human-usable textual notations for information models | |
Apte | Java connector architecture: building custom connectors and adapters | |
Manola | Some Web Object Model Construction Technologies | |
Emir et al. | Scalable programming abstractions for XML services | |
Galvin et al. | Enhancing the role of interfaces in software architecture description languages (adls) | |
Wong | XMI-based transformation of UML interaction diagrams to activity diagrams | |
Homer et al. | A First Look at ADO. NET and System. XML V. 2. 0 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AK | Designated states |
Kind code of ref document: A1 Designated state(s): AT AU BR CH CN CZ DE ES GB HU IL IN JP KR MX PL RU SE SG US VN |
|
AL | Designated countries for regional patents |
Kind code of ref document: A1 Designated state(s): AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE TR |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application | ||
DFPE | Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101) | ||
WWE | Wipo information: entry into national phase |
Ref document number: 1020037014561 Country of ref document: KR |
|
WWE | Wipo information: entry into national phase |
Ref document number: 10479671 Country of ref document: US Ref document number: 2001993317 Country of ref document: EP |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2003504271 Country of ref document: JP Ref document number: PV2003-3330 Country of ref document: CZ |
|
WWE | Wipo information: entry into national phase |
Ref document number: 018233392 Country of ref document: CN |
|
WWP | Wipo information: published in national office |
Ref document number: PV2003-3330 Country of ref document: CZ |
|
WWP | Wipo information: published in national office |
Ref document number: 2001993317 Country of ref document: EP |
|
REG | Reference to national code |
Ref country code: DE Ref legal event code: 8642 |
|
WWW | Wipo information: withdrawn in national office |
Ref document number: 2001993317 Country of ref document: EP |