Package org.teiid.query.function.source
Class XMLSystemFunctions
- java.lang.Object
-
- org.teiid.query.function.source.XMLSystemFunctions
-
public class XMLSystemFunctions extends Object
This class contains scalar system functions supporting for XML manipulation.- Since:
- 4.2
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XMLSystemFunctions.ExtendedWriter
An extension to the standard writer to allow for direct inclusion of large values by reference rather than by copystatic class
XMLSystemFunctions.XmlConcat
-
Constructor Summary
Constructors Constructor Description XMLSystemFunctions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Source
convertToSource(Object value)
static InputStreamReader
getJsonReader(Blob json)
static XMLOutputFactory
getOutputFactory()
static XMLOutputFactory
getOutputFactory(boolean repairing)
static SQLXML
jsonToXml(CommandContext context, String rootName, Blob json)
static SQLXML
jsonToXml(CommandContext context, String rootName, Blob json, boolean stream)
static SQLXML
jsonToXml(CommandContext context, String rootName, Clob json)
static SQLXML
jsonToXml(CommandContext context, String rootName, Clob json, boolean stream)
static SQLXMLImpl
saveToBufferManager(BufferManager bufferMgr, XMLTranslator translator, CommandContext context)
This method saves the given XML object to the buffer manager's disk process Documents less than the maxMemorySize will be held directly in memorystatic Object
serialize(XMLSerialize xs, XMLType value)
static XMLType
xmlComment(String comment)
static XMLType
xmlConcat(CommandContext context, XMLType xml, Object... other)
static XMLType
xmlElement(CommandContext context, String name, Evaluator.NameValuePair<String>[] namespaces, Evaluator.NameValuePair<?>[] attributes, List<?> contents)
Basic support for xmlelement.static XMLType
xmlForest(CommandContext context, Evaluator.NameValuePair[] namespaces, Evaluator.NameValuePair[] values)
static XMLType
xmlPi(String name)
static XMLType
xmlPi(String name, String content)
static XMLType
xmlText(String val)
static ClobType
xslTransform(CommandContext context, Object xml, Object styleSheet)
-
-
-
Method Detail
-
getOutputFactory
public static XMLOutputFactory getOutputFactory() throws FactoryConfigurationError
- Throws:
FactoryConfigurationError
-
xslTransform
public static ClobType xslTransform(CommandContext context, Object xml, Object styleSheet) throws Exception
- Throws:
Exception
-
xmlForest
public static XMLType xmlForest(CommandContext context, Evaluator.NameValuePair[] namespaces, Evaluator.NameValuePair[] values) throws TeiidComponentException, TeiidProcessingException
-
xmlElement
public static XMLType xmlElement(CommandContext context, String name, Evaluator.NameValuePair<String>[] namespaces, Evaluator.NameValuePair<?>[] attributes, List<?> contents) throws TeiidComponentException, TeiidProcessingException
Basic support for xmlelement.- Parameters:
context
-name
-contents
-- Returns:
- Throws:
TeiidComponentException
TeiidProcessingException
-
xmlConcat
public static XMLType xmlConcat(CommandContext context, XMLType xml, Object... other) throws TeiidProcessingException
- Throws:
TeiidProcessingException
-
xmlComment
public static XMLType xmlComment(String comment) throws FunctionExecutionException
- Throws:
FunctionExecutionException
-
convertToSource
public static Source convertToSource(Object value) throws TeiidProcessingException
- Throws:
TeiidProcessingException
-
jsonToXml
public static SQLXML jsonToXml(CommandContext context, String rootName, Blob json) throws TeiidComponentException, TeiidProcessingException, SQLException, IOException
-
jsonToXml
public static SQLXML jsonToXml(CommandContext context, String rootName, Blob json, boolean stream) throws TeiidComponentException, TeiidProcessingException, SQLException, IOException
-
getJsonReader
public static InputStreamReader getJsonReader(Blob json) throws SQLException, IOException
- Throws:
SQLException
IOException
-
jsonToXml
public static SQLXML jsonToXml(CommandContext context, String rootName, Clob json) throws TeiidComponentException, TeiidProcessingException, SQLException
-
jsonToXml
public static SQLXML jsonToXml(CommandContext context, String rootName, Clob json, boolean stream) throws TeiidComponentException, TeiidProcessingException, SQLException
-
saveToBufferManager
public static SQLXMLImpl saveToBufferManager(BufferManager bufferMgr, XMLTranslator translator, CommandContext context) throws TeiidComponentException, TeiidProcessingException
This method saves the given XML object to the buffer manager's disk process Documents less than the maxMemorySize will be held directly in memory
-
serialize
public static Object serialize(XMLSerialize xs, XMLType value) throws TransformationException
- Throws:
TransformationException
-
getOutputFactory
public static XMLOutputFactory getOutputFactory(boolean repairing)
-
xmlText
@TeiidFunction(category="XML", nullOnNull=true) public static XMLType xmlText(String val) throws XMLStreamException, FactoryConfigurationError, IOException, TransformerException
-
-