本文整理了Java中com.bagri.support.util.XQUtils.isBaseTypeSupported()
方法的一些代码示例,展示了XQUtils.isBaseTypeSupported()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XQUtils.isBaseTypeSupported()
方法的具体详情如下:
包路径:com.bagri.support.util.XQUtils
类名称:XQUtils
方法名:isBaseTypeSupported
[英]checks if XQJ base type feature is supported by the data kind provided
[中]检查所提供的数据类型是否支持XQJ基本类型功能
代码示例来源:origin: dsukhoroslov/bagri
@Override
public int getBaseType() throws XQException {
if (XQUtils.isBaseTypeSupported(kind)) {
return baseType;
}
throw new XQException("getBaseType is not supported for this item kind: " + kind);
}
代码示例来源:origin: dsukhoroslov/bagri
@Override
public QName getTypeName() throws XQException {
if (XQUtils.isBaseTypeSupported(kind)) {
return typeName;
}
throw new XQException("getTypeName is not supported for this item kind: " + kind);
}
代码示例来源:origin: dsukhoroslov/bagri
public static BuiltInAtomicType getAtomicType(XQItemType type) throws XQException {
if (XQUtils.isBaseTypeSupported(kind)) {
switch (type.getBaseType()) {
case XQBASETYPE_ANYATOMICTYPE: return BuiltInAtomicType.ANY_ATOMIC;
代码示例来源: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
if (XQUtils.isBaseTypeSupported(kind)) {
if (this.getBaseType() != other.getBaseType()) {
return false;
if (XQUtils.isBaseTypeSupported(kind)) {
if (typeName == null) {
if (other.getTypeName() != null) {
代码示例来源: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
int baseType = 0;
QName typeName = null;
if (isBaseTypeSupported(kind)) {
baseType = in.readInt();
代码示例来源:origin: dsukhoroslov/bagri
logger.trace("write; got type: {}", type);
if (XQUtils.isBaseTypeSupported(type.getItemKind())) {
int bType = type.getBaseType();
if (XQUtils.isAtomicType(bType)) {
内容来源于网络,如有侵权,请联系作者删除!