net.sf.xaj
Interface XmlResource

All Known Implementing Classes:
BasicXmlResource, Dom4jXmlResource, DOMXmlResource

public interface XmlResource

API for base XML document structure.

Version:
$Revision: 77 $ $Date: 2008-05-27 08:19:34 +1200 (Tue, 27 May 2008) $
Author:
matt

Method Summary
 void free()
          Free up any resources associated with this XmlResource.
 javax.xml.transform.Source getAsSource()
          Get the content of this XML resource as an XSLT Source, for use in a transformation.
 java.io.InputStream getAsStream()
          Get the content of this XML resource as an input stream
 java.lang.String getAsString()
          Get the content of this XML resource as a String.
 java.io.Serializable getId()
          Get the unique ID that identifies this XML resource.
 

Method Detail

getId

java.io.Serializable getId()
Get the unique ID that identifies this XML resource.

This is the "primary key" for the XML resource. Note that this will only be available for complete XML documents, not necessarily for results returned by XQuery evaluation since that might return arbitrary nodes.

Returns:
the ID

getAsStream

java.io.InputStream getAsStream()
Get the content of this XML resource as an input stream

Returns:
the content of this resource

getAsString

java.lang.String getAsString()
Get the content of this XML resource as a String.

Returns:
the content of this resource as a String

getAsSource

javax.xml.transform.Source getAsSource()
Get the content of this XML resource as an XSLT Source, for use in a transformation.

Returns:
XSLT Source

free

void free()
Free up any resources associated with this XmlResource.

After calling this method the XmlResource instance should not be used anymore.