com.infoengine.xml
Class ProcessXml

java.lang.Object
  extended bycom.infoengine.xml.ProcessXml

public class ProcessXml
extends Object


Field Summary
private static String RESOURCE
           
 
Constructor Summary
ProcessXml()
           
 
Method Summary
private static IeCollection applyXsl(Reader xmlReader, Reader xslReader, String styleBaseURI, Enumeration params)
           
static IeCollection applyXsl(Webject webject, Task task)
          Apply XSL to an XML stream to produce a collection of groups.
static Group applyXsl(Webject webject, Task task, Group group)
          Apply XSL to the XML representation of a group.
static void applyXsl(Webject webject, Task task, Group group, IeMultipartOutputStream iemos)
          Apply XSL to the XML representation of a group to produce a new XML output stream.
static IeCollection applyXsl(Webject webject, Task task, String xmlSource)
          Apply XSL to an XML string to produce a collection of groups.
private static Element getAuthElement(Task task, String url)
           
static Reader getInputStream(String urlString)
           
static Reader getInputStream(String urlString, String username, String password)
           
static Reader getInputStream(String urlString, Webject webject, Task task)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values
Constructor Detail

ProcessXml

public ProcessXml()
Method Detail

applyXsl

public static IeCollection applyXsl(Webject webject,
                                    Task task)
                             throws IEException
Apply XSL to an XML stream to produce a collection of groups. Both the XSL and XML documents are read from URL's.

Parameters:
webject - The webject containing parameters that specify the URL's of the XSL and XML documents, and parameters for the XSL stylesheet.
task - A task possibly containing an Auth-Map group that has authentication information for the URL's specified in the webject.
Returns:
The collection of groups produced by applying the XSL to the XML document to produce I*E group format.
Throws:
IEException - if the XSL translation or production of collection fails.

applyXsl

public static IeCollection applyXsl(Webject webject,
                                    Task task,
                                    String xmlSource)
                             throws IEException
Apply XSL to an XML string to produce a collection of groups. The XSL document is read from a URL.

Parameters:
webject - The webject containing parameters that specify the URL of the XSL document and parameters to be passed to it.
task - A task possibly containing an Auth-Map group that has authentication information for the URL specified in the webject.
xmlSource - The XML string to which to apply the XSL stylesheet.
Returns:
The collection of groups produced by applying the XSL to the XML document to produce I*E group format.
Throws:
IEException - if the XSL translation or production of the collection fails.

applyXsl

public static Group applyXsl(Webject webject,
                             Task task,
                             Group group)
                      throws IEException
Apply XSL to the XML representation of a group. The XSL document is read from a URL.

Parameters:
webject - The webject containing parameters that specify the URL of the XSL document, and parameters for it.
task - A task possibly containing an Auth-Map group that has authentication information for the URL specified in the webject.
group - The group to which to apply the XSL stylesheet.
Returns:
The group produced by applying the XSL transformation.
Throws:
IEException - if the XSL translation or production of the group fails.

applyXsl

public static void applyXsl(Webject webject,
                            Task task,
                            Group group,
                            IeMultipartOutputStream iemos)
                     throws IEException
Apply XSL to the XML representation of a group to produce a new XML output stream. The XSL document is read from a URL.

Parameters:
webject - The webject containing parameters that specify the URL of the XSL stylesheet and parameters for it.
task - A task possibly containing an Auth-Map group that has authentication information for the XSL URL specified in the webject.
group - The group to which to apply the XSL stylesheet.
Throws:
IEException - if the XSL translation fails.

applyXsl

private static IeCollection applyXsl(Reader xmlReader,
                                     Reader xslReader,
                                     String styleBaseURI,
                                     Enumeration params)
                              throws IEException
Throws:
IEException

getInputStream

public static Reader getInputStream(String urlString)
                             throws IEException
Throws:
IEException

getInputStream

public static Reader getInputStream(String urlString,
                                    Webject webject,
                                    Task task)
                             throws IEException
Throws:
IEException

getInputStream

public static Reader getInputStream(String urlString,
                                    String username,
                                    String password)
                             throws IEException
Throws:
IEException

getAuthElement

private static Element getAuthElement(Task task,
                                      String url)