org.ocd.blx
Class CompFactory

java.lang.Object
  |
  +--org.ocd.blx.CompFactory
All Implemented Interfaces:
ICompFactory

public class CompFactory
extends java.lang.Object
implements ICompFactory

Since:
$Date: 2002/08/14 07:29:48 $
Version:
$Revision: 1.9 $
Author:
$Author: drichan $, ocd_dino - ocd_dino@users.sourceforge.net (initial author)

Method Summary
 org.w3c.dom.Document getBLXDocument(IXMLPersistable pBLXObject)
          Get a BLX Document Object from an IXMLPersistable Object
 java.awt.Component getComponent(org.w3c.dom.Document pDocument, java.net.URL pMainURL)
           
 java.awt.Component getComponent(org.w3c.dom.Node pNode, java.net.URL pMainURL)
           
 java.awt.Component getComponent(java.lang.String pName, java.lang.ClassLoader pLoader)
          Get a Component Instance
 java.awt.Component getComponent(java.lang.String pName, java.lang.String pExtension)
          Get a Component Instance
 java.awt.Component getComponent(java.lang.String pName, java.net.URL pExtURL)
          Get a Component Instance
 java.awt.Component getComponent(java.net.URL pURL)
           
 java.awt.Component getComponent(XMLObjectWrapper pWrapper)
          Get a Component Instance Note: A ClassCastException will cause an InstantiationException to be Thrown
protected  org.w3c.dom.Element getDataFromURI(org.w3c.dom.Element pBLXNode, java.net.URL pURI)
          Get Data from a seperate Document
static ICompFactory getDefaultFactory()
          Get the ComponentFactory
 java.lang.Object getObject(org.w3c.dom.Document pDocument, java.net.URL pMainURL)
           
 java.lang.Object getObject(org.w3c.dom.Node pNode, java.net.URL pMainURL)
           
 java.lang.Object getObject(java.lang.String pName, java.lang.ClassLoader pLoader)
          Get a Object Instance
 java.lang.Object getObject(java.lang.String pName, java.lang.String pExtension)
          Get a Object Instance
 java.lang.Object getObject(java.lang.String pName, java.net.URL pExtURL)
          Get a Object Instance
 java.lang.Object getObject(java.net.URL pMainURL)
           
 java.lang.Object getObject(XMLObjectWrapper pWrapper)
          Get a Object Instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefaultFactory

public static ICompFactory getDefaultFactory()
Get the ComponentFactory
Returns:
First Component Factory that Stars

getBLXDocument

public org.w3c.dom.Document getBLXDocument(IXMLPersistable pBLXObject)
Get a BLX Document Object from an IXMLPersistable Object
Specified by:
getBLXDocument in interface ICompFactory
Parameters:
pBLXObject - blx Object to obtain the Document for
Returns:
dom Document

getObject

public java.lang.Object getObject(java.lang.String pName,
                                  java.lang.ClassLoader pLoader)
                           throws java.lang.ClassNotFoundException,
                                  java.lang.InstantiationException
Get a Object Instance
Specified by:
getObject in interface ICompFactory
Parameters:
Class - name
Classloader -  
Returns:
Object

getObject

public java.lang.Object getObject(java.lang.String pName,
                                  java.lang.String pExtension)
                           throws java.lang.ClassNotFoundException,
                                  java.lang.InstantiationException
Get a Object Instance
Specified by:
getObject in interface ICompFactory
Parameters:
Class - name
Extension - Name
Returns:
Object

getObject

public java.lang.Object getObject(java.lang.String pName,
                                  java.net.URL pExtURL)
                           throws java.lang.ClassNotFoundException,
                                  java.lang.InstantiationException
Get a Object Instance
Specified by:
getObject in interface ICompFactory
Parameters:
Class - name
Extension - URL
Returns:
Object

getObject

public java.lang.Object getObject(XMLObjectWrapper pWrapper)
                           throws java.lang.ClassNotFoundException,
                                  java.lang.InstantiationException
Get a Object Instance
Specified by:
getObject in interface ICompFactory
Parameters:
XML - Wrapper
Returns:
Object

getComponent

public java.awt.Component getComponent(XMLObjectWrapper pWrapper)
                                throws java.lang.ClassNotFoundException,
                                       java.lang.InstantiationException
Get a Component Instance Note: A ClassCastException will cause an InstantiationException to be Thrown
Specified by:
getComponent in interface ICompFactory
Parameters:
XML - Wrapper
Returns:
Component

getDataFromURI

protected org.w3c.dom.Element getDataFromURI(org.w3c.dom.Element pBLXNode,
                                             java.net.URL pURI)
Get Data from a seperate Document
Parameters:
pBLXNode - Element that is BLX Node from a container
pURI - Absolute uri where the data is contained
Returns:
new Element that contains the data from the uri

getComponent

public java.awt.Component getComponent(java.net.URL pURL)
                                throws java.lang.ClassNotFoundException,
                                       java.lang.InstantiationException,
                                       InvalidBLXXMLException,
                                       java.io.IOException
Specified by:
getComponent in interface ICompFactory
Parameters:
pURL - of the BLX Document
Returns:
 
Throws:
java.lang.ClassNotFoundException -  
java.lang.InstantiationException -  
InvalidBLXXMLException -  

getComponent

public java.awt.Component getComponent(java.lang.String pName,
                                       java.lang.String pExtension)
                                throws java.lang.ClassNotFoundException,
                                       java.lang.InstantiationException
Get a Component Instance
Specified by:
getComponent in interface ICompFactory
Parameters:
class - Name
Extension - Name
Returns:
Component

getComponent

public java.awt.Component getComponent(java.lang.String pName,
                                       java.net.URL pExtURL)
                                throws java.lang.ClassNotFoundException,
                                       java.lang.InstantiationException
Get a Component Instance
Specified by:
getComponent in interface ICompFactory
Parameters:
class - Name
Extension - URL
Returns:
Component

getComponent

public java.awt.Component getComponent(java.lang.String pName,
                                       java.lang.ClassLoader pLoader)
                                throws java.lang.ClassNotFoundException,
                                       java.lang.InstantiationException
Get a Component Instance
Specified by:
getComponent in interface ICompFactory
Parameters:
Class - Name
ClassLoader - to Use
Returns:
Component

getObject

public java.lang.Object getObject(java.net.URL pMainURL)
                           throws java.lang.ClassNotFoundException,
                                  java.lang.InstantiationException,
                                  InvalidBLXXMLException
Specified by:
getObject in interface ICompFactory
Parameters:
pURL - main URL that all relative URLs are calculated from
Returns:
 
Throws:
java.lang.ClassNotFoundException -  
java.lang.InstantiationException -  
InvalidBLXXMLException -  

getObject

public java.lang.Object getObject(org.w3c.dom.Document pDocument,
                                  java.net.URL pMainURL)
                           throws java.lang.ClassNotFoundException,
                                  java.lang.InstantiationException,
                                  InvalidBLXXMLException
Specified by:
getObject in interface ICompFactory
Parameters:
pDocument -  
pURL - main URL that all relative URLs are calculated from
Returns:
 
Throws:
java.lang.ClassNotFoundException -  
java.lang.InstantiationException -  
InvalidBLXXMLException -  

getObject

public java.lang.Object getObject(org.w3c.dom.Node pNode,
                                  java.net.URL pMainURL)
                           throws java.lang.ClassNotFoundException,
                                  java.lang.InstantiationException,
                                  InvalidBLXXMLException
Specified by:
getObject in interface ICompFactory
Parameters:
pNode -  
Returns:
 
Throws:
java.lang.ClassNotFoundException -  
java.lang.InstantiationException -  
InvalidBLXXMLException -  

getComponent

public java.awt.Component getComponent(org.w3c.dom.Document pDocument,
                                       java.net.URL pMainURL)
                                throws java.lang.ClassNotFoundException,
                                       java.lang.InstantiationException,
                                       InvalidBLXXMLException
Specified by:
getComponent in interface ICompFactory
Parameters:
pDocument -  
Returns:
 
Throws:
java.lang.ClassNotFoundException -  
java.lang.InstantiationException -  
InvalidBLXXMLException -  

getComponent

public java.awt.Component getComponent(org.w3c.dom.Node pNode,
                                       java.net.URL pMainURL)
                                throws java.lang.ClassNotFoundException,
                                       java.lang.InstantiationException,
                                       InvalidBLXXMLException
Specified by:
getComponent in interface ICompFactory
Parameters:
pNode -  
Returns:
 
Throws:
java.lang.ClassNotFoundException -  
java.lang.InstantiationException -  
InvalidBLXXMLException -