本文整理汇总了Java中org.apache.xerces.xs.XSConstants.POSITIVEINTEGER_DT属性的典型用法代码示例。如果您正苦于以下问题:Java XSConstants.POSITIVEINTEGER_DT属性的具体用法?Java XSConstants.POSITIVEINTEGER_DT怎么用?Java XSConstants.POSITIVEINTEGER_DT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.xerces.xs.XSConstants
的用法示例。
在下文中一共展示了XSConstants.POSITIVEINTEGER_DT属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: convertToPrimitiveKind
private short convertToPrimitiveKind(short valueType) {
/** Primitive datatypes. */
if (valueType <= XSConstants.NOTATION_DT) {
return valueType;
}
/** Types derived from string. */
if (valueType <= XSConstants.ENTITY_DT) {
return XSConstants.STRING_DT;
}
/** Types derived from decimal. */
if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
return XSConstants.DECIMAL_DT;
}
/** Other types. */
return valueType;
}
示例2: convertToPrimitiveKind
/**
* Returns the primitive type of the given type.
* @param valueType A value type as defined in XSConstants.
* @return The primitive type from which valueType was derived.
*/
private static short convertToPrimitiveKind(short valueType) {
/** Primitive datatypes. */
if (valueType <= XSConstants.NOTATION_DT) {
return valueType;
}
/** Types derived from string. */
if (valueType <= XSConstants.ENTITY_DT) {
return XSConstants.STRING_DT;
}
/** Types derived from decimal. */
if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
return XSConstants.DECIMAL_DT;
}
/** Other types. */
return valueType;
}
示例3: getLeafType
private String getLeafType(int value){
switch(value){
case XSConstants.BOOLEAN_DT:
return Types.BOOLEAN;
case XSConstants.STRING_DT:
return Types.STRING;
case XSConstants.BYTE_DT:
case XSConstants.SHORT_DT:
case XSConstants.INTEGER_DT:
case XSConstants.INT_DT:
case XSConstants.POSITIVEINTEGER_DT:
case XSConstants.NEGATIVEINTEGER_DT:
case XSConstants.NONPOSITIVEINTEGER_DT:
case XSConstants.NONNEGATIVEINTEGER_DT:
return Types.INTEGER;
case XSConstants.LONG_DT:
return Types.LONG;
case XSConstants.DECIMAL_DT:
case XSConstants.FLOAT_DT:
case XSConstants.DOUBLE_DT:
return Types.DOUBLE;
case XSConstants.DATE_DT:
return Types.DATE;
case XSConstants.TIME_DT:
case XSConstants.DATETIME_DT:
return Types.DATETIME;
default:
return Types.STRING;
}
}