Download presentation
Presentation is loading. Please wait.
Published bySteven Ray Modified over 9 years ago
2
ANTS - Technologies1 For possible use in the MIC-ANTS project. Jonathan Sprinkle Institute for Software Integrated Systems Vanderbilt University 4 October, 1999 Technologies
3
ANTS - Technologies2 Overview of Technologies l Basic Java l XML l SQL
4
ANTS - Technologies3 Basic Java Technologies Employed In the Demonstration Program l Dual Applet/Application Implementation l Swing l Only Sun packages used
5
ANTS - Technologies4 XML l Extensible Markup Language l Two major portions to an XML document –Document Type Declaration (DTD) –Document Data l Technically, three types of XML Documents: –Valid - data conforms to the DTD –Well-formed - 1+ elements, precisely 1 element that has no parent, and all other tags nest within each other correctly –Invalid - data does not conform to the DTD (parsers will toss their cookies if they read in a document like this one)
6
ANTS - Technologies5 The DTD l Has both boring and exciting portions –Boring: Ask not for whom the booth tolls… l Is this really boring? (Of course not) l Is this really useful? (Of course it is)
7
ANTS - Technologies6 The DTD –Exciting <!DOCTYPE SQLRESULTS [ ]>... l Is this really exciting? (you bet)
8
ANTS - Technologies7 Types of Data l PC-DATA -- Parsed Character Data l Other Tags –Can contain other tags (children of its tree) –Each of these other tags is defined directly after its parent tag, and may contain tags as its definition –All tags (from what I can tell) eventually become “#PC-DATA” –However, the PC-DATA need not be 7-bit ascii, it can be 8-bit, which allows for direct binary transfer
9
ANTS - Technologies8 Generic XML DTD <!DOCTYPE DOCUMENT_EXAMPLE [ ]>
10
ANTS - Technologies9 SQL and Java l Basic SQL Connectivity supplied through Java API l JDBC - Java Data-Base Connectivity –Uses a driver (which must be supplied by a vendor: in this case, Sun) which supplies a connection to the ODBC data-source for this database –JDBC seems to be a port for mapping Java code –“Should” work with any ODBC-compliant database –An interesting little bug I found l Must turn ON auto-commit to enable SQL-level transaction support. I found this using SQL-Server 7.0, but I suspect it is a problem with the bridge, because ODBC is way too professional to have this bug. The transactions nest correctly, but there is no way to rollback with auto-commit off. –Stored Procedures work, but not easy to make a general case method
11
ANTS - Technologies10 SQL and XML in Java l Custom classes for SQL connectivity and CURSOR retrieval l Custom classes for XML to create a DTD from the SQL information (ex. Column names, widths) on the fly l Native Java calls to determine row count, etc. l Custom classes to create the data of the XML document on the fly NOTE: the DTD and XML classes are independent of SQL, and can take any well-formed tree as the data input, as long as the DTD matches it.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.