160 likes | 276 Views
JOXM Java Object XML Mapping. Jimmy Hua Jong-Seo Lee. Adam Dukovich Michael Huffman. Software Architecture. Object Relational Mapping (ORM). “the technique of converting records in a relational database into objects in an object-oriented programming environment.”
E N D
JOXMJava Object XML Mapping Jimmy Hua Jong-Seo Lee Adam Dukovich Michael Huffman
Object Relational Mapping (ORM) “the technique of converting records in a relational database into objects in an object-oriented programming environment.” Patrick Connor Linskey and Marc Prud'hommeaux Benefits • Need not to know about database management • ORM is in a language familiar to programmers • Ease of maintenance Used by many companies such as Intuit, IBM, Microsoft, Google, and more.
XML – eXtensible Markup Language • Structure which contains information about the relationship of data items • Is semi-structured data • 80% of the web is semi-structure data • Use XPath and XQuery to access in a native XML database
Problem Description A Java library that can store, retrieve and query object data in a native XML database has been an important issue. This tool will offer the efficient way of manipulating XML database in Java programming environment.
Previous Attempts • Hibernate XML, Hyperjaxb, and JaxMe • No feature able to directly convert Java Object to and from XML database • Data are not saved as XML databases but instead as relational DBMS • Selection of technology never intended for use with XML databases • Incomplete manual, feeble code base, and poor control of XML data manipulation
Goals • Persistence of any Java object into a native XML database • ConciseAPIsfor XML database manipulation • Local databases through the XML:DB API • Persistence API for XML data binding and querying • Support for issuing XPath queries, returning results as typed Java objects
Implementation Overview Existing Components • Database - we used eXist, an open source native XML database. • XStream – we used this component for serializing Java objects to XML, and vice versa. New Components • JOXM - this was the part we implemented. JOXM includes the code responsible for much of the administrative aspects of the program in general.
Conclusion/Future Work • Our goal to create an XML equivalent to Hibernate was successful • Some possible future work: • Allow users to issue XQuery queries to the database, • XPath interpreter for the Hibernate Query Language (HQL) • Transaction management • Provide support for the XQuery Update Facility (XQUF)
References [1] "Hibernate - Relational Persistence for Java and .NET." 2006. Red Hat Middleware, LLC. <www.hibernate.org> [2] Begoli, Edmund. "Hibernate 3 Adds XML-Relational Persistence." 2007. Jupitermedia Corporation. <http://www.devx.com/Java/Article/27896/1954> [3] "Hyperjaxb3 - Relational Persistence for JAXB Objects." 2007. CollabNet. <https://hyperjaxb3.dev.java.net> [4] "JAXB: JAXB ReferenceImplementation." 2007. CollabNet. <https://jaxb.dev.java.net> [5] "Welcome to JaxME 2." 2004. Apache Software Foundation. <http://ws.apache.org/jaxme> [6] Boag, Scott, Don Chamberlin, Mary F. Fernández, Daniela Florescu, Jonathan Robie and JérômeSiméon. "XQuery 1.0: An XML Query Language." 23 Jan. 2007. W3C. <http://www.w3.org/TR/xquery> [7] Clark, James and Steve DeRose. "XML Path Language (XPath) Version 1.0." 16 Nov. 1999. W3C. <http://www.w3c.org/TR/xpath> [8] Staken, Kimbro. "XML Database API Draft." 2003. The XML:DB Initiative. <http://xmldb-org.sourceforge.net/xapi/xapidraft. html> [9] "The AspectJ Project." 2007. The Eclipse Foundation. <http://www.eclipse.org/aspectj> [10] "UID (Java 2 Platform SE 5.0)." 2004. Sun Microsystems, Inc. <http://java.sun.com/j2se/1.5.0/docs/api/java/rmi/server/UID.html> [11] "Apache Xindice." 2007. Apache Software Foundation. <http://xml.apache.org/xindice> [12] "XQuery Update Facility." 11 Jul. 2006. W3C. <http://www.w3.org/TR/xqupdate> [13] "XUpdate - XML Update Language." 2003. XML:DB Initiative. <http://xmldb-org.sourceforge.net/xupdate> [14] "XStream - About XStream." <http://xstream.codehaus.org> [15] "k5n.us: k5n Desktop Calendar (k5nCal)." 2007. k5n.us. <http://www.k5n.us> [16] "Spring Framework." 2006. <http://www.springframework.org> [17] "Resources for Test Driven Development." JUnit.org. 2007. <http://www.junit.org> [18] Meier, W. "eXist: An Open Source Native XML Database." Darmstadt University of Technology, Technical Report. <existdb.org/webdb.pdf> [19] "eXist: Open Source Native XML Database." 2007. <http://exist.sourceforge.net>