protected void set_text(String s) { if (_validateOnSet()) validateLexical(s, _voorVc); try { set_BigDecimal(new BigDecimal(s)); } catch (NumberFormatException e) { _voorVc.invalid(XmlErrorCodes.DECIMAL, new Object[] { s }); } } protected void set_nil()
public BigDecimal getBigDecimalValue() { check_dated(); return _value; }
/** * Note, this is carefully aligned with hash codes for all xsd:decimal * primitives. */ protected int value_hash_code() { if (_value.scale() > 0) { if (_value.setScale(0, BigDecimal.ROUND_DOWN).compareTo(_value) != 0) return decimalHashCode(); } BigInteger intval = _value.toBigInteger(); if (intval.compareTo(_maxlong) > 0 || intval.compareTo(_minlong) < 0) return intval.hashCode(); long longval = intval.longValue(); return (int)((longval >> 32) * 19 + longval); }
public static void validateLexical(String v, SchemaType sType, ValidationContext context) { JavaDecimalHolder.validateLexical(v, context); // check pattern if (sType.hasPatternFacet()) { if (!sType.matchPatternFacet(v)) { context.invalid(XmlErrorCodes.DATATYPE_VALID$PATTERN_VALID, new Object[] { "int", v, QNameHelper.readable(sType) }); } } }
protected void set_BigDecimal(BigDecimal v) { if (_validateOnSet()) validateValue(v, _schemaType, _voorVc); super.set_BigDecimal(v); }
public static void validateLexical(String v, SchemaType sType, ValidationContext context) { JavaDecimalHolder.validateLexical(v, context); // check pattern if (sType.hasPatternFacet()) { if (!sType.matchPatternFacet(v)) { // TODO - describe string and pattern here in error context.invalid(XmlErrorCodes.DATATYPE_VALID$PATTERN_VALID, new Object[] { "decimal", v, QNameHelper.readable(sType) }); } } }
protected void set_text(String s) { if (_validateOnSet()) validateLexical(s, _schemaType, _voorVc); BigDecimal v = null; try { v = new BigDecimal(s); } catch (NumberFormatException e) { _voorVc.invalid(XmlErrorCodes.DECIMAL, new Object[] { s }); } if (_validateOnSet()) validateValue(v, _schemaType, _voorVc); super.set_BigDecimal(v); }
protected void set_text(String s) { if (_validateOnSet()) validateLexical(s, _voorVc); try { set_BigDecimal(new BigDecimal(s)); } catch (NumberFormatException e) { _voorVc.invalid(XmlErrorCodes.DECIMAL, new Object[] { s }); } } protected void set_nil()
public static void validateLexical(String v, SchemaType sType, ValidationContext context) { JavaDecimalHolder.validateLexical(v, context); if ( v.lastIndexOf('.')>=0 ) context.invalid(XmlErrorCodes.INTEGER, new Object[] { v }); // check pattern if (sType.hasPatternFacet()) { if (!sType.matchPatternFacet(v)) { context.invalid(XmlErrorCodes.DATATYPE_VALID$PATTERN_VALID, new Object[] { "integer", v, QNameHelper.readable(sType) }); } } }
protected void set_BigDecimal(BigDecimal v) { if (_validateOnSet()) validateValue(v, _schemaType, _voorVc); super.set_BigDecimal(v); }
public BigDecimal getBigDecimalValue() { check_dated(); return _value; }
/** * Note, this is carefully aligned with hash codes for all xsd:decimal * primitives. */ protected int value_hash_code() { if (_value.scale() > 0) { if (_value.setScale(0, BigDecimal.ROUND_DOWN).compareTo(_value) != 0) return decimalHashCode(); } BigInteger intval = _value.toBigInteger(); if (intval.compareTo(_maxlong) > 0 || intval.compareTo(_minlong) < 0) return intval.hashCode(); long longval = intval.longValue(); return (int)((longval >> 32) * 19 + longval); }
protected void set_text(String s) { if (_validateOnSet()) validateLexical(s, _voorVc); try { set_BigDecimal(new BigDecimal(s)); } catch (NumberFormatException e) { _voorVc.invalid(XmlErrorCodes.DECIMAL, new Object[] { s }); } } protected void set_nil()
public static void validateLexical(String v, SchemaType sType, ValidationContext context) { JavaDecimalHolder.validateLexical(v, context); // check pattern if (sType.hasPatternFacet()) { if (!sType.matchPatternFacet(v)) { context.invalid(XmlErrorCodes.DATATYPE_VALID$PATTERN_VALID, new Object[] { "long", v, QNameHelper.readable(sType) }); } } }
protected void set_BigDecimal(BigDecimal v) { if (_validateOnSet()) validateValue(v, _schemaType, _voorVc); super.set_BigDecimal(v); }
public BigDecimal getBigDecimalValue() { check_dated(); return _value; }
/** * Note, this is carefully aligned with hash codes for all xsd:decimal * primitives. */ protected int value_hash_code() { if (_value.scale() > 0) { if (_value.setScale(0, BigDecimal.ROUND_DOWN).compareTo(_value) != 0) return decimalHashCode(); } BigInteger intval = _value.toBigInteger(); if (intval.compareTo(_maxlong) > 0 || intval.compareTo(_minlong) < 0) return intval.hashCode(); long longval = intval.longValue(); return (int)((longval >> 32) * 19 + longval); }
public static void validateLexical(String v, SchemaType sType, ValidationContext context) { JavaDecimalHolder.validateLexical(v, context); // check pattern if (sType.hasPatternFacet()) { if (!sType.matchPatternFacet(v)) { context.invalid(XmlErrorCodes.DATATYPE_VALID$PATTERN_VALID, new Object[] { "long", v, QNameHelper.readable(sType) }); } } }
protected void set_text(String s) { if (_validateOnSet()) validateLexical(s, _schemaType, _voorVc); BigDecimal v = null; try { v = new BigDecimal(s); } catch (NumberFormatException e) { _voorVc.invalid(XmlErrorCodes.DECIMAL, new Object[] { s }); } if (_validateOnSet()) validateValue(v, _schemaType, _voorVc); super.set_BigDecimal(v); }
public static void validateLexical(String v, SchemaType sType, ValidationContext context) { JavaDecimalHolder.validateLexical(v, context); // check pattern if (sType.hasPatternFacet()) { if (!sType.matchPatternFacet(v)) { context.invalid(XmlErrorCodes.DATATYPE_VALID$PATTERN_VALID, new Object[] { "int", v, QNameHelper.readable(sType) }); } } }