Class ScriptInstaller

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--ScriptInstaller
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class ScriptInstaller
extends org.xml.sax.helpers.DefaultHandler

Handles the installation of registered XSL transformations (perhaps not so aptly called "scripts") from a repository.

Version:
$2004-08-17 20:24:03 mdh$/
Author:
Malcolm D. Hyman

Field Summary
 java.lang.String value
           
 
Constructor Summary
ScriptInstaller()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          This is part of the ContentHandler interface.
static void doInstall()
          Installs scripts from a repository.
static boolean download(java.net.URL url, java.io.File file)
          Grabs the target of a URL and writes it a file.
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
          This is part of the ContentHandler interface.
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
          This is part of the ContentHandler interface.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

public java.lang.String value
Constructor Detail

ScriptInstaller

public ScriptInstaller()
Method Detail

doInstall

public static void doInstall()
Installs scripts from a repository.

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
This is part of the ContentHandler interface.
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
This is part of the ContentHandler interface.
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
This is part of the ContentHandler interface.
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler

download

public static boolean download(java.net.URL url,
                               java.io.File file)
Grabs the target of a URL and writes it a file.
Parameters:
url - source URL
file - target file
Returns:
true if success