public byte byteValue() { return lit.byteValue(); }
/** * Gets the byte value of the supplied literal. The fallback value is * returned in case {@link Literal#byteValue()} throws a * {@link NumberFormatException}. * * @param l * The literal to get the byte value for. * @param fallback * The value to fall back to in case no byte value could gotten from * the literal. * @return Either the literal's byte value, or the fallback value. */ public static byte getByteValue(Literal l, byte fallback) { try { return l.byteValue(); } catch (NumberFormatException e) { return fallback; } }
/** * Gets the byte value of the supplied literal. The fallback value is * returned in case {@link Literal#byteValue()} throws a * {@link NumberFormatException}. * * @param l * The literal to get the byte value for. * @param fallback * The value to fall back to in case no byte value could gotten from * the literal. * @return Either the literal's byte value, or the fallback value. */ public static byte getByteValue(Literal l, byte fallback) { try { return l.byteValue(); } catch (NumberFormatException e) { return fallback; } }
public Byte deserialize(Literal literal) { return Byte.valueOf(literal.byteValue()); }
public Byte deserialize(Literal literal) { return Byte.valueOf(literal.byteValue()); }
public Byte deserialize(Literal literal) { return Byte.valueOf(literal.byteValue()); }
/** * Implements {@link Literal#byteValue()}. */ @Override public byte byteValue() { if (!isLiteral()) throw new ClassCastException(); return ((Literal) getValue()).byteValue(); }
/** * Implements {@link Literal#byteValue()}. */ @Override public byte byteValue() { if (!isLiteral()) throw new ClassCastException(); return ((Literal) getValue()).byteValue(); }
return literal.shortValue(); } else if (dataType.equals(NamespacePrefixMapper.XSD_NS + "byte")) { return literal.byteValue(); } else if (dataType.equals(NamespacePrefixMapper.XSD_NS + "decimal")) { return literal.decimalValue();
return literal.shortValue(); } else if (dataType.equals(NamespacePrefixMapper.XSD_NS + "byte")) { return literal.byteValue(); } else if (dataType.equals(NamespacePrefixMapper.XSD_NS + "decimal")) { return literal.decimalValue();
return l.floatValue(); } else if (XMLSchema.BYTE.equals(datatype)) { return l.byteValue(); } else if (XMLSchema.DATETIME.equals(datatype)) { return l.calendarValue();
return l.shortValue(); } else if (datatype.equals(XSD.BYTE)) { return l.byteValue(); } else { return l.getLabel();
return literal.calendarValue().toGregorianCalendar().getTime(); } else if(XMLSchema.BYTE.equals(dataType)){ return literal.byteValue(); } else if(XMLSchema.SHORT.equals(dataType)){ return literal.shortValue();
return literal.calendarValue().toGregorianCalendar().getTime(); } else if(XMLSchema.BYTE.equals(dataType)){ return literal.byteValue(); } else if(XMLSchema.SHORT.equals(dataType)){ return literal.shortValue();