gpt4 book ai didi

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

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

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

XQItemType.getSchemaURI介绍

[英]Returns the schema location URI of the schema that contains the item's element or type definition. This method is implementation-definied and an implementation will return a null value if it does not support retrieving the schema location URI. If the item corresponds to a validated global element in a schema, the result will be the schema location URI to the XMLSchema containing the element definition. Otherwise if the item is a schema validated node, the result will be the schema location URI of the XMLSchema containing the type definition of that node. If the item is not schema validated, the result is null
[中]返回包含项的元素或类型定义的架构的架构位置URI。此方法由实现定义,如果实现不支持检索架构位置URI,它将返回null值。如果该项对应于模式中已验证的全局元素,则结果将是包含元素定义的XMLSchema的模式位置URI。否则,如果该项是经过模式验证的节点,则结果将是包含该节点类型定义的XMLSchema的模式位置URI。如果项目未经过架构验证,则结果为null

代码示例

代码示例来源: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 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

if (other.getSchemaURI() != null) {
  return false;
if (!schemaURI.equals(other.getSchemaURI())) {
  return false;

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

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