@Override public Serializable parseFromXML(String value) { return parseDecimal(value); }
public BigDecimal unmarshal(String value) { return (javax.xml.bind.DatatypeConverter.parseDecimal(value)); }
public BigDecimal unmarshal(String value) { return (javax.xml.bind.DatatypeConverter.parseDecimal(value)); }
/** * Read a {@link BigDecimal} value from XML * with maximal 8 digits and 2 decimal places. * * @param value XML string * @return parsed value or null, if the value is invalid */ public static BigDecimal parseDecimal8_2(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseDecimal(value) : null; }
/** * Read a {@link BigDecimal} value from XML * with a valid longitude range. * * @param value XML string * @return parsed value or null, if the value is invalid */ public static BigDecimal parseLongitude(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseDecimal(value) : null; }
/** * Read a {@link BigDecimal} value from XML * with maximal 13 digits and 2 decimal places. * * @param value XML string * @return parsed value or null, if the value is invalid */ public static BigDecimal parseDecimal13_2(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseDecimal(value) : null; }
/** * Read a {@link BigDecimal} value from XML * with a valid latitude range. * * @param value XML string * @return parsed value or null, if the value is invalid */ public static BigDecimal parseLatitude(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseDecimal(value) : null; }
/** * Read a {@link BigDecimal} value from XML, * that matches the type of the "thermalCharacteristic" element. * * @param value XML string * @return parsed value or null, if the value is invalid */ public static BigDecimal parseThermalCharacteristic(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseDecimal(value) : null; }
public static BigDecimal parseDouble(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseDecimal(value) : null; }
/** * Read a positive {@link BigDecimal} value from XML * with maximal 3 decimal places. * * @param value XML string * @return parsed value or null, if the value is invalid */ public static BigDecimal parseDecimalPositive(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseDecimal(value) : null; }
/** * Read a {@link BigDecimal} value from XML, * that matches the 'PriceMultiplierType' simple type. * * @param value XML string * @return parsed value or null, if the value is invalid */ public static BigDecimal parsePriceMultiplier(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseDecimal(value) : null; }
/** * Read a {@link BigDecimal} value from XML, * that matches the 'NumberOfRoomsType' simple type. * * @param value XML string * @return parsed value or null, if the value is invalid */ public static BigDecimal parseRoomNr(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseDecimal(value) : null; }
/** * Read a {@link BigDecimal} value from XML, * that matches the type of the 'numberOfRooms' element in "BaseHouse". * * @param value XML string * @return parsed value or null, if the value is invalid */ public static BigDecimal parseRoomNrForBaseHouse(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseDecimal(value) : null; }
public static BigDecimal parseZahl62(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseDecimal(value) : null; }
public static BigDecimal parseZahl152(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseDecimal(value) : null; }
static public BigDecimal StringToBigDecimal(String value) { try { return (value == null || value.length() == 0) ? null : DatatypeConverter.parseDecimal(value); } catch(Exception e) { throw new IllegalArgumentException("Could not convert to BigDecimal: "+value, e); } } static public Stream<BigDecimal> StringToBigDecimal(Stream<? extends String> values) {
public Number getValue(ATermAppl literal) throws InvalidLiteralException { if( !ATermUtils.isLiteral( literal ) ) throw new IllegalArgumentException(); if( !literal.getArgument( ATermUtils.LIT_URI_INDEX ).equals( name ) ) throw new IllegalArgumentException(); final String lexicalForm = ATermUtils.getLiteralValue( literal ); try { return OWLRealUtils.getCanonicalObject( DatatypeConverter.parseDecimal( lexicalForm ) ); } catch( NumberFormatException e ) { throw new InvalidLiteralException( name, lexicalForm ); } }
public Number getValue(ATermAppl literal) throws InvalidLiteralException { if( !ATermUtils.isLiteral( literal ) ) throw new IllegalArgumentException(); if( !literal.getArgument( ATermUtils.LIT_URI_INDEX ).equals( name ) ) throw new IllegalArgumentException(); final String lexicalForm = ATermUtils.getLiteralValue( literal ); try { return OWLRealUtils.getCanonicalObject( DatatypeConverter.parseDecimal( lexicalForm ) ); } catch( NumberFormatException e ) { throw new InvalidLiteralException( name, lexicalForm ); } }
public Number getValue(ATermAppl literal) throws InvalidLiteralException { final String lexicalForm = getLexicalForm( literal ); try { return OWLRealUtils.getCanonicalObject( DatatypeConverter.parseDecimal( lexicalForm ) ); } catch( NumberFormatException e ) { throw new InvalidLiteralException( getName(), lexicalForm ); } }
public Number getValue(ATermAppl literal) throws InvalidLiteralException { final String lexicalForm = getLexicalForm( literal ); try { return OWLRealUtils.getCanonicalObject( DatatypeConverter.parseDecimal( lexicalForm ) ); } catch( NumberFormatException e ) { throw new InvalidLiteralException( getName(), lexicalForm ); } }