本文整理了Java中org.teiid.core.types.XMLType.getType()
方法的一些代码示例,展示了XMLType.getType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLType.getType()
方法的具体详情如下:
包路径:org.teiid.core.types.XMLType
类名称:XMLType
方法名:getType
暂无
代码示例来源:origin: org.jboss.teiid/teiid-engine
private Object evaluateXMLSerialize(List<?> tuple, XMLSerialize xs)
throws ExpressionEvaluationException, BlockedException,
TeiidComponentException, FunctionExecutionException {
XMLType value = (XMLType) internalEvaluate(xs.getExpression(), tuple);
if (value == null) {
return null;
}
try {
if (!xs.isDocument()) {
return XMLSystemFunctions.serialize(xs, value);
}
if (value.getType() == Type.UNKNOWN) {
Type type = StringToSQLXMLTransform.isXml(value.getCharacterStream());
value.setType(type);
}
if (value.getType() == Type.DOCUMENT || value.getType() == Type.ELEMENT) {
return XMLSystemFunctions.serialize(xs, value);
}
} catch (SQLException e) {
throw new FunctionExecutionException(QueryPlugin.Event.TEIID30334, e);
} catch (TransformationException e) {
throw new FunctionExecutionException(QueryPlugin.Event.TEIID30335, e);
}
throw new FunctionExecutionException(QueryPlugin.Event.TEIID30336, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30336));
}
代码示例来源:origin: org.teiid/teiid-engine
private Object evaluateXMLSerialize(List<?> tuple, XMLSerialize xs)
throws ExpressionEvaluationException, BlockedException,
TeiidComponentException, FunctionExecutionException {
XMLType value = (XMLType) internalEvaluate(xs.getExpression(), tuple);
if (value == null) {
return null;
}
try {
if (!xs.isDocument()) {
return XMLSystemFunctions.serialize(xs, value);
}
if (value.getType() == Type.UNKNOWN) {
Type type = StringToSQLXMLTransform.isXml(value.getCharacterStream());
value.setType(type);
}
if (value.getType() == Type.DOCUMENT || value.getType() == Type.ELEMENT) {
return XMLSystemFunctions.serialize(xs, value);
}
} catch (SQLException e) {
throw new FunctionExecutionException(QueryPlugin.Event.TEIID30334, e);
} catch (TransformationException e) {
throw new FunctionExecutionException(QueryPlugin.Event.TEIID30335, e);
}
throw new FunctionExecutionException(QueryPlugin.Event.TEIID30336, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30336));
}
代码示例来源:origin: teiid/teiid
private Object evaluateXMLSerialize(List<?> tuple, XMLSerialize xs)
throws ExpressionEvaluationException, BlockedException,
TeiidComponentException, FunctionExecutionException {
XMLType value = (XMLType) internalEvaluate(xs.getExpression(), tuple);
if (value == null) {
return null;
}
try {
if (!xs.isDocument()) {
return XMLSystemFunctions.serialize(xs, value);
}
if (value.getType() == Type.UNKNOWN) {
Type type = StringToSQLXMLTransform.isXml(value.getCharacterStream());
value.setType(type);
}
if (value.getType() == Type.DOCUMENT || value.getType() == Type.ELEMENT) {
return XMLSystemFunctions.serialize(xs, value);
}
} catch (SQLException e) {
throw new FunctionExecutionException(QueryPlugin.Event.TEIID30334, e);
} catch (TransformationException e) {
throw new FunctionExecutionException(QueryPlugin.Event.TEIID30335, e);
}
throw new FunctionExecutionException(QueryPlugin.Event.TEIID30336, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30336));
}
代码示例来源:origin: org.teiid/teiid-engine
public void addValue(Object object) throws TeiidProcessingException {
if (type == null) {
if (object instanceof XMLType) {
type = ((XMLType)object).getType();
}
} else {
type = Type.CONTENT;
}
try {
convertValue(ew, eventWriter, threadLocalEventtFactory.get(), object);
} catch (IOException e) {
fs.remove();
throw new TeiidProcessingException(QueryPlugin.Event.TEIID30438, e);
} catch (XMLStreamException e) {
fs.remove();
throw new TeiidProcessingException(QueryPlugin.Event.TEIID30439, e);
} catch (TransformerException e) {
fs.remove();
throw new TeiidProcessingException(QueryPlugin.Event.TEIID30440, e);
}
}
代码示例来源:origin: org.jboss.teiid/teiid-engine
public void addValue(Object object) throws TeiidProcessingException {
if (type == null) {
if (object instanceof XMLType) {
type = ((XMLType)object).getType();
}
} else {
type = Type.CONTENT;
}
try {
convertValue(ew, eventWriter, threadLocalEventtFactory.get(), object);
} catch (IOException e) {
fs.remove();
throw new TeiidProcessingException(QueryPlugin.Event.TEIID30438, e);
} catch (XMLStreamException e) {
fs.remove();
throw new TeiidProcessingException(QueryPlugin.Event.TEIID30439, e);
} catch (TransformerException e) {
fs.remove();
throw new TeiidProcessingException(QueryPlugin.Event.TEIID30440, e);
}
}
代码示例来源:origin: teiid/teiid
public void addValue(Object object) throws TeiidProcessingException {
if (type == null) {
if (object instanceof XMLType) {
type = ((XMLType)object).getType();
}
} else {
type = Type.CONTENT;
}
try {
convertValue(ew, eventWriter, threadLocalEventtFactory.get(), object);
} catch (IOException e) {
fs.remove();
throw new TeiidProcessingException(QueryPlugin.Event.TEIID30438, e);
} catch (XMLStreamException e) {
fs.remove();
throw new TeiidProcessingException(QueryPlugin.Event.TEIID30439, e);
} catch (TransformerException e) {
fs.remove();
throw new TeiidProcessingException(QueryPlugin.Event.TEIID30440, e);
}
}
代码示例来源:origin: teiid/teiid
@Test public void testGoodElement() throws Exception {
String xml = "<customer>\n" + //$NON-NLS-1$
"<name>ABC</name>" + //$NON-NLS-1$
"<age>32</age>" + //$NON-NLS-1$
"</customer>"; //$NON-NLS-1$
StringToSQLXMLTransform transform = new StringToSQLXMLTransform();
XMLType xmlValue = (XMLType)transform.transformDirect(xml);
assertEquals(xml.replaceAll("[\r]", ""), xmlValue.getString().replaceAll("[\r]", ""));
assertEquals(XMLType.Type.ELEMENT, xmlValue.getType());
}
代码示例来源:origin: org.teiid/teiid-engine
public static Object evaluate(XMLType value, XMLCast expression, CommandContext context) throws ExpressionEvaluationException {
Configuration config = new Configuration();
Type t = value.getType();
try {
Item i = null;
代码示例来源:origin: teiid/teiid
public static Object evaluate(XMLType value, XMLCast expression, CommandContext context) throws ExpressionEvaluationException {
Configuration config = new Configuration();
Type t = value.getType();
try {
Item i = null;
代码示例来源:origin: org.jboss.teiid/teiid-engine
Type t = value.getType();
try {
Item i = null;
代码示例来源:origin: org.jboss.teiid/teiid-engine
public static Object serialize(XMLSerialize xs, XMLType value) throws TransformationException {
Type type = value.getType();
final Charset encoding;
if (xs.getEncoding() != null) {
代码示例来源:origin: org.teiid/teiid-engine
public static Object serialize(XMLSerialize xs, XMLType value) throws TransformationException {
Type type = value.getType();
final Charset encoding;
if (xs.getEncoding() != null) {
代码示例来源:origin: teiid/teiid
public static Object serialize(XMLSerialize xs, XMLType value) throws TransformationException {
Type type = value.getType();
final Charset encoding;
if (xs.getEncoding() != null) {
代码示例来源:origin: teiid/teiid
if (object instanceof XMLType) {
XMLType xml = (XMLType)object;
Type type = xml.getType();
convertReader(writer, eventWriter, null, type, xml);
} else if (object instanceof ClobType) {
代码示例来源:origin: org.jboss.teiid/teiid-engine
if (object instanceof XMLType) {
XMLType xml = (XMLType)object;
Type type = xml.getType();
convertReader(writer, eventWriter, null, type, xml);
} else if (object instanceof ClobType) {
代码示例来源:origin: org.teiid/teiid-engine
if (object instanceof XMLType) {
XMLType xml = (XMLType)object;
Type type = xml.getType();
convertReader(writer, eventWriter, null, type, xml);
} else if (object instanceof ClobType) {
内容来源于网络,如有侵权,请联系作者删除!