Package org.teiid.query.function.source
Class XMLHelper
- java.lang.Object
-
- org.teiid.query.function.source.XMLHelper
-
- Direct Known Subclasses:
XMLHelperImpl
public class XMLHelper extends Object
-
-
Constructor Summary
Constructors Constructor Description XMLHelper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description XQueryExpression
compile(String xquery, XMLNamespaces namespaces, List<DerivedColumn> passing, List<XMLTable.XMLColumn> columns)
String
convertToAtomicValue(Object value)
String
escapeName(String name, boolean fully)
Object
evaluate(XMLType val, XMLCast expression, CommandContext context)
Object
evaluateXMLQuery(List<?> tuple, XMLQuery xmlQuery, boolean exists, Map<String,Object> parameters, CommandContext context)
static XMLHelper
getInstance()
boolean
isRealImplementation()
boolean
isValidNCName(String prefix)
RelationalNode
newXMLTableNode(int id, XMLTable xt, ArrayList<XMLTable.XMLColumn> filteredColumns)
String[]
validateQName(String name)
void
validateXpath(String xpath)
-
-
-
Method Detail
-
getInstance
public static XMLHelper getInstance()
-
validateXpath
public void validateXpath(String xpath) throws TeiidProcessingException
- Parameters:
xpath
-- Throws:
TeiidProcessingException
-
validateQName
public String[] validateQName(String name) throws TeiidProcessingException
- Parameters:
name
-- Returns:
- Throws:
TeiidProcessingException
-
isValidNCName
public boolean isValidNCName(String prefix) throws TeiidProcessingException
- Parameters:
prefix
-- Returns:
- Throws:
TeiidProcessingException
-
convertToAtomicValue
public String convertToAtomicValue(Object value) throws TransformerException
- Parameters:
value
-- Returns:
- Throws:
TransformerException
-
escapeName
public String escapeName(String name, boolean fully)
- Parameters:
name
-fully
-- Returns:
-
compile
public XQueryExpression compile(String xquery, XMLNamespaces namespaces, List<DerivedColumn> passing, List<XMLTable.XMLColumn> columns) throws QueryResolverException
- Parameters:
xquery
-namespaces
-passing
-columns
-- Returns:
- Throws:
QueryResolverException
-
evaluateXMLQuery
public Object evaluateXMLQuery(List<?> tuple, XMLQuery xmlQuery, boolean exists, Map<String,Object> parameters, CommandContext context) throws FunctionExecutionException, BlockedException, TeiidComponentException
- Parameters:
tuple
-xmlQuery
-exists
-parameters
-context
-- Returns:
- Throws:
FunctionExecutionException
TeiidComponentException
BlockedException
-
evaluate
public Object evaluate(XMLType val, XMLCast expression, CommandContext context) throws ExpressionEvaluationException
- Parameters:
val
-expression
-context
-- Returns:
- Throws:
ExpressionEvaluationException
-
newXMLTableNode
public RelationalNode newXMLTableNode(int id, XMLTable xt, ArrayList<XMLTable.XMLColumn> filteredColumns) throws TeiidComponentException
- Parameters:
id
-xt
-filteredColumns
-- Returns:
- Throws:
TeiidComponentException
-
isRealImplementation
public boolean isRealImplementation()
-
-