68697071727374757677
case Type.STRING : return new StringValue(getStringValue()); case Type.UNTYPED_ATOMIC : return new UntypedAtomicValue(getStringValue()); default : throw new XPathException( "Type error: cannot cast xs:time to " + Type.getTypeName(requiredType)); } }
8889909192939495
protected QName getXMLSchemaType() { return DatatypeConstants.GYEAR; } public ComputableValue minus(ComputableValue other) throws XPathException { throw new XPathException("Subtraction is not supported on values of type " + Type.getTypeName(getType())); }
9192939495969798
baos.close(); return BinaryValueFromInputStream.getInstance(context, new Base64BinaryValueType(), new ByteArrayInputStream(baos.toByteArray())); } catch(IOException ioe) { throw new XPathException(this, ioe.getMessage()); } }
103104105106107108109110111112113
return results; } catch(IOException ioe) { LOG.error(ioe.getMessage(), ioe); throw new XPathException(this, ioe.getMessage(), ioe); } finally { if(zis != null) {
7980818283848586878889
case Constants.LT: return value < 0; case Constants.LTEQ: return value <= 0; default: throw new XPathException("Type error: cannot apply operator to numeric value"); } } else { throw new XPathException("Cannot compare value of type xs:hexBinary with " + Type.getTypeName(other.getType())); } }
@Override public int compareTo(Collator collator, AtomicValue other) throws XPathException { if (other.getType() == Type.HEX_BINARY || other.getType() == Type.BASE64_BINARY) { return compareTo((BinaryValue)other); } else { throw new XPathException("Cannot compare value of type xs:hexBinary with " + Type.getTypeName(other.getType())); } }
144145146147148149150
LOG.error("Unable to Stream BinaryValue to byte[]: " + ioe.getMessage(), ioe); } } throw new XPathException("Cannot convert value of type " + Type.getTypeName(getType()) + " to Java object of type " + target.getName()); }
156157158159160161162
return (T)toJavaObject(byte[].class); } @Override public AtomicValue max(Collator collator, AtomicValue other) throws XPathException { throw new XPathException("Cannot compare values of type " + Type.getTypeName(getType())); }
161162163164165166167
throw new XPathException("Cannot compare values of type " + Type.getTypeName(getType())); } @Override public AtomicValue min(Collator collator, AtomicValue other) throws XPathException { throw new XPathException("Cannot compare values of type " + Type.getTypeName(getType())); }
188189190191192193194195196197
case Type.STRING: //TODO still needed? Added trim() since it looks like a new line character is added result = new StringValue(getStringValue()); break; default: throw new XPathException("cannot convert " + Type.getTypeName(getType()) + " to " + Type.getTypeName(requiredType)); } } return result; }