gov.lanl.Utility.xml
Class Resource

java.lang.Object
  |
  +--gov.lanl.Utility.xml.Resource
All Implemented Interfaces:
java.io.Serializable

public class Resource
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form
 

Constructor Summary
Resource()
           
 
Method Summary
 java.util.Properties getParameters()
          return the parameters for the StyleSheet
 javax.xml.transform.stream.StreamResult getResult(javax.xml.transform.stream.StreamResult result, java.lang.String xslfilename)
          Transform the data with the xsl sheet
 org.w3c.dom.Document getXMLDocument()
          return the XML Document to be processed
 javax.xml.transform.dom.DOMSource getXMLSource()
          get the XML DOM source
 org.w3c.dom.Document getXSLDocument()
          return the XSL Document to be used to process the XML Dcoument
 javax.xml.transform.dom.DOMSource getXSLSource()
          return the XSL DOM source
 void setParameter(java.lang.String key, java.lang.String value)
          Set a single parameter for the stylesheet
 void setParameters(java.util.Properties p)
          Set the parameters for the stylesheet
 void setXMLDOMSource(org.w3c.dom.Document document)
          Set the XML DOM Source from an XML Document
 void setXMLDOMSource(java.lang.String xmlfilename)
          Set the XML DOM Source from a file
 javax.xml.transform.dom.DOMSource setXSLDOMSource(java.lang.String xslfilename)
          Set the XSL DOM Source from a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Resource

public Resource()
Method Detail

getXMLDocument

public org.w3c.dom.Document getXMLDocument()
return the XML Document to be processed

Returns:

getXSLDocument

public org.w3c.dom.Document getXSLDocument()
return the XSL Document to be used to process the XML Dcoument

Returns:

getXMLSource

public javax.xml.transform.dom.DOMSource getXMLSource()
get the XML DOM source

Returns:

getXSLSource

public javax.xml.transform.dom.DOMSource getXSLSource()
return the XSL DOM source

Returns:

getParameters

public java.util.Properties getParameters()
return the parameters for the StyleSheet

Returns:

setParameters

public void setParameters(java.util.Properties p)
Set the parameters for the stylesheet

Parameters:
p -

setParameter

public void setParameter(java.lang.String key,
                         java.lang.String value)
Set a single parameter for the stylesheet

Parameters:
key -
value -

setXMLDOMSource

public void setXMLDOMSource(java.lang.String xmlfilename)
                     throws javax.xml.parsers.FactoryConfigurationError,
                            javax.xml.parsers.ParserConfigurationException,
                            org.xml.sax.SAXException,
                            java.io.IOException
Set the XML DOM Source from a file

Throws:
javax.xml.parsers.FactoryConfigurationError
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
Parameters:
xmlfilename -

setXMLDOMSource

public void setXMLDOMSource(org.w3c.dom.Document document)
Set the XML DOM Source from an XML Document

Parameters:
document -

setXSLDOMSource

public javax.xml.transform.dom.DOMSource setXSLDOMSource(java.lang.String xslfilename)
                                                  throws javax.xml.parsers.FactoryConfigurationError,
                                                         javax.xml.parsers.ParserConfigurationException,
                                                         org.xml.sax.SAXException,
                                                         java.io.IOException
Set the XSL DOM Source from a file

Throws:
javax.xml.parsers.FactoryConfigurationError
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
Parameters:
xslfilename -
Returns:

getResult

public javax.xml.transform.stream.StreamResult getResult(javax.xml.transform.stream.StreamResult result,
                                                         java.lang.String xslfilename)
Transform the data with the xsl sheet

Parameters:
result - containing the transformed data
xslfilename - stylesheet to be used.