db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1499484 - /db/derby/code/trunk/java/engine/org/apache/derby/vti/XmlVTI.java
Date Wed, 03 Jul 2013 17:17:36 GMT
Author: rhillegas
Date: Wed Jul  3 17:17:36 2013
New Revision: 1499484

URL: http://svn.apache.org/r1499484
Log:
DERBY-6256: Make XmlVTI take a file name argument rather than a file URL argument; commit
derby-6256-03-aa-useFileNotURL.diff.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/vti/XmlVTI.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/vti/XmlVTI.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/vti/XmlVTI.java?rev=1499484&r1=1499483&r2=1499484&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/vti/XmlVTI.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/vti/XmlVTI.java Wed Jul  3 17:17:36 2013
@@ -21,8 +21,8 @@ limitations under the License.
 
 package org.apache.derby.vti;
 
-import java.io.InputStream;
-import java.net.URL;
+import java.io.File;
+import java.io.FileInputStream;
 import java.sql.ResultSetMetaData;
 import java.sql.SQLException;
 import java.text.DateFormat;
@@ -43,7 +43,7 @@ import org.w3c.dom.NodeList;
  * </p>
  *
  * <ul>
- * <li>xmlResourceName - An URL identifying an xml resource.</li>
+ * <li>xmlResourceName - The name of an xml file.</li>
  * <li>rowTag - The tag of the element which contains the row-structured content.</li>
  * <li>childTags - The attributes and descendant elements inside the row element which
should be treated as columns.</li>
  * </ul>
@@ -74,7 +74,7 @@ import org.w3c.dom.NodeList;
  * (
  *      findbugs
  *      (
- *          'file:///Users/me/static-analysis/findbugs.xml',
+ *          'findbugs.xml',
  *          'ClassStats',
  *          'class', 'bugs'
  *      )
@@ -90,7 +90,7 @@ import org.w3c.dom.NodeList;
  * </p>
  *
  * <ul>
- * <li>xmlResourceName - An URL identifying an xml resource.</li>
+ * <li>xmlResourceName - The name of an xml file.</li>
  * <li>rowTag - The tag of the element which contains the row-structured content.</li>
  * <li>parentTags - Attributes and elements (to be treated as columns) from outer elements
in which the rowTag is nested.</li>
  * <li>childTags - Attributes and elements (to be treated as columns) inside the row
element.</li>
@@ -135,7 +135,7 @@ import org.w3c.dom.NodeList;
  *        (
  *             optTrace
  *             (
- *                 'file:///Users/me/derby/mainline/z.xml',
+ *                 '/Users/me/derby/mainline/z.xml',
  *                 'planCost',
  *                 asList( 'stmtID', 'queryID', 'complete' ),
  *                 asList( 'summary', 'type', 'estimatedCost', 'estimatedRowCount' )
@@ -308,8 +308,8 @@ public  class   XmlVTI  extends StringCo
         
         _builder = factory.newDocumentBuilder();
 
-        URL                 url = new URL( _xmlResourceName );
-        InputStream     is = url.openStream();
+        File                file = new File( _xmlResourceName );
+        FileInputStream     is = new FileInputStream( file );
         Document        doc = _builder.parse( is );
         Element             root = doc.getDocumentElement();
 



Mime
View raw message