@Override public double getDouble() throws RepositoryException { throw createException(); }
@Override public Value createValue(InputStream value) { try { return createBinaryValue(value); } catch (IOException e) { return new ErrorValue(e, PropertyType.BINARY); } catch (RepositoryException e) { return new ErrorValue(e, PropertyType.BINARY); } }
@Override @NotNull public Value createValue(@NotNull InputStream value) { try { return createBinaryValue(value); } catch (IOException e) { return new ErrorValue(e, PropertyType.BINARY); } catch (RepositoryException e) { return new ErrorValue(e, PropertyType.BINARY); } }
@Override public Calendar getDate() throws RepositoryException { throw createException(); }
/** * Create a new {@code Value} instance * @param property The property state this instance is based on * @param namePathMapper The name/path mapping used for converting JCR names/paths to * the internal representation. * @throws IllegalArgumentException if {@code property.isArray()} is {@code true}. */ @Nonnull static Value newValue(@Nonnull PropertyState property, @Nonnull NamePathMapper namePathMapper) { try { return new ValueImpl(property, 0, namePathMapper); } catch (RepositoryException e) { return new ErrorValue(e); } }
@Override public Binary getBinary() throws RepositoryException { throw createException(); }
/** * Create a new {@code Value} instance * @param property The property state this instance is based on * @param index The index * @param namePathMapper The name/path mapping used for converting JCR names/paths to * the internal representation. * @throws IllegalArgumentException if {@code index < propertyState.count()} */ @Nonnull static Value newValue(@Nonnull PropertyState property, int index, @Nonnull NamePathMapper namePathMapper) { try { return new ValueImpl(property, index, namePathMapper); } catch (RepositoryException e) { return new ErrorValue(e); } }
@Override public boolean getBoolean() throws RepositoryException { throw createException(); }
/** * Create a new {@code Value} instance * @param property The property state this instance is based on * @param namePathMapper The name/path mapping used for converting JCR names/paths to * the internal representation. * @param blobAccessProvider The blob access provider * @throws IllegalArgumentException if {@code property.isArray()} is {@code true}. */ @NotNull static Value newValue(@NotNull PropertyState property, @NotNull NamePathMapper namePathMapper, @NotNull BlobAccessProvider blobAccessProvider) { try { return new ValueImpl(property, 0, namePathMapper, blobAccessProvider); } catch (RepositoryException e) { return new ErrorValue(e); } }
@Override public Binary getBinary() throws RepositoryException { throw createException(); }
/** * Create a new {@code Value} instance * @param property The property state this instance is based on * @param index The index * @param namePathMapper The name/path mapping used for converting JCR names/paths to * the internal representation. * @param blobAccessProvider The blob access provider * @throws IllegalArgumentException if {@code index < propertyState.count()} */ @NotNull static Value newValue(@NotNull PropertyState property, int index, @NotNull NamePathMapper namePathMapper, @NotNull BlobAccessProvider blobAccessProvider) { try { return new ValueImpl(property, index, namePathMapper, blobAccessProvider); } catch (RepositoryException e) { return new ErrorValue(e); } }
@Override public long getLong() throws RepositoryException { throw createException(); }
@Override @NotNull public Value createValue(@NotNull Binary value) { try { if (value instanceof BinaryImpl) { // No need to create the value again if we have it already underlying the binary return ((BinaryImpl) value).getBinaryValue(); } else if (value instanceof ReferenceBinary) { String reference = ((ReferenceBinary) value).getReference(); Blob blob = root.getBlob(reference); if (blob != null) { return createBinaryValue(blob); } } InputStream stream = value.getStream(); if (stream == null) { throw new ValueFormatException("null"); } return createBinaryValue(stream); } catch (RepositoryException e) { return new ErrorValue(e, PropertyType.BINARY); } catch (IOException e) { return new ErrorValue(e, PropertyType.BINARY); } }
@Override public InputStream getStream() throws RepositoryException { throw createException(); }
@Override public Value createValue(Binary value) { try { if (value instanceof BinaryImpl) { // No need to create the value again if we have it already underlying the binary return ((BinaryImpl) value).getBinaryValue(); } else if (value instanceof ReferenceBinary) { String reference = ((ReferenceBinary) value).getReference(); Blob blob = root.getBlob(reference); if (blob != null) { return createBinaryValue(blob); } } return createBinaryValue(value.getStream()); } catch (RepositoryException e) { return new ErrorValue(e, PropertyType.BINARY); } catch (IOException e) { return new ErrorValue(e, PropertyType.BINARY); } }
@Override public boolean getBoolean() throws RepositoryException { throw createException(); }
@Override public String getString() throws RepositoryException { throw createException(); }
@Override public InputStream getStream() throws RepositoryException { throw createException(); }
@Override public BigDecimal getDecimal() throws RepositoryException { throw createException(); }
@Override public long getLong() throws RepositoryException { throw createException(); }