fi.hut.tml.xsmiles.dom
Class XMLBroker

java.lang.Object
  extended byfi.hut.tml.xsmiles.dom.XMLBroker

public class XMLBroker
extends java.lang.Object

The factory for creating DOM event instances


Field Summary
protected  java.util.Hashtable activeMLFCs
          parasite MLFC is a non-host mlfc, such as XForms
protected  boolean hasCSSPI
          true if this document has CSS reference PI at root
protected  boolean hasXSLPI
          true if this document has XSL reference PI at root
protected  MLFC hostMLFC
           
protected  boolean hostMLFCisXMLMLFC
           
protected  java.lang.String hostURI
           
protected  java.util.Hashtable parasiteMLFCs
          parasite MLFC is a non-host mlfc, such as XForms
protected  boolean presentationDOM
           
protected static java.util.Hashtable registeredMLFCs
           
protected static java.util.Hashtable registeredMLFCsNS
           
protected  java.lang.String rootElementName
           
protected  java.util.Hashtable strToMLFC
          parasite MLFC is a non-host mlfc, such as XForms
static java.lang.String XMLMLFC_NAME
          the default XML+CSS MLFC.
static java.lang.String XMLNS
           
 
Constructor Summary
XMLBroker()
           
 
Method Summary
 org.w3c.dom.Attr createAttributeNS(org.apache.xerces.dom.DocumentImpl doc, java.lang.String URI, java.lang.String qualifiedName)
           
 void createdProcessingInstruction(java.lang.String target, java.lang.String data, org.w3c.dom.ProcessingInstruction proc)
           
 org.w3c.dom.Element createElement(org.apache.xerces.dom.DocumentImpl doc, java.lang.String tagname)
           
 org.w3c.dom.Element createElementNS(org.apache.xerces.dom.DocumentImpl doc, java.lang.String URI, java.lang.String tagname)
           
 void destroy()
           
 boolean docHasCSSPI()
           
 MLFC findMLFC(java.lang.String URI, java.lang.String tagname)
           
 MLFC getHostMLFC()
           
protected  java.lang.String getMLFC(java.lang.String localname, java.lang.String namespace)
          Finds an MLFC from local hard drive or if unsuccessful over the network.
static java.lang.String getMLFCClass(java.lang.String ns)
           
static java.lang.String getMLFCClassNS(java.lang.String ns)
           
 java.util.Hashtable getParasiteMLFCs()
           
 boolean isPresentationDOM()
           
static boolean isRegistered(java.lang.String namespace)
           
static void registerMLFC(java.lang.String tag, java.lang.String a_class)
           
static void registerMLFCNS(java.lang.String a_ns, java.lang.String a_class)
           
 void setHostMLFC(MLFC h_mlfc, java.lang.String uri)
          this is a kludge that SVGMLFC uses, for it's own copy of XMLBroker
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XMLMLFC_NAME

public static java.lang.String XMLMLFC_NAME
the default XML+CSS MLFC. This default can be changed by registering a new MLFC with the xml namespace


XMLNS

public static final java.lang.String XMLNS
See Also:
Constant Field Values

hostMLFCisXMLMLFC

protected boolean hostMLFCisXMLMLFC

parasiteMLFCs

protected java.util.Hashtable parasiteMLFCs
parasite MLFC is a non-host mlfc, such as XForms


activeMLFCs

protected java.util.Hashtable activeMLFCs
parasite MLFC is a non-host mlfc, such as XForms


strToMLFC

protected java.util.Hashtable strToMLFC
parasite MLFC is a non-host mlfc, such as XForms


hostMLFC

protected MLFC hostMLFC

hostURI

protected java.lang.String hostURI

presentationDOM

protected boolean presentationDOM

rootElementName

protected java.lang.String rootElementName

hasCSSPI

protected boolean hasCSSPI
true if this document has CSS reference PI at root


hasXSLPI

protected boolean hasXSLPI
true if this document has XSL reference PI at root


registeredMLFCsNS

protected static java.util.Hashtable registeredMLFCsNS

registeredMLFCs

protected static java.util.Hashtable registeredMLFCs
Constructor Detail

XMLBroker

public XMLBroker()
Method Detail

getHostMLFC

public MLFC getHostMLFC()

setHostMLFC

public void setHostMLFC(MLFC h_mlfc,
                        java.lang.String uri)
this is a kludge that SVGMLFC uses, for it's own copy of XMLBroker


getParasiteMLFCs

public java.util.Hashtable getParasiteMLFCs()

isPresentationDOM

public boolean isPresentationDOM()

createElement

public org.w3c.dom.Element createElement(org.apache.xerces.dom.DocumentImpl doc,
                                         java.lang.String tagname)
                                  throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

createdProcessingInstruction

public void createdProcessingInstruction(java.lang.String target,
                                         java.lang.String data,
                                         org.w3c.dom.ProcessingInstruction proc)

docHasCSSPI

public boolean docHasCSSPI()

findMLFC

public MLFC findMLFC(java.lang.String URI,
                     java.lang.String tagname)

createElementNS

public org.w3c.dom.Element createElementNS(org.apache.xerces.dom.DocumentImpl doc,
                                           java.lang.String URI,
                                           java.lang.String tagname)
                                    throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

createAttributeNS

public org.w3c.dom.Attr createAttributeNS(org.apache.xerces.dom.DocumentImpl doc,
                                          java.lang.String URI,
                                          java.lang.String qualifiedName)
                                   throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

getMLFC

protected java.lang.String getMLFC(java.lang.String localname,
                                   java.lang.String namespace)
                            throws java.lang.IllegalAccessException,
                                   java.lang.InstantiationException,
                                   java.lang.ClassNotFoundException
Finds an MLFC from local hard drive or if unsuccessful over the network. The MLFCs are located in mlfc/XXXMLFC directory. Tries to instantiate a MLFC according to the argument mlName. If no appropriate MLFC is found on the hard disk, tries to retrieve a ZIP package from the resource location, unzip it to hard disk and then again tries to instantiate it.

Returns:
requested MLFC name or null if was unable to retrieve the required MLFC
Throws:
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.ClassNotFoundException

registerMLFCNS

public static void registerMLFCNS(java.lang.String a_ns,
                                  java.lang.String a_class)

getMLFCClassNS

public static java.lang.String getMLFCClassNS(java.lang.String ns)

registerMLFC

public static void registerMLFC(java.lang.String tag,
                                java.lang.String a_class)

isRegistered

public static boolean isRegistered(java.lang.String namespace)

getMLFCClass

public static java.lang.String getMLFCClass(java.lang.String ns)

destroy

public void destroy()


X-Smiles 1.2