Ignore:
Timestamp:
2014-10-30T11:39:47+01:00 (11 years ago)
Author:
stoecker
Message:

update SVG code to current SVN (fix line endings), see #10479

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/com/kitfox/svg/SVGUniverse.java

    r6617 r7676  
    5555import java.net.URISyntaxException;
    5656import java.net.URL;
    57 import java.net.URLConnection;
    58 import java.net.URLStreamHandler;
     57import java.util.ArrayList;
    5958import java.util.HashMap;
    6059import java.util.Iterator;
     
    389388            {
    390389                //Workaround for resources stored in jars loaded by Webstart.
    391                 //https://bugs.openjdk.java.net/browse/JDK-6753651
     390                //http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6753651
    392391                url = SVGUniverse.class.getResource("xmlBase.getPath()");
    393392            }
     
    627626    }
    628627
    629 //    public static void main(String argv[])
    630 //    {
    631 //        try
    632 //        {
    633 //            URL url = new URL("svgSalamander", "localhost", -1, "abc.svg",
    634 //                    new URLStreamHandler()
    635 //            {
    636 //                protected URLConnection openConnection(URL u)
    637 //                {
    638 //                    return null;
    639 //                }
    640 //            }
    641 //            );
    642 ////            URL url2 = new URL("svgSalamander", "localhost", -1, "abc.svg");
    643 //           
    644 //            //Investigate URI resolution
    645 //            URI uriA, uriB, uriC, uriD, uriE;
    646 //           
    647 //            uriA = new URI("svgSalamander", "/names/mySpecialName", null);
    648 ////            uriA = new URI("http://www.kitfox.com/salamander");
    649 ////            uriA = new URI("svgSalamander://mySpecialName/grape");
    650 //            System.err.println(uriA.toString());
    651 //            System.err.println(uriA.getScheme());
    652 //           
    653 //            uriB = uriA.resolve("#begin");
    654 //            System.err.println(uriB.toString());
    655 //           
    656 //            uriC = uriA.resolve("tree#boing");
    657 //            System.err.println(uriC.toString());
    658 //           
    659 //            uriC = uriA.resolve("../tree#boing");
    660 //            System.err.println(uriC.toString());
    661 //        }
    662 //        catch (Exception e)
    663 //        {
    664 //            Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING,
    665 //                "Could not parse", e);
    666 //        }
    667 //    }
     628    /**
     629     * Get list of uris of all loaded documents and subdocuments.
     630     * @return
     631     */
     632    public ArrayList getLoadedDocumentURIs()
     633    {
     634        return new ArrayList(loadedDocs.keySet());
     635    }
     636   
     637    /**
     638     * Remove loaded document from cache.
     639     * @param uri
     640     */
     641    public void removeDocument(URI uri)
     642    {
     643        loadedDocs.remove(uri);
     644    }
     645   
    668646    public boolean isVerbose()
    669647    {
Note: See TracChangeset for help on using the changeset viewer.