com.ibm.portal.resolver.xml
Interface XMLFactory


public interface XMLFactory

Interface that provides access to classes that facilitate the processing of XML related operations.

Since:
6.0.1

Field Summary
static java.lang.String ATTR_CLASS
          name of the class attribute used for instantiation
static java.lang.String DEFAULT_EXTENSION_ID
          ID of the XLM Factory default extension
static java.lang.String EXTENSION_POINT_ID
          ID of the XLM Factory extension point
 
Method Summary
 DefaultContentHandler createDefaultContentHandler()
          Creates a default content handler that can be attached with different target ContentHandler implementations
 DefaultContentHandler createDefaultContentHandler(org.xml.sax.ContentHandler aHandler)
          Creates a default content handler that can be attached with different target ContentHandler implementations and automatically associates it with a handler
 DefaultContentHandler createDefaultContentHandler(ResettableContentHandler aHandler)
          Creates a default content handler that can be attached with different target ContentHandler implementations.
 StreamContentHandler createStreamContentHandler()
          Constructs a new StreamContentHandler
 StreamContentHandler java.io.OutputStream)">createStreamContentHandler(java.io.OutputStream out)
          Constructs a new StreamContentHandler
 StreamContentHandler java.io.Writer)">createStreamContentHandler(java.io.Writer out)
          Constructs a new StreamContentHandler
 javax.xml.transform.Templates createTemplates(java.lang.Boolean bForceXSLTC)
          Creates a template for the identitiy transformation
 javax.xml.transform.Templates createTemplates(javax.xml.transform.Source src, java.lang.Boolean bForceXSLTC)
          Creates an XSLTC template
 javax.xml.transform.TransformerFactory createTransformerFactory(java.lang.Boolean bForceXSLTC)
          Creates a new transformer factory based on the XSLTC flag
 ResolverContentHandler createXMLBaseContentHandler()
          Creates a content handler that listens to the xml:base attributes and that is able to resolve URLs in the context of these base tags.
 ResolverContentHandler createXMLBaseContentHandler(org.xml.sax.ContentHandler aDelegate)
          Creates a content handler that listens to the xml:base attributes and that is able to resolve URLs in the context of these base tags.
 ResolverContentHandler createXMLBaseContentHandler(ResettableContentHandler aHandler)
          Creates an ContentHandler that keeps track of "xml:base" attributes to compute absolute URLs from relative URLs.
 ResolverXMLFilter createXMLBaseFilter()
          Creates an XMLFilter that keeps track of "xml:base" attributes to compute absolute URLs from relative URLs.
 ResolverXMLFilter createXMLBaseFilter(org.xml.sax.XMLReader parent)
          Creates an XMLFilter that keeps track of "xml:base" attributes to compute absolute URLs from relative URLs.
 XMLOutputStream createXMLOutputStream()
          Creates an XMLOutputStream that can be used to convert a byte stream into ContentHandler callbacks
 org.xml.sax.XMLReader createXMLReader()
          Creates an XMLReader object based on the standard SAX factories
 org.xml.sax.XMLReader createXMLReader(XMLOutputStream aStream)
          Creates an XMLReader object that wraps an XMLOutputStream
 

Field Detail

ATTR_CLASS

static final java.lang.String ATTR_CLASS
name of the class attribute used for instantiation

See Also:
Constant Field Values

DEFAULT_EXTENSION_ID

static final java.lang.String DEFAULT_EXTENSION_ID
ID of the XLM Factory default extension

See Also:
Constant Field Values

EXTENSION_POINT_ID

static final java.lang.String EXTENSION_POINT_ID
ID of the XLM Factory extension point

See Also:
Constant Field Values
Method Detail

createDefaultContentHandler

DefaultContentHandler createDefaultContentHandler()
                                                  throws org.xml.sax.SAXException
Creates a default content handler that can be attached with different target ContentHandler implementations

Returns:
the default handler
Throws:
org.xml.sax.SAXException - - if the handler could not be constructed

createDefaultContentHandler

DefaultContentHandler createDefaultContentHandler(org.xml.sax.ContentHandler aHandler)
                                                  throws org.xml.sax.SAXException
Creates a default content handler that can be attached with different target ContentHandler implementations and automatically associates it with a handler

Parameters:
aHandler - handler that will directly be connected
Returns:
the default handler
Throws:
org.xml.sax.SAXException - - if the handler could not be constructed

createDefaultContentHandler

DefaultContentHandler createDefaultContentHandler(ResettableContentHandler aHandler)
                                                  throws org.xml.sax.SAXException
Creates a default content handler that can be attached with different target ContentHandler implementations. This handler will be part of the chain defined by the aHandler parameter

Parameters:
aHandler - handler that will directly be connected
Returns:
the default handler
Throws:
org.xml.sax.SAXException - - if the handler could not be constructed

createStreamContentHandler

StreamContentHandler createStreamContentHandler()
                                                throws org.xml.sax.SAXException
Constructs a new StreamContentHandler

Returns:
the handler
Throws:
org.xml.sax.SAXException

java.io.OutputStream)">

createStreamContentHandler

StreamContentHandler createStreamContentHandler(java.io.OutputStream out)
                                                throws org.xml.sax.SAXException
Constructs a new StreamContentHandler

Returns:
the handler
Throws:
org.xml.sax.SAXException

java.io.Writer)">

createStreamContentHandler

StreamContentHandler createStreamContentHandler(java.io.Writer out)
                                                throws org.xml.sax.SAXException
Constructs a new StreamContentHandler

Returns:
the handler
Throws:
org.xml.sax.SAXException

createTemplates

javax.xml.transform.Templates createTemplates(java.lang.Boolean bForceXSLTC)
                                              throws javax.xml.transform.TransformerConfigurationException
Creates a template for the identitiy transformation

Parameters:
bForceXSLTC - the method tries to create the XSLTC version of the transformer template, if set to false it uses the system default. If null it uses the most efficient version that is available in the system automatically
Returns:
a template that can be used to produce an identity Transformer
Throws:
javax.xml.transform.TransformerConfigurationException

createTemplates

javax.xml.transform.Templates createTemplates(javax.xml.transform.Source src,
                                              java.lang.Boolean bForceXSLTC)
                                              throws javax.xml.transform.TransformerConfigurationException
Creates an XSLTC template

Parameters:
src - source for the templates
bForceXSLTC - the method tries to create the XSLTC version of the transformer template, if set to false it uses the system default. If null it uses the most efficient version that is available in the system automatically
Returns:
a template based on the source
Throws:
javax.xml.transform.TransformerConfigurationException

createTransformerFactory

javax.xml.transform.TransformerFactory createTransformerFactory(java.lang.Boolean bForceXSLTC)
                                                                throws javax.xml.transform.TransformerFactoryConfigurationError
Creates a new transformer factory based on the XSLTC flag

Parameters:
bForceXSLTC - the method tries to create the XSLTC version of the transformer template, if set to false it uses the system default. If null it uses the most efficient version that is available in the system automatically
Returns:
new TransformerFactory instance, never null (unless an ErrorListener is registered with the TransformerFactory, in which case an exception error sends an error message to the ErrorListener and returns null).
Throws:
javax.xml.transform.TransformerFactoryConfigurationError - if the implmentation is not available or cannot be instantiated.

createXMLBaseContentHandler

ResolverContentHandler createXMLBaseContentHandler()
                                                   throws org.xml.sax.SAXException
Creates a content handler that listens to the xml:base attributes and that is able to resolve URLs in the context of these base tags.

Returns:
a resolving handler
Throws:
org.xml.sax.SAXException - - if the handler could not be constructed

createXMLBaseContentHandler

ResolverContentHandler createXMLBaseContentHandler(org.xml.sax.ContentHandler aDelegate)
                                                   throws org.xml.sax.SAXException
Creates a content handler that listens to the xml:base attributes and that is able to resolve URLs in the context of these base tags. The returned implementation will automatically dispatch to the delegate handler

Parameters:
aDelegate - handler to dispatch to
Returns:
a resolving handler
Throws:
org.xml.sax.SAXException - - if the handler could not be constructed

createXMLBaseContentHandler

ResolverContentHandler createXMLBaseContentHandler(ResettableContentHandler aHandler)
                                                   throws org.xml.sax.SAXException
Creates an ContentHandler that keeps track of "xml:base" attributes to compute absolute URLs from relative URLs.

Parameters:
aHandler - next element in the handler chain. This next element will receive all SAX events that were initially thrown on the handler
Returns:
An instance of a content handler that is initialized with a ResettableContentHandler as the next element in the handler chain
Throws:
org.xml.sax.SAXException - - if the handler could not be constructed

createXMLBaseFilter

ResolverXMLFilter createXMLBaseFilter()
                                      throws org.xml.sax.SAXException
Creates an XMLFilter that keeps track of "xml:base" attributes to compute absolute URLs from relative URLs.

Returns:
An instance of a ResolverXMLFilter that is associated with a default XMLReader.
Throws:
org.xml.sax.SAXException - - if the filter could not be constructed

createXMLBaseFilter

ResolverXMLFilter createXMLBaseFilter(org.xml.sax.XMLReader parent)
                                      throws org.xml.sax.SAXException
Creates an XMLFilter that keeps track of "xml:base" attributes to compute absolute URLs from relative URLs.

Parameters:
parent - the XMLReader instance that is used as the basis for the SAX events
Returns:
An instance of a ResolverXMLFilter that is associated with the specified XMLReader.
Throws:
org.xml.sax.SAXException - - if the filter could not be constructed

createXMLOutputStream

XMLOutputStream createXMLOutputStream()
                                      throws org.xml.sax.SAXException
Creates an XMLOutputStream that can be used to convert a byte stream into ContentHandler callbacks

Returns:
An instance of the XMLOutputStream
Throws:
org.xml.sax.SAXException - - if the filter could not be constructed
Since:
6.1.0

createXMLReader

org.xml.sax.XMLReader createXMLReader()
                                      throws org.xml.sax.SAXException
Creates an XMLReader object based on the standard SAX factories

Returns:
the XMLReader
Throws:
org.xml.sax.SAXException

createXMLReader

org.xml.sax.XMLReader createXMLReader(XMLOutputStream aStream)
                                      throws org.xml.sax.SAXException
Creates an XMLReader object that wraps an XMLOutputStream

Returns:
the XMLReader
Throws:
org.xml.sax.SAXException