private static String getString(Value value, int type) throws RepositoryException { if (value instanceof OakValue) { return ((OakValue) value).getOakString(); } else if (type == PropertyType.NAME || type == PropertyType.PATH) { throw new IllegalArgumentException("Cannot create name of path property state from Value " + "of class '" + value.getClass() + '\''); } else { return value.getString(); } }
static Blob getBlob(Value value) throws RepositoryException { if (value instanceof OakValue) { return ((OakValue) value).getBlob(); } else { return new BinaryBasedBlob(value.getBinary()); } }
static Blob getBlob(Value value) throws RepositoryException { if (value instanceof OakValue) { return ((OakValue) value).getBlob(); } else { return new BinaryBasedBlob(value.getBinary()); } }
private static String getString(Value value, int type) throws RepositoryException { if (value instanceof OakValue) { return ((OakValue) value).getOakString(); } else if (type == PropertyType.NAME || type == PropertyType.PATH) { throw new IllegalArgumentException("Cannot create name of path property state from Value " + "of class '" + value.getClass() + '\''); } else { return value.getString(); } }