gpt4 book ai didi

javax.xml.xquery.XQItemType.getTypeName()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 20:39:40 24 4
gpt4 key购买 nike

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

XQItemType.getTypeName介绍

[英]Represents a type name (global or local). This can be used to represent specific type name such as, element foo of type hatsize. The schema type name is represented as a single QName. If the return type is an anonymous type, the actual QName value returned is implementation defined.
[中]表示类型名称(全局或本地)。这可以用来表示特定的类型名称,例如hatsize类型的元素foo。架构类型名称表示为一个QName。如果返回类型是匿名类型,则实际返回的QName值由实现定义。

代码示例

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

@Override
public XQItemType createDocumentSchemaElementType(XQItemType elementType) throws XQException {
  
  checkState(ex_connection_closed);
  return new BagriXQItemType(XQBASETYPE_ANYTYPE, XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT, elementType.getNodeName(), 
      elementType.getTypeName(), elementType.isElementNillable(), elementType.getSchemaURI());
}

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

@Override
public XQItemType createDocumentElementType(XQItemType elementType)	throws XQException {
  
  checkState(ex_connection_closed);
  if (elementType == null) {
    throw new XQException("provided elementType is null");
  } 
  if (elementType.getItemKind() !=  XQITEMKIND_ELEMENT) {
    throw new XQException("provided elementType has wrong kind: " + elementType);
  }
  return new BagriXQItemType(elementType.getBaseType(), XQITEMKIND_DOCUMENT_ELEMENT, elementType.getNodeName(), 
      elementType.getTypeName(), false, null); 
}

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

if (other.getTypeName() != null) {
  return false;
if (!typeName.equals(other.getTypeName())) {
  return false;

代码示例来源: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());
  }
}

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