org.teiid.query.function.source
Class XMLSystemFunctions
java.lang.Object
org.teiid.query.function.source.XMLSystemFunctions
public class XMLSystemFunctions
- extends java.lang.Object
This class contains scalar system functions supporting for XML manipulation.
- Since:
- 4.2
|
Method Summary |
static net.sf.saxon.value.AtomicValue |
convertToAtomicValue(java.lang.Object value)
|
static javax.xml.transform.Source |
convertToSource(java.lang.Object value)
|
static java.lang.String |
escapeName(java.lang.String name,
boolean fully)
|
static java.sql.SQLXML |
jsonToXml(CommandContext context,
java.lang.String rootName,
java.sql.Blob json)
|
static java.sql.SQLXML |
jsonToXml(CommandContext context,
java.lang.String rootName,
java.sql.Clob json)
|
static void |
main(java.lang.String[] args)
|
static void |
validateXpath(java.lang.String xpath)
Validate whether the XPath is a valid XPath. |
static XMLType |
xmlComment(java.lang.String comment)
|
static XMLType |
xmlConcat(CommandContext context,
XMLType xml,
java.lang.Object... other)
|
static XMLType |
xmlElement(CommandContext context,
java.lang.String name,
Evaluator.NameValuePair<java.lang.String>[] namespaces,
Evaluator.NameValuePair<?>[] attributes,
java.util.List<?> contents)
Basic support for xmlelement. |
static XMLType |
xmlForest(CommandContext context,
Evaluator.NameValuePair[] namespaces,
Evaluator.NameValuePair[] values)
|
static XMLType |
xmlPi(java.lang.String name)
|
static XMLType |
xmlPi(java.lang.String name,
java.lang.String content)
|
static java.lang.String |
xpathValue(java.lang.Object doc,
java.lang.String xpath)
|
static ClobType |
xslTransform(CommandContext context,
java.lang.Object xml,
java.lang.Object styleSheet)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLSystemFunctions
public XMLSystemFunctions()
xslTransform
public static ClobType xslTransform(CommandContext context,
java.lang.Object xml,
java.lang.Object styleSheet)
throws java.lang.Exception
- Throws:
java.lang.Exception
xmlForest
public static XMLType xmlForest(CommandContext context,
Evaluator.NameValuePair[] namespaces,
Evaluator.NameValuePair[] values)
throws TeiidComponentException,
TeiidProcessingException
- Throws:
TeiidComponentException
TeiidProcessingException
xmlElement
public static XMLType xmlElement(CommandContext context,
java.lang.String name,
Evaluator.NameValuePair<java.lang.String>[] namespaces,
Evaluator.NameValuePair<?>[] attributes,
java.util.List<?> contents)
throws TeiidComponentException,
TeiidProcessingException
- Basic support for xmlelement. namespaces are not yet supported.
- Parameters:
context - name - contents -
- Returns:
-
- Throws:
TeiidComponentException
TeiidProcessingException
xmlConcat
public static XMLType xmlConcat(CommandContext context,
XMLType xml,
java.lang.Object... other)
throws TeiidComponentException,
TeiidProcessingException
- Throws:
TeiidComponentException
TeiidProcessingException
xmlPi
public static XMLType xmlPi(java.lang.String name)
xmlPi
public static XMLType xmlPi(java.lang.String name,
java.lang.String content)
convertToAtomicValue
public static net.sf.saxon.value.AtomicValue convertToAtomicValue(java.lang.Object value)
throws javax.xml.transform.TransformerException
- Throws:
javax.xml.transform.TransformerException
xmlComment
public static XMLType xmlComment(java.lang.String comment)
convertToSource
public static javax.xml.transform.Source convertToSource(java.lang.Object value)
throws TeiidProcessingException
- Throws:
TeiidProcessingException
xpathValue
public static java.lang.String xpathValue(java.lang.Object doc,
java.lang.String xpath)
throws net.sf.saxon.trans.XPathException,
TeiidProcessingException
- Throws:
net.sf.saxon.trans.XPathException
TeiidProcessingException
validateXpath
public static void validateXpath(java.lang.String xpath)
throws net.sf.saxon.trans.XPathException
- Validate whether the XPath is a valid XPath. If not valid, an XPathExpressionException will be thrown.
- Parameters:
xpath - An xpath expression, for example: a/b/c/getText()
- Throws:
javax.xml.xpath.XPathExpressionException
net.sf.saxon.trans.XPathException
escapeName
public static java.lang.String escapeName(java.lang.String name,
boolean fully)
jsonToXml
public static java.sql.SQLXML jsonToXml(CommandContext context,
java.lang.String rootName,
java.sql.Blob json)
throws TeiidComponentException,
TeiidProcessingException,
java.sql.SQLException,
java.io.IOException
- Throws:
TeiidComponentException
TeiidProcessingException
java.sql.SQLException
java.io.IOException
jsonToXml
public static java.sql.SQLXML jsonToXml(CommandContext context,
java.lang.String rootName,
java.sql.Clob json)
throws TeiidComponentException,
TeiidProcessingException,
java.sql.SQLException
- Throws:
TeiidComponentException
TeiidProcessingException
java.sql.SQLException
main
public static void main(java.lang.String[] args)
Copyright © 2010. All Rights Reserved.