org.apache.xmlbeans.SchemaTypeLoader.findAttributeRef()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(67)

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

SchemaTypeLoader.findAttributeRef介绍

[英]Used for on-demand loading.
[中]用于按需加载。

代码示例

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

public SchemaGlobalAttribute.Ref findAttributeRef(QName name)
{
  Object cached = _attributeCache.get(name);
  if (cached == CACHED_NOT_FOUND)
    return null;
  SchemaGlobalAttribute.Ref result = (SchemaGlobalAttribute.Ref) cached;
  if (result == null)
  {
    for (int i = 0; i < _searchPath.length; i++)
      if (null != (result = _searchPath[i].findAttributeRef(name)))
        break;
    if (result == null)
    {
      SchemaTypeSystem ts = typeSystemForComponent("schema" + METADATA_PACKAGE_LOAD + "/attribute/", name);
      if (ts != null)
      {
        result = ts.findAttributeRef(name);
        assert(result != null) : "Type system registered attribute " + QNameHelper.pretty(name) + " but does not return it";
      }
    }
    _attributeCache.put(name, result == null ? CACHED_NOT_FOUND : result);
  }
  return result;
}

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

return _linker.findElementRef(QNameHelper.forPretty(handle, 4));
case 'A': // _XA_ - external attribute
  return _linker.findAttributeRef(QNameHelper.forPretty(handle, 4));
case 'M': // _XM_ - external model group
  return _linker.findModelGroupRef(QNameHelper.forPretty(handle, 4));

代码示例来源:origin: com.github.pjfanning/xmlbeans

public SchemaGlobalAttribute.Ref findAttributeRef(QName name)
{
  Object cached = _attributeCache.get(name);
  if (cached == CACHED_NOT_FOUND)
    return null;
  SchemaGlobalAttribute.Ref result = (SchemaGlobalAttribute.Ref) cached;
  if (result == null)
  {
    for (int i = 0; i < _searchPath.length; i++)
      if (null != (result = _searchPath[i].findAttributeRef(name)))
        break;
    if (result == null)
    {
      SchemaTypeSystem ts = typeSystemForComponent("schema" + METADATA_PACKAGE_LOAD + "/attribute/", name);
      if (ts != null)
      {
        result = ts.findAttributeRef(name);
        assert(result != null) : "Type system registered attribute " + QNameHelper.pretty(name) + " but does not return it";
      }
    }
    _attributeCache.put(name, result == null ? CACHED_NOT_FOUND : result);
  }
  return result;
}

代码示例来源:origin: org.apache.xmlbeans/com.springsource.org.apache.xmlbeans

public SchemaGlobalAttribute.Ref findAttributeRef(QName name)
{
  Object cached = _attributeCache.get(name);
  if (cached == CACHED_NOT_FOUND)
    return null;
  SchemaGlobalAttribute.Ref result = (SchemaGlobalAttribute.Ref) cached;
  if (result == null)
  {
    for (int i = 0; i < _searchPath.length; i++)
      if (null != (result = _searchPath[i].findAttributeRef(name)))
        break;
    if (result == null)
    {
      SchemaTypeSystem ts = typeSystemForComponent("schema" + METADATA_PACKAGE_LOAD + "/attribute/", name);
      if (ts != null)
      {
        result = ts.findAttributeRef(name);
        assert(result != null) : "Type system registered attribute " + QNameHelper.pretty(name) + " but does not return it";
      }
    }
    _attributeCache.put(name, result == null ? CACHED_NOT_FOUND : result);
  }
  return result;
}

代码示例来源:origin: org.apache.xmlbeans/com.springsource.org.apache.xmlbeans

return _linker.findElementRef(QNameHelper.forPretty(handle, 4));
case 'A': // _XA_ - external attribute
  return _linker.findAttributeRef(QNameHelper.forPretty(handle, 4));
case 'M': // _XM_ - external model group
  return _linker.findModelGroupRef(QNameHelper.forPretty(handle, 4));

代码示例来源:origin: com.github.pjfanning/xmlbeans

return _linker.findElementRef(QNameHelper.forPretty(handle, 4));
case 'A': // _XA_ - external attribute
  return _linker.findAttributeRef(QNameHelper.forPretty(handle, 4));
case 'M': // _XM_ - external model group
  return _linker.findModelGroupRef(QNameHelper.forPretty(handle, 4));

相关文章

微信公众号

最新文章

更多