gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-27 00:19:05 26 4
gpt4 key购买 nike

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

XQUtils.getTypeName介绍

[英]converts XQJ baseType to the corresponding QName. Return null if the provided type does not correspond to any XQJ type constant.
[中]将XQJ baseType转换为相应的QName。如果提供的类型不对应于任何XQJ类型常量,则返回null。

代码示例

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

@Override
public XQItemType createAtomicType(int baseType) throws XQException {
  return createAtomicType(baseType, getTypeName(baseType), null);
}

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

@Override
public XQItemType createAttributeType(QName nodeName, int baseType)	throws XQException {
  
  return createAttributeType(nodeName, baseType, getTypeName(baseType), null);
}

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

@Override
public XQItemType createElementType(QName nodeName, int baseType) throws XQException {
  
  return createElementType(nodeName, baseType, getTypeName(baseType), null, false);
}

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

@Override
public XQItemType createProcessingInstructionType(String piTarget) throws XQException {
  
  checkState(ex_connection_closed);
  QName nodeName = null;
  if (piTarget != null) {
    nodeName = new QName(piTarget);
  }
  return new BagriXQItemType(XQBASETYPE_ANYTYPE, XQITEMKIND_PI, nodeName, getTypeName(XQBASETYPE_UNTYPED), false, null);
}

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

@Override
public XQItemType createSchemaElementType(QName nodeName, int baseType, URI schemaURI) throws XQException {
  
  checkState(ex_connection_closed);
  return new BagriXQItemType(baseType, XQITEMKIND_SCHEMA_ELEMENT, nodeName, getTypeName(XQBASETYPE_UNTYPED), false, schemaURI);
}

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

@Override
public XQItemType createItemType() throws XQException {
  checkState(ex_connection_closed);
  return new BagriXQItemType(XQBASETYPE_ANYTYPE, XQITEMKIND_ITEM, null, getTypeName(XQBASETYPE_ANYTYPE), false, null);
}

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

@Override
public XQItemType createTextType() throws XQException {
  checkState(ex_connection_closed);
  return new BagriXQItemType(XQBASETYPE_UNTYPED, XQITEMKIND_TEXT, null, getTypeName(XQBASETYPE_UNTYPED), false, null);
}

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

@Override
public XQItemType createCommentType() throws XQException {
  
  checkState(ex_connection_closed);
  return new BagriXQItemType(XQBASETYPE_UNTYPED, XQITEMKIND_COMMENT, null, getTypeName(XQBASETYPE_UNTYPED), false, null);
}

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

@Override
public XQItemType createNodeType() throws XQException {
  
  checkState(ex_connection_closed);
  return new BagriXQItemType(XQBASETYPE_ANYTYPE, XQITEMKIND_NODE, null, getTypeName(XQBASETYPE_UNTYPED), false, null);
}

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

@Override
public XQItemType createSchemaAttributeType(QName nodeName, int baseType, URI schemaURI) throws XQException {
  
  checkState(ex_connection_closed);
  return new BagriXQItemType(baseType, XQITEMKIND_SCHEMA_ATTRIBUTE, nodeName, getTypeName(XQBASETYPE_ANYTYPE), false, schemaURI);
}

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

/**
 * constructs XQJ item type for the {@code value} specified
 * 
 * @param factory the XQJ data factory to produce XQ item type
 * @param value the value to get item type from
 * @return XQ item type 
 * @throws XQException in case of construction error
 */
public static XQItemType getTypeForObject(XQDataFactory factory, Object value) throws XQException {
  
  if (value instanceof org.w3c.dom.Node) {
    return getTypeForNode(factory, (org.w3c.dom.Node) value);
  }
  
  int baseType = getBaseTypeForObject(value);
  return factory.createAtomicType(baseType, getTypeName(baseType), null);
}

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

return new BagriXQItem(xqProcessor, new BagriXQItemType(XQBASETYPE_SHORT, XQITEMKIND_ATOMIC, null, getTypeName(XQBASETYPE_SHORT), false, null), value);

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

@ManagedOperation(description="Return all unique paths for the document type provided")
@ManagedOperationParameters({
  @ManagedOperationParameter(name = "root", description = "A document type root")})
public String[] getPathsForRoot(String root) {
  IMap<String, Path> xpCache = hzClient.getMap(CN_XDM_PATH_DICT);
  Collection<Path> paths = xpCache.values(Predicates.equal("root", root)); 
  logger.debug("getPathsForRoot; got paths {} for root {}", paths, root);
  String[] result = new String[paths.size()];
  int idx = 0;
  for (Path path: paths) {
    result[idx++] = "" + path.getPathId() + ": " + path.getPath() + 
        " (" + path.getNodeKind() + ":" + getTypeName(path.getDataType()) + ")";
  }
  return result;
}

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

return new BagriXQItem(xqProcessor, new BagriXQItemType(XQBASETYPE_BYTE, XQITEMKIND_ATOMIC, null, getTypeName(XQBASETYPE_BYTE), false, null), value);

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

return new BagriXQItem(xqProcessor, new BagriXQItemType(XQBASETYPE_INT, XQITEMKIND_ATOMIC, null, getTypeName(XQBASETYPE_INT), false, null), value);

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

return new BagriXQItem(xqProcessor, new BagriXQItemType(XQBASETYPE_LONG, XQITEMKIND_ATOMIC, null, getTypeName(XQBASETYPE_LONG), false, null), value);

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

@Override
public XQItem createItemFromBoolean(boolean value, XQItemType type) throws XQException {
  checkState(ex_connection_closed);
  if (type == null || type.getBaseType() == XQBASETYPE_BOOLEAN) {
    return new BagriXQItem(xqProcessor, new BagriXQItemType(XQBASETYPE_BOOLEAN, XQITEMKIND_ATOMIC, null, getTypeName(XQBASETYPE_BOOLEAN), false, null), value);
  } 
  throw new XQException("wrong boolean type: " + type + "(" + type.getBaseType() + ")");
}

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

@Override
public XQItem createItemFromDouble(double value, XQItemType type) throws XQException {
  checkState(ex_connection_closed);
  if (type == null || type.getBaseType() == XQBASETYPE_DOUBLE) {
    return new BagriXQItem(xqProcessor, new BagriXQItemType(XQBASETYPE_DOUBLE, XQITEMKIND_ATOMIC, null, getTypeName(XQBASETYPE_DOUBLE), false, null), value);
  } 
  throw new XQException("wrong double type: " + type + "(" + type.getBaseType() + ")");
}

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

@Override
public XQItem createItemFromFloat(float value, XQItemType type)	throws XQException {
  checkState(ex_connection_closed);
  if (type == null || type.getBaseType() == XQBASETYPE_FLOAT) {
    return new BagriXQItem(xqProcessor, new BagriXQItemType(XQBASETYPE_FLOAT, XQITEMKIND_ATOMIC, null, getTypeName(XQBASETYPE_FLOAT), false, null), value);
  } 
  throw new XQException("wrong float type: " + type + "(" + type.getBaseType() + ")");
}

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