com.xefer.rebel
Class XBELElementFactory

java.lang.Object
  |
  +--com.xefer.rebel.XBELElementFactory

class XBELElementFactory
extends Object

Constructs XBELElements


Constructor Summary
(package private) XBELElementFactory()
           
 
Method Summary
static String convertURLtoXPath(String path)
          Convert the given url path into an XPath
static XBELElement generateElement(Document document, String path)
          generateElement Construct an XBELElement at the given path
static XBELElement getElement(Document document, String path)
          getElement Convert the given url path into an XPath and extract the appropriate node from the given XML Document.
static XBELElement newElement(Document document)
          newElement Convert the given url path into an XPath and extract the appropriate node from the given XML Document
static XBELElement newElement(Document document, String path)
          newElement Convert the given url path into an XPath and extract the appropriate node from the given XML Document
static XBELElement newElement(Element element)
          newElement Convert the given url path into an XPath and extract the appropriate node from the given XML Document
static XBELElement newElement(InputStream istream)
          newElement Convert the given url path into an XPath then extract the appropriate node from the given XML Document
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

XBELElementFactory

XBELElementFactory()
Method Detail

convertURLtoXPath

public static String convertURLtoXPath(String path)
Convert the given url path into an XPath
Parameters:
path - String a url encoded path to be converted to an xpath
Returns:
String an XPath representation of the String

generateElement

public static XBELElement generateElement(Document document,
                                          String path)
                                   throws ResourceException
generateElement Construct an XBELElement at the given path
Parameters:
document - Document the owning document.
path - String a url where the resource is to be created
Returns:
XBELElement the Element generated

getElement

public static XBELElement getElement(Document document,
                                     String path)
                              throws ResourceException
getElement Convert the given url path into an XPath and extract the appropriate node from the given XML Document. Returns null if no resource found at the given path
Parameters:
document - Document a url encoded path to be converted to an xpath
path - String a url encoded path to be converted to an xpath
Returns:
XBELElement the Element (if any) referenced by the converted path

newElement

public static XBELElement newElement(Document document)
                              throws ResourceException
newElement Convert the given url path into an XPath and extract the appropriate node from the given XML Document
Parameters:
document - Document a url encoded path to be converted to an xpath
Returns:
XBELElement the Element (if any) referenced by the converted path

newElement

public static XBELElement newElement(Document document,
                                     String path)
                              throws ResourceException
newElement Convert the given url path into an XPath and extract the appropriate node from the given XML Document
Parameters:
document - Document a url encoded path to be converted to an xpath
path - String a url encoded path to be converted to an xpath
Returns:
XBELElement the Element (if any) referenced by the converted path

newElement

public static XBELElement newElement(Element element)
                              throws ResourceException
newElement Convert the given url path into an XPath and extract the appropriate node from the given XML Document
Parameters:
element - Element a url encoded path to be converted to an xpath
Returns:
XBELElement the Element (if any) referenced by the converted path

newElement

public static XBELElement newElement(InputStream istream)
                              throws ResourceException
newElement Convert the given url path into an XPath then extract the appropriate node from the given XML Document
Parameters:
istream - InputStream an XML document containing resource elements
Returns:
XBELElement the Element (if any) referenced by the converted path