}
if (value instanceof URI) {
return Schematic.newDocument("$uri", this.strings.create((URI)value));
}
if (value instanceof ExternalBinaryValue) {
ExternalBinaryValue externalBinaryValue = (ExternalBinaryValue)value;
return Schematic.newDocument(EXTERNAL_BINARY_ID_FIELD, externalBinaryValue.getId(), SOURCE_NAME_FIELD,
externalBinaryValue.getSourceName());
}
if (value instanceof org.modeshape.jcr.value.BinaryValue) {
org.modeshape.jcr.value.BinaryValue binary = (org.modeshape.jcr.value.BinaryValue)value;
if (binary instanceof InMemoryBinaryValue) {
return new Binary(((InMemoryBinaryValue)binary).getBytes());