本文整理汇总了Java中org.apache.xerces.xs.XSConstants.DOUBLE_DT属性的典型用法代码示例。如果您正苦于以下问题:Java XSConstants.DOUBLE_DT属性的具体用法?Java XSConstants.DOUBLE_DT怎么用?Java XSConstants.DOUBLE_DT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.xerces.xs.XSConstants
的用法示例。
在下文中一共展示了XSConstants.DOUBLE_DT属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNumericType
public static RDFDatatype getNumericType(RDFDatatype lhs, RDFDatatype rhs)
{
int lhsType = getNumericType(lhs);
int rhsType = getNumericType(rhs);
if (lhsType == XSConstants.INTEGER_DT) {
if (rhsType == XSConstants.INTEGER_DT)
return XSDDatatype.XSDinteger;
if (rhsType == XSConstants.DECIMAL_DT)
return XSDDatatype.XSDdecimal;
if (rhsType == XSConstants.FLOAT_DT)
return XSDDatatype.XSDfloat;
return XSDDatatype.XSDdouble;
} else if (lhsType == XSConstants.DECIMAL_DT) {
if (rhsType == XSConstants.INTEGER_DT || rhsType == XSConstants.DECIMAL_DT)
return XSDDatatype.XSDdecimal;
if (rhsType == XSConstants.FLOAT_DT)
return XSDDatatype.XSDfloat;
return XSDDatatype.XSDdouble;
} else if (lhsType == XSConstants.FLOAT_DT) {
if (rhsType == XSConstants.INTEGER_DT || rhsType == XSConstants.DECIMAL_DT || rhsType == XSConstants.FLOAT_DT)
return XSDDatatype.XSDfloat;
return XSDDatatype.XSDdouble;
} else if (lhsType == XSConstants.DOUBLE_DT) {
return XSDDatatype.XSDdouble;
}
throw new IllegalArgumentException();
}
示例2: 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;
}
}
示例3: endElement
public void endElement(String uri, String localName, String qName) throws SAXException {
ElementPSVI psvi = provider.getElementPSVI();
if(psvi != null) {
//If there was an element content
Object value = psvi.getActualNormalizedValue();
short type = psvi.getActualNormalizedValueType();
if(value != null) {
switch(type) {
case XSConstants.INTEGER_DT:
case XSConstants.DECIMAL_DT:
case XSConstants.INT_DT:
case XSConstants.LONG_DT:
case XSConstants.SHORT_DT:
case XSConstants.BYTE_DT:
case XSConstants.UNSIGNEDBYTE_DT:
case XSConstants.UNSIGNEDINT_DT:
case XSConstants.UNSIGNEDLONG_DT:
case XSConstants.UNSIGNEDSHORT_DT:
XSDecimal decimal = (XSDecimal)value;
System.out.println(decimal.getInt());
break;
case XSConstants.DATE_DT:
case XSConstants.DATETIME_DT:
case XSConstants.GDAY_DT:
case XSConstants.GMONTH_DT:
case XSConstants.GMONTHDAY_DT:
case XSConstants.GYEAR_DT:
case XSConstants.GYEARMONTH_DT:
case XSConstants.DURATION_DT:
case XSConstants.TIME_DT:
XSDateTime dt = (XSDateTime)value;
System.out.println(dt.getDays());
break;
case XSConstants.FLOAT_DT:
XSFloat f = (XSFloat)value;
System.out.println(f.getValue());
break;
case XSConstants.DOUBLE_DT:
XSDouble d = (XSDouble)value;
System.out.println(d.getValue());
break;
case XSConstants.HEXBINARY_DT:
case XSConstants.BASE64BINARY_DT:
ByteList list = (ByteList)value;
System.out.println(list.getLength());
break;
case XSConstants.LIST_DT:
case XSConstants.LISTOFUNION_DT:
ObjectList l = (ObjectList)value;
System.out.println(l.getLength());
break;
case XSConstants.QNAME_DT:
XSQName qname = (XSQName)value;
System.out.println(qname.getXNIQName());
break;
default:
System.out.println("error!!!");
}
}
}
super.endElement(uri, localName, qName);
}