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