gpt4 book ai didi

org.teiid.query.sql.symbol.XMLSerialize.getEncoding()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 06:30:40 25 4
gpt4 key购买 nike

本文整理了Java中org.teiid.query.sql.symbol.XMLSerialize.getEncoding()方法的一些代码示例,展示了XMLSerialize.getEncoding()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLSerialize.getEncoding()方法的具体详情如下:
包路径:org.teiid.query.sql.symbol.XMLSerialize
类名称:XMLSerialize
方法名:getEncoding

XMLSerialize.getEncoding介绍

暂无

代码示例

代码示例来源:origin: org.teiid/teiid-engine

@Override
public void visit(XMLSerialize obj) {
  if (obj.getEncoding() != null ) {
    try {
      Charset.forName(obj.getEncoding());
    } catch (IllegalArgumentException e) {
      handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.invalid_encoding", obj.getEncoding()), obj); //$NON-NLS-1$
    }
    if ((obj.getType() != DataTypeManager.DefaultDataClasses.BLOB && obj.getType() != DataTypeManager.DefaultDataClasses.VARBINARY)) {
      handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.encoding_for_binary"), obj); //$NON-NLS-1$
    }
  }
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

@Override
public void visit(XMLSerialize obj) {
  if (obj.getEncoding() != null ) {
    try {
      Charset.forName(obj.getEncoding());
    } catch (IllegalArgumentException e) {
      handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.invalid_encoding", obj.getEncoding()), obj); //$NON-NLS-1$
    }
    if ((obj.getType() != DataTypeManager.DefaultDataClasses.BLOB && obj.getType() != DataTypeManager.DefaultDataClasses.VARBINARY)) {
      handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.encoding_for_binary"), obj); //$NON-NLS-1$
    }
  }
}

代码示例来源:origin: teiid/teiid

@Override
public void visit(XMLSerialize obj) {
  if (obj.getEncoding() != null ) {
    try {
      Charset.forName(obj.getEncoding());
    } catch (IllegalArgumentException e) {
      handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.invalid_encoding", obj.getEncoding()), obj); //$NON-NLS-1$
    }
    if ((obj.getType() != DataTypeManager.DefaultDataClasses.BLOB && obj.getType() != DataTypeManager.DefaultDataClasses.VARBINARY)) {
      handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.encoding_for_binary"), obj); //$NON-NLS-1$
    }
  }
}

代码示例来源: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) {
    encoding = Charset.forName(xs.getEncoding());					
  } else {
    encoding = UTF_8;
      if (xs.getVersion() != null) {
        start = xmlEventFactory.createStartDocument(encoding.name(), xs.getVersion());
      } else if (xs.getEncoding() != null) {
        start = xmlEventFactory.createStartDocument(encoding.name());
      } else {

代码示例来源: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) {
    encoding = Charset.forName(xs.getEncoding());					
  } else {
    encoding = UTF_8;

代码示例来源:origin: teiid/teiid

public static Object serialize(XMLSerialize xs, XMLType value) throws TransformationException {
  Type type = value.getType();
  final Charset encoding;
  if (xs.getEncoding() != null) {
    encoding = Charset.forName(xs.getEncoding());					
  } else {
    encoding = UTF_8;

代码示例来源:origin: org.jboss.teiid/teiid-engine

if ((serialize.getVersion() != null && !serialize.getVersion().equals("1.0"))) { //$NON-NLS-1$
  serialize.setDeclaration(true);
} else if (serialize.getEncoding() != null) {
  Charset encoding = Charset.forName(serialize.getEncoding());
  if (!encoding.equals(Charset.forName("UTF-8")) && !encoding.equals(Charset.forName("UTF-16"))) { //$NON-NLS-1$ //$NON-NLS-2$
    serialize.setDeclaration(true);

代码示例来源:origin: org.teiid/teiid-engine

if ((serialize.getVersion() != null && !serialize.getVersion().equals("1.0"))) { //$NON-NLS-1$
  serialize.setDeclaration(true);
} else if (serialize.getEncoding() != null) {
  Charset encoding = Charset.forName(serialize.getEncoding());
  if (!encoding.equals(Charset.forName("UTF-8")) && !encoding.equals(Charset.forName("UTF-16"))) { //$NON-NLS-1$ //$NON-NLS-2$
    serialize.setDeclaration(true);

代码示例来源:origin: teiid/teiid

if ((serialize.getVersion() != null && !serialize.getVersion().equals("1.0"))) { //$NON-NLS-1$
  serialize.setDeclaration(true);
} else if (serialize.getEncoding() != null) {
  Charset encoding = Charset.forName(serialize.getEncoding());
  if (!encoding.equals(Charset.forName("UTF-8")) && !encoding.equals(Charset.forName("UTF-16"))) { //$NON-NLS-1$ //$NON-NLS-2$
    serialize.setDeclaration(true);

代码示例来源:origin: org.teiid/teiid-engine

append(obj.getTypeString());
if (obj.getEncoding() != null) {
  append(SPACE);
  append(NonReserved.ENCODING);
  append(SPACE);
  append(escapeSinglePart(obj.getEncoding()));

代码示例来源:origin: org.jboss.teiid/teiid-engine

append(obj.getTypeString());
if (obj.getEncoding() != null) {
  append(SPACE);
  append(NonReserved.ENCODING);
  append(SPACE);
  append(escapeSinglePart(obj.getEncoding()));

代码示例来源:origin: teiid/teiid

append(obj.getTypeString());
if (obj.getEncoding() != null) {
  append(SPACE);
  append(NonReserved.ENCODING);
  append(SPACE);
  append(escapeSinglePart(obj.getEncoding()));

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com