org.sixdml.transform
Interface SixdmlTransformService

All Superinterfaces:
Configurable, Service
All Known Implementing Classes:
xiXsltTransformService

public interface SixdmlTransformService
extends Service

 SixdmlTransformService.java
 
 This is a Service that enables the execution of transformations within the context of a 
 Collection, against the documents stored in the Collection or XML nodes.

 Created: Fri Jan 11 11:55:20 2002
 

Version:
1.0
Author:
Dare Obasanjo

Method Summary
 SixdmlTransformType[] getSupportedTransformTypes()
          Gets the types of transforms that are supported by the this database.
 SixdmlTransformType getType()
          Get the type of this object as a SixdmlTransformType.
 String transformAndReturnString(String transformCode, SixdmlResource resource)
          Transforms a SixdmlResource from one XML document to another and returns the results in a string.
 String transformAndReturnString(String transformCode, String sourceXML)
          Transforms a string representation of a wellformed XML document to another and returns the results in a string.
 String transformAndReturnString(URL source, SixdmlResource resource)
          Transforms a SixdmlResource from one XML document to another and returns the results in a string.
 String transformAndReturnString(URL source, String sourceXML)
          Transforms a SixdmlResource from one XML document to another and returns the results in a string.
 
Methods inherited from interface org.xmldb.api.base.Service
getName, getVersion, setCollection
 
Methods inherited from interface org.xmldb.api.base.Configurable
getProperty, setProperty
 

Method Detail

getSupportedTransformTypes

public SixdmlTransformType[] getSupportedTransformTypes()
                                                 throws XMLDBException
Gets the types of transforms that are supported by the this database.
Returns:
an array of SixdmlTransformTypes which the database supports.
Throws:
XMLDBException - if an error occurs.

getType

public SixdmlTransformType getType()
Get the type of this object as a SixdmlTransformType.
Returns:
the type of this object.

transformAndReturnString

public String transformAndReturnString(URL source,
                                       SixdmlResource resource)
                                throws IOException,
                                       InvalidTransformException
Transforms a SixdmlResource from one XML document to another and returns the results in a string.
Parameters:
source - the URL to the location of the file containing the transform.
resource - the resource to transform
Returns:
the results of the transform in a string.
Throws:
IOException - if an error occurs while trying to retrieve the file.
InvalidTransformException - if the transform specified is an invalid or non-well formed query or document.

transformAndReturnString

public String transformAndReturnString(String transformCode,
                                       SixdmlResource resource)
                                throws InvalidTransformException
Transforms a SixdmlResource from one XML document to another and returns the results in a string.
Parameters:
transformCode - the actual code for the stylesheet or query.
resource - the resource to transform
Returns:
the results of the transform in a string.
Throws:
InvalidTransformException - if the transform specified is an invalid or non-well formed query or document.

transformAndReturnString

public String transformAndReturnString(String transformCode,
                                       String sourceXML)
                                throws InvalidTransformException,
                                       NonWellFormedXMLException
Transforms a string representation of a wellformed XML document to another and returns the results in a string.
Parameters:
transformCode - the actual code for the stylesheet or query.
sourceXML - the XML to transform
Returns:
the results of the transform in a string.
Throws:
InvalidTransformException - if the transform specified is an invalid or non-well formed query or document.
NonWellFormedXMLException - if the data to transform is not a wellformed XML document.

transformAndReturnString

public String transformAndReturnString(URL source,
                                       String sourceXML)
                                throws IOException,
                                       InvalidTransformException,
                                       NonWellFormedXMLException
Transforms a SixdmlResource from one XML document to another and returns the results in a string.
Parameters:
source - the URL to the location of the file containing the transform.
sourceXML - the XML to transform
Returns:
the results of the transform in a string.
Throws:
IOException - if an error occurs while trying to retrieve the file.
InvalidTransformException - if the transform specified is an invalid or non-well formed query or document.
NonWellFormedXMLException - if the data to transform is not a wellformed XML document.