gpt4 book ai didi

com.bagri.support.util.XQUtils.isNodeNameSupported()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 23:33:05 25 4
gpt4 key购买 nike

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

XQUtils.isNodeNameSupported介绍

[英]checks if the node name feature is supported by the data kind provided
[中]检查所提供的数据类型是否支持节点名功能

代码示例

代码示例来源:origin: dsukhoroslov/bagri

@Override
public QName getNodeName() throws XQException {
  
  if (XQUtils.isNodeNameSupported(kind)) {
    
    if (nodeName != null && "*".equals(nodeName.getLocalPart())) { 
      return null;  // a wildcard..
    }
    return nodeName;
  }
  throw new XQException("getNodeName is not supported for this item kind: " + kind);
}

代码示例来源:origin: dsukhoroslov/bagri

@Override
public int hashCode() {
  
  int hashCode = this.getItemKind();
  if (this.getSchemaURI() != null) {
    hashCode = 31*hashCode + this.getSchemaURI().hashCode();
  }
  if (XQUtils.isBaseTypeSupported(kind)) {
    hashCode = 31*hashCode + baseType;
  }
  if (XQUtils.isNodeNameSupported(kind) && nodeName != null) {
    hashCode = 31*hashCode + nodeName.hashCode();
  }
  if (XQUtils.isBaseTypeSupported(kind)) {
    hashCode = 31*hashCode + typeName.hashCode();
  }
  try {
    if (XQUtils.isPINameSupported(kind) && this.getPIName () != null) { 
      hashCode = 31*hashCode + this.getPIName().hashCode();
    }
  } catch (XQException ex) {
    // can't be this, actually...
  }
  return hashCode;
}

代码示例来源:origin: dsukhoroslov/bagri

@Override
public void write(ObjectDataOutput out, XQItemType type) throws IOException {
  try {
    int kind = type.getItemKind();
    out.writeInt(kind);
    if (isBaseTypeSupported(kind)) {
      out.writeInt(type.getBaseType());
      //out.writeObject(type.getTypeName());
      writeQName(out, type.getTypeName());
    }
    if (isNodeNameSupported(kind)) { // || isPINameSupported(kind)) {
      //out.writeObject(type.getNodeName()); // can be issues with wildcards
      writeQName(out, type.getNodeName());
    }
    if (type.getSchemaURI() == null) {
      out.writeBoolean(false);
    } else {
      out.writeBoolean(true);
      out.writeUTF(type.getSchemaURI().toString());
    }
    out.writeBoolean(type.isElementNillable());
  } catch (XQException ex) {
    throw new IOException(ex);
  }
}

代码示例来源:origin: dsukhoroslov/bagri

@Override
public void setContextItemStaticType(XQItemType contextItemType) throws XQException {
  
  if (contextItemType == null) {
    this.type = null;
  } else {
    QName typeName = null;
    if (XQUtils.isBaseTypeSupported(contextItemType.getItemKind())) {
      typeName = contextItemType.getTypeName();
    } else {
      // ???
    }
    QName nodeName = null;
    if (XQUtils.isNodeNameSupported(contextItemType.getItemKind())) {
      nodeName = contextItemType.getNodeName();
    }
    this.type = new BagriXQItemType(contextItemType.getBaseType(), contextItemType.getItemKind(),
        nodeName, typeName, contextItemType.isElementNillable(), contextItemType.getSchemaURI());
  }
}

代码示例来源:origin: dsukhoroslov/bagri

if (XQUtils.isNodeNameSupported(kind)) {
  if (nodeName == null) {
    if (other.getNodeName() != null) {

代码示例来源:origin: dsukhoroslov/bagri

if (isNodeNameSupported(kind)) { // || isPINameSupported(kind)) {

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