You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by hi...@apache.org on 2001/01/02 17:12:14 UTC

cvs commit: xml-batik/sources/org/apache/batik/test/refimpl/bridge BridgeTest.java

hillion     01/01/02 08:12:13

  Modified:    sources/org/apache/batik/bridge DocumentLoader.java
               sources/org/apache/batik/dom/svg SVGDocumentFactory.java
                        SVGDocumentLoader.java
               sources/org/apache/batik/dom/util DocumentFactory.java
               sources/org/apache/batik/refimpl/bridge
                        BufferedDocumentLoader.java URIResolver.java
               sources/org/apache/batik/refimpl/transcoder
                        AbstractTranscoder.java
               sources/org/apache/batik/test/refimpl/bridge BridgeTest.java
  Log:
  
  
  Revision  Changes    Path
  1.4       +3 -3      xml-batik/sources/org/apache/batik/bridge/DocumentLoader.java
  
  Index: DocumentLoader.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/DocumentLoader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DocumentLoader.java	2000/11/14 13:00:34	1.3
  +++ DocumentLoader.java	2001/01/02 16:11:36	1.4
  @@ -8,6 +8,7 @@
   
   package org.apache.batik.bridge;
   
  +import java.io.IOException;
   import org.w3c.dom.Document;
   import org.w3c.dom.DOMException;
   import org.xml.sax.SAXException;
  @@ -16,7 +17,7 @@
    * Defines a class that is responsible of loading (creating) a Document.
    *
    * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
  - * @version $Id: DocumentLoader.java,v 1.3 2000/11/14 13:00:34 tkormann Exp $
  + * @version $Id: DocumentLoader.java,v 1.4 2001/01/02 16:11:36 hillion Exp $
    */
   public interface DocumentLoader {
   
  @@ -24,8 +25,7 @@
        * Returns a document from the specified uri.
        * @param uri the uri of the document
        */
  -    Document loadDocument(String uri) throws DOMException,
  -                                SAXException, InterruptedException;
  +    Document loadDocument(String uri) throws DOMException, SAXException, IOException;
   
       /**
        * Disposes and releases all resources allocated by this document loader.
  
  
  
  1.4       +4 -2      xml-batik/sources/org/apache/batik/dom/svg/SVGDocumentFactory.java
  
  Index: SVGDocumentFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/dom/svg/SVGDocumentFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SVGDocumentFactory.java	2000/11/09 19:15:03	1.3
  +++ SVGDocumentFactory.java	2001/01/02 16:11:42	1.4
  @@ -8,6 +8,7 @@
   
   package org.apache.batik.dom.svg;
   
  +import java.io.IOException;
   import java.net.MalformedURLException;
   import java.net.URL;
   import java.util.Locale;
  @@ -23,9 +24,10 @@
    * from an URI using SAX2.
    *
    * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  - * @version $Id: SVGDocumentFactory.java,v 1.3 2000/11/09 19:15:03 billh Exp $
  + * @version $Id: SVGDocumentFactory.java,v 1.4 2001/01/02 16:11:42 hillion Exp $
    */
   public class SVGDocumentFactory extends DocumentFactory {
  +
       /**
        * The dtd URIs resource bundle class name.
        */
  @@ -54,7 +56,7 @@
        * @exception InterruptedException if the I/O thread is interrupted
        */
       public SVGOMDocument createDocument(String uri, InputSource is)
  -	throws DOMException, SAXException, InterruptedException {
  +	throws DOMException, SAXException, IOException {
   	SVGOMDocument doc;
   	doc = (SVGOMDocument)createDocument
               (SVGDOMImplementation.SVG_NAMESPACE_URI, "svg", uri, is);
  
  
  
  1.4       +4 -2      xml-batik/sources/org/apache/batik/dom/svg/SVGDocumentLoader.java
  
  Index: SVGDocumentLoader.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/dom/svg/SVGDocumentLoader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SVGDocumentLoader.java	2000/11/14 13:00:35	1.3
  +++ SVGDocumentLoader.java	2001/01/02 16:11:44	1.4
  @@ -8,6 +8,7 @@
   
   package org.apache.batik.dom.svg;
   
  +import java.io.IOException;
   import java.net.MalformedURLException;
   import java.net.URL;
   
  @@ -23,7 +24,7 @@
    * This class is responsible on loading an SVG document.
    *
    * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
  - * @version $Id: SVGDocumentLoader.java,v 1.3 2000/11/14 13:00:35 tkormann Exp $
  + * @version $Id: SVGDocumentLoader.java,v 1.4 2001/01/02 16:11:44 hillion Exp $
    */
   public class SVGDocumentLoader implements DocumentLoader {
   
  @@ -41,7 +42,8 @@
           this.documentFactory = new SVGDocumentFactory(parser);
       }
   
  -    public Document loadDocument(String uri) throws DOMException, SAXException, InterruptedException {
  +    public Document loadDocument(String uri)
  +        throws DOMException, SAXException, IOException {
           return documentFactory.createDocument(uri, new InputSource(uri));
       }
   
  
  
  
  1.3       +5 -11     xml-batik/sources/org/apache/batik/dom/util/DocumentFactory.java
  
  Index: DocumentFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/dom/util/DocumentFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DocumentFactory.java	2000/11/09 19:15:03	1.2
  +++ DocumentFactory.java	2001/01/02 16:11:52	1.3
  @@ -9,7 +9,6 @@
   package org.apache.batik.dom.util;
   
   import java.io.IOException;
  -import java.io.InterruptedIOException;
   import org.apache.batik.css.ElementWithID;
   import org.w3c.dom.Attr;
   import org.w3c.dom.Document;
  @@ -31,11 +30,12 @@
    * from an URI using SAX2.
    *
    * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  - * @version $Id: DocumentFactory.java,v 1.2 2000/11/09 19:15:03 billh Exp $
  + * @version $Id: DocumentFactory.java,v 1.3 2001/01/02 16:11:52 hillion Exp $
    */
   public class DocumentFactory
       extends    DefaultHandler
       implements LexicalHandler {
  +
       /**
        * The DOM implementation used to create the document.
        */
  @@ -103,7 +103,7 @@
        */
       public Document createDocument(String ns, String root, String uri,
                                      InputSource is)
  -	throws DOMException, SAXException, InterruptedException {
  +	throws DOMException, SAXException, IOException {
   	documentElementParsed = false;
   	document = implementation.createDocument(ns, root, null);
   
  @@ -121,15 +121,9 @@
   	    parser.setProperty("http://xml.org/sax/properties/lexical-handler",
   			       this);
   	} catch (SAXException e) {
  -	}
  -	try {
  -	    parser.parse(is);
  -        } catch (InterruptedIOException iioe) {
  -	    // if this thread is interrupted (for instance, by user)
  -	    throw new InterruptedException();
  -	} catch (IOException e) {
  -	    throw new SAXException(e);
   	}
  +
  +        parser.parse(is);
   	
   	return document;
       }
  
  
  
  1.6       +3 -2      xml-batik/sources/org/apache/batik/refimpl/bridge/BufferedDocumentLoader.java
  
  Index: BufferedDocumentLoader.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/refimpl/bridge/BufferedDocumentLoader.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- BufferedDocumentLoader.java	2000/11/26 18:00:19	1.5
  +++ BufferedDocumentLoader.java	2001/01/02 16:11:57	1.6
  @@ -8,6 +8,7 @@
   
   package org.apache.batik.refimpl.bridge;
   
  +import java.io.IOException;
   import java.util.Iterator;
   import java.util.LinkedList;
   import java.util.List;
  @@ -27,7 +28,7 @@
    * oldest document is removed from the cache.
    *
    * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
  - * @version $Id: BufferedDocumentLoader.java,v 1.5 2000/11/26 18:00:19 tkormann Exp $
  + * @version $Id: BufferedDocumentLoader.java,v 1.6 2001/01/02 16:11:57 hillion Exp $
    */
   public class BufferedDocumentLoader implements DocumentLoader {
   
  @@ -76,7 +77,7 @@
        * @exception InterruptedException is thrown if this thread is interrupted.
        */
       public Document loadDocument(String uri) throws DOMException, SAXException,
  -                                       InterruptedException {
  +                                       IOException {
           int n = uri.indexOf('#');
           if (n != -1) {
               uri = uri.substring(0, n);
  
  
  
  1.6       +4 -4      xml-batik/sources/org/apache/batik/refimpl/bridge/URIResolver.java
  
  Index: URIResolver.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/refimpl/bridge/URIResolver.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- URIResolver.java	2000/11/27 17:53:21	1.5
  +++ URIResolver.java	2001/01/02 16:11:59	1.6
  @@ -8,6 +8,7 @@
   
   package org.apache.batik.refimpl.bridge;
   
  +import java.io.IOException;
   import java.net.MalformedURLException;
   import java.net.URL;
   
  @@ -29,7 +30,7 @@
    * This class is used to resolve the URI that can be found in a SVG document.
    *
    * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  - * @version $Id: URIResolver.java,v 1.5 2000/11/27 17:53:21 tkormann Exp $
  + * @version $Id: URIResolver.java,v 1.6 2001/01/02 16:11:59 hillion Exp $
    */
   public class URIResolver {
       /**
  @@ -63,8 +64,7 @@
        * @param uri The element URI.
        */
       public Element getElement(String uri)
  -        throws MalformedURLException,
  -               SAXException, InterruptedException {
  +        throws MalformedURLException, SAXException, IOException {
           Node n = getNode(uri);
           if (n.getNodeType() == n.DOCUMENT_NODE) {
               throw new Error("Documents not allowed");
  @@ -77,7 +77,7 @@
        * @return The document or the element
        */
       public Node getNode(String uri) throws MalformedURLException,
  -                              SAXException, InterruptedException {
  +                              SAXException, IOException {
           if (documentURI.equals(uri)) {
               return document;
           }
  
  
  
  1.5       +3 -2      xml-batik/sources/org/apache/batik/refimpl/transcoder/AbstractTranscoder.java
  
  Index: AbstractTranscoder.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/refimpl/transcoder/AbstractTranscoder.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractTranscoder.java	2000/11/21 15:00:35	1.4
  +++ AbstractTranscoder.java	2001/01/02 16:12:06	1.5
  @@ -10,6 +10,7 @@
   
   import java.awt.Color;
   import java.awt.Paint;
  +import java.io.InterruptedIOException;
   import java.io.IOException;
   import java.io.OutputStream;
   import java.util.Map;
  @@ -29,7 +30,7 @@
    * A generic <tt>Transcoder</tt>.
    *
    * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
  - * @version $Id: AbstractTranscoder.java,v 1.4 2000/11/21 15:00:35 tkormann Exp $
  + * @version $Id: AbstractTranscoder.java,v 1.5 2001/01/02 16:12:06 hillion Exp $
    */
   public abstract class AbstractTranscoder implements Transcoder {
   
  @@ -66,7 +67,7 @@
               throw new TranscoderException(ex.getMessage(), ex);
           } catch (SAXException ex) {
               throw new TranscoderException(ex.getMessage(), ex);
  -        } catch (InterruptedException ex) {
  +        } catch (IOException ex) {
               throw new TranscoderException(ex.getMessage(), ex);
           }
       }
  
  
  
  1.3       +2 -1      xml-batik/sources/org/apache/batik/test/refimpl/bridge/BridgeTest.java
  
  Index: BridgeTest.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/test/refimpl/bridge/BridgeTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BridgeTest.java	2000/11/09 19:15:06	1.2
  +++ BridgeTest.java	2001/01/02 16:12:11	1.3
  @@ -9,6 +9,7 @@
   package org.apache.batik.test.refimpl.bridge;
   
   import java.awt.*;
  +import java.io.*;
   import javax.swing.*;
   import org.w3c.dom.*;
   import org.apache.batik.gvt.*;
  @@ -54,7 +55,7 @@
           } catch(SAXException e){
               e.printStackTrace();
               return;
  -        } catch(InterruptedException e) {
  +        } catch(IOException e) {
   	    return;
   	}